Commit Graph

654027 Commits

Author SHA1 Message Date
Peng Yixin
e50341f062 media: fix some KASAN bug: [1/1]
PD#OTT-945

Problem:
KASAN detected some "use-after-free" bug.

Solution:
Fixed these bug.

Verify:
Verified p212

Change-Id: If7e87987d26338e25dcca909ed52676794ccdaed
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
e0c486fbd6 media_module: special h265 video playback issue in frame mode [1/1]
PD#OTT-100

Problem:
there are two h265 hdr stream playback issue in frame mode. decoder reports
error, and display masoic

Solution:
app write inregular frame  to decoder,csd at end of frame, which cause these
data will be miss when end of decoding frame. we add a frmbase_cont_bitlevel
check at picdec_done to avoid data missing

Verify:
P212

Change-Id: I64200c7c2ff0525fdc1ce907f15850b998b5e21b
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Chuangcheng Peng
ae3d940fc6 dvb:remove the deadlock risk for spin lock[1/1]
PD#SWPL-2599

Problem:
maybe the deadlock risk in the asyncfifo

Solution:
remove the spin lock in disable_irq

Verify:
Verify android p at x301

Change-Id: I3b61de07efa09837b6bfbd7c52f9dc6a867ae912
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
0879ec59c1 decoder: fixed some vp9 avs2 8k problem [1/1]
PD#SWPL-2971

Problem:
1. some vp9 8k video display abnormal.
2. avs2 consume mem excessive and mosaic and crash
   when play avs2 8192x4608 bitdepth 10 bitstream.

Solution:
1. NorthernItaly8k.mkv is 7968x3984, need set
   blkmod 64x32(mem_map_mode 2) for 64 aligned;
2. a special 8192x4608 bitstream which tile_x
   less than 15 need work around;
3. make avs2 mem consume fit with resolution and
   fixed crash when max resolution with 10bit.
   ucode gerrit id: 57342

Verify:
verify on x301.

Change-Id: I9da01e691e96d93bc6a120ed2fde0aa6dac52021
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
255c70cc9d media_module: AT&T 2x2 1080i@60 demo [1/1]
PD#OTT-921

Problem:
add vdec double write mode to save bandwidth

Solution:
add vdec double write feature to save DI bandwidth
in double_write_mode config
0x10000: vdec dw horizotal 1/2
0x20000: vdec dw horizotal/vertical  1/2

Verify:
P212

Change-Id: I51b8f8258a590490bd1e7766d4be8fdd4de36933
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Chuangcheng Peng
e70ee8c04d tl1: bringup: demux && async fifo [1/1]
PD#SWPL-2187

Problem:
add 1 ts input && 1 async_fifo && 1 s2p2

Solution:
Comptible with other platform

Verify:
Verified on TL1 ref board

Change-Id: I4100dd7ac07f95cf0d671f251d1ce67ba1111a99
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Tao Guo
0967e5f5a6 vdec: fix integer cast to pointer [1/1]
PD#SWPL-1081

Problem:
integer cast to pointer error

Solution:
use unsigned log to cast to pointer

Verify:
P212 Android(32/64) buildroot(32/64)

Change-Id: I5d8230e4bb71a62eccfb2846e6c48acca64a0468
Signed-off-by: Tao Guo <tao.guo@amlogic.com>
2019-07-23 17:52:49 +09:00
Tao Guo
c4eaf21262 vdec: add drm_framemode in codec profile [1/2]
PD#SWPL-1081

Problem:
omx need get profile to know whether kernel support drm framemode

Solution:
add drm_framemode in codec profile

Verify:
P212

Change-Id: I9e817d01714296646f150680ca1e7a301de9b341
Signed-off-by: Tao Guo <tao.guo@amlogic.com>
2019-07-23 17:52:49 +09:00
Zhi Zhou
d61751034a vdec: frame mode add secure mode support [3/9]
PD#SWPL-1081

Problem:
multi drm need frame mode

Solution:
add frame mode for drm play

Verify:
P212

Change-Id: Ib4f5e77a3ae3a01b617192a78ae397755b57913c
Signed-off-by: Zhi Zhou <zhi.zhou@amlogic.com>
Signed-off-by: Tao Guo <tao.guo@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
4bdc7e4ff3 H265: fix output frame latancy [1/1]
PD#IPTV-347

Problem:
output frame latancy when run videophonetest.

Solution:
sps_max_dec_pic_buffering_minus1_0 to
get buf num when sps_num_reorder_pics_0 is 0.
ucode gerrit id: 56487

Verify:
need verify by u212 iptv code

Change-Id: I199c45ee48ba4c535d0303347af27f9a572ed2c8
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
Rong Zhang
b362b143b1 media_module: mh264 [1/1]
PD#IPTV-311

Problem:
	decode a 4K mbaff video file will produce many random
	mosaic frame

Solution:
	1. Add mbaff macro decode timing support for multi-instance
	   for 4.9 Kernel
	2. ucode gerrit id:55144
	3. We commited a uncorrect version of ucode bin in commit
	   dfa0cc3e, and reverted it in commit 8ab874f. Now, we
	   recommit this correctly ucode bin version.

Verify:
	Verified ampere

Change-Id: Ie9db7e1b11d230a3c3f1a60804607e4661976da2
Signed-off-by: Rong Zhang <rong.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Rong Zhang
cfd91cae22 Revert "media_module: h264 [1/1]"
This reverts commit af5e395542ebd9478abbcbca4ebd1acec0adf288.

Change-Id: I0d24901aba3651d9f32ebae4277595c57c768aba
2019-07-23 17:52:49 +09:00
Rong Zhang
da1f2d5c6d media_module: h264 [1/1]
PD#SWPL-596

Problem:
	Support User data push for H264 Single-instance

Solution:
	1. Add user data push handler for h264
	2. get correct user data buffer address for mh264
	   and mpeg2 for 32/64 Bit version

Verify:
	Verified Einstein

Change-Id: If09a4240c512dcb13426fc88d0d3696ac3d8dd4e
Signed-off-by: Rong Zhang <rong.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
yan yan
3cd8d40691 media_module: Teletext make kernel unstable. [1/1]
PD#SWPL-2509

Problem:
Ring buffer pointer may become null.

Solution:
Add judgement.

Verify:
Local build. R311

Change-Id: Ia3329bd91503b6d137b21a6e82fe2ca8380d087b
Signed-off-by: yan yan <yan.yan@amlogic.com>
2019-07-23 17:52:49 +09:00
Yinming Ding
b62bf43787 media_module: fix last few seconds of the DD+ stream are not smooth [1/4]
PD#SWPL-714

Problem:
The last few seconds of the DD+ stream are not smooth by DTV playback.

Solution:
check the apts and vpts both discontinue,then replay.

Verify:
P321

Change-Id: I125a64905623ad639b5e96089e6650dfcb96607b
Signed-off-by: Yinming Ding <yinming.ding@amlogic.com>
2019-07-23 17:52:49 +09:00
Conglin Guo
23c3b1b555 media_modules: special p video play jagged [1/1]
PD#SWPL-265

Problem:
special p video play jagged

Solution:
1.special p video force interlace

Verify:
T962 P321

Change-Id: I9f82bb8649d31166d9847dec59e5c75080d63d21
Signed-off-by: Conglin Guo <conglin.guo@amlogic.com>
2019-07-23 17:52:49 +09:00
Conglin Guo
374cd016ee media_modules: avs reset decoder stop [1/1]
PD#SWPL-2480

Problem:
avs reset decoder stop

Solution:
1. avs reset  remove vdec reset code

Verify:
T962 P321

Change-Id: I92dbb9b1bfa49f3d2f08d9fda6670a595bb91d97
Signed-off-by: Conglin Guo <conglin.guo@amlogic.com>
2019-07-23 17:52:49 +09:00
Rong Zhang
701bfb72fd Revert "media_module: mh264 [1/1]"
This reverts commit dfa0cc3ed4dcd483a15703ca8c972c606239a337.

Change-Id: I2ba9b92aaeb276032a2c006e905a53a8c2800adf
2019-07-23 17:52:49 +09:00
Rong Zhang
b2ef5b9f41 media_module: mh264 [1/1]
PD#IPTV-311

Problem:
	decode a 4K mbaff video file will produce many random
	mosaic frame

Solution:
	Add mbaff macro decode timing support for multi-instance
	for 4.9 Kernel
	ucode gerrit id:55144

Verify:
	Verified ampere

Change-Id: I9f027331dfb449a362f5d947bc9f60b4f7a9a36f
Signed-off-by: Rong Zhang <rong.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Peng Yixin
c6e1f95014 media: Video Peek function need support VP9 format: [1/1]
PD#SWPL-2304

Problem:
Video Peek function need support VP9 format.

Solution:
Video Peek function supported VP9 format.

Verify:
Verified p241

Change-Id: I49cec0054eb4694ee7872bc696bacad057b9b2f0
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Jian Wang
17bdb39393 vp9: add txl do not support vp9 [1/2]
PD#SWPL-2301

Problem:
txl do not support vp9 can build vp9 component
duo to vts fail

Solution:
do not add vp9 profile on txl

Verify:
verify on p321

Change-Id: Id738adbdaf61f395da439428afb000245425d237
Signed-off-by: Jian Wang <jian.wang@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
49a8500a7c decoder: force 8k no compress and optimize vp9 code for tl1 [1/1]
PD#SWPL-36

Problem:
display cannot support 8k compress.

Solution:
1.force double write 2 for tl1 8K vp9;
2.force tl1 h265 double write 3 no compress;
3.optimized vp9 avs2 tl1 code.
4.add 8k to profile info.

Verify:
X301

Change-Id: If496a0efb9cf9c87b0123aaab6f6b78981858e73
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
f7b23df1a1 media_module: fix vp9/h265 double write only(0x10) issue [1/1]
PD#SWPL-896

Problem:
1) vp9/h265 double write only mode doesn't work with mmu ucode
2) double write flag bug in decoder driver probe

Solution:
1) change code to support double write only mode with mmu ucode
2) fix double write flag bug

Verify:
QA verify

Change-Id: I544d49547238545303cd090541ff6effd1606863
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
e541f1aa96 avs: reset vdec core when error reset [1/1]
PD#SWPL-1235

Problem:
pc bad value in kernel panic after change source

Solution:
vdec reset core when avs error reset

Verify:
need verify by t962-p321 as jira description.

Change-Id: I490980c43dd4c3de28af01021b3cb0b82d4e151c
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
d5597dc409 media_module: optimize buf_available check condition in mh264 [1/1]
PD#SWPL-1617

Problem:
On S805X, back end performance is not good. easy to cause
bufmgr reset and cts  failed.

Solution:
optimize buf_available checkcondition to avoid reset.

Verify:
Verified P241

Change-Id: I98c7e9ad8a8c31e0f97c26f5130952d4308756bb
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
3926ee9b6d media_module: fix fw teeload status issue in vmh264 [1/1]
PD#SWPL-2284

Problem:
 there is issue in vmh264 fw teeload. which cause decoding fail.
REG_G status should be saved for each instance

Solution:
saved reg_g at each instance ctx

Verify:
Verified P241

Change-Id: I7ff11951a7c53f360dfdae9a8605180f28c7bb4b
2019-07-23 17:52:49 +09:00
kunpeng.tang
32c779b23e media_modules: encoder: fix compile error [1/1]
PD#SWPL-2270

Problem:
warnings being treated as errors

Solution:
fix int-conversion

Verify:
verify local

Change-Id: I33d0375ff2bd9b2dd52deccf56c6a5565830717f
Signed-off-by: kunpeng.tang <kunpeng.tang@amlogic.com>
2019-07-23 17:52:49 +09:00
kunpeng.tang
75ab7af1ed media_modules: encoder: fix kernel panic in encoder module [1/1]
PD#SWPL-2270

Problem:
when do camera record on ampere P,platform stuck and reboot,
kernel panic in encoder module

Solution:
change phys_to_virt to codec_mm_phys_to_virt;
dma_flush to codec_mm_dma_flush

Verify:
verify by ampere P

Change-Id: I04002587a0683473a6609d3a89176a5cebd3260e
Signed-off-by: kunpeng.tang <kunpeng.tang@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
3b5848f74e media_module: fix netflix test video freeze issue [1/1]
PD#SWPL-809

Problem:
in stream mode, decoder drivers with again check will be always in run_ready state.
because of again_threshold not reach. but acutally there is enough data in vbuf.
decoding hang up

Solution:
sync input buf status once again check appears

Verify:
QA test on ampere

Change-Id: I72dc98461865f296fe0c625f8ca60a11561976ac
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Chuangcheng Peng
84fbdcbe33 dvb:fixed subtitle memory invalid issue[1/1]
PD# SWPL-2268

Problem:
open subtitle, memory invalid and crash

Solution:
change phys_to_virt to codec_mm_phys_to_virt

Verify:
verify on P321 android p

Change-Id: I165bb708945c28cc20c2aaf21ce4b04517556a54
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
711917ca2a decoder: fix too much get status failed. [1/1]
PD#SWPL-2241

Problem:
too much print like below,
"amstream_do_ioctl error :ffffffed, c02053c3"

Solution:
set dec_status return 0 in multi-dec driver.

Verify:
Verify by x301

Change-Id: Ibd07e487706176b5c6a316ce48234b608112d0ce
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
Zhi Zhou
b4627f5d56 media: license: modify to GPL [1/1]
PD#SWPL-2111

    Problem:
    license source files error

    Solution:
    modify to GPL

    Verify:
    verify by locally

Change-Id: Iccce6436b1e110c97ecff8cd3be264b03bbe11cf
Signed-off-by: Zhi Zhou <zhi.zhou@amlogic.com>
2019-07-23 17:52:49 +09:00
Peng Yixin
487fa3c88b media_module: fix some coverity error: [1/1]
PD#SWPL-2053

Problem:
    Coverity detected some code defects.

Solution:
    Fixed these code defects.

Verify:
    Verified u212

Change-Id: I715b4565cd55608e087cd82aff7f36b2f06c8546
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Nanxin Qin
efea3c59cf decoder: checked init state before reads the vdec status. [1/1]
PD#SWPL-2142

Problem:
the kernel maybe crash when swicthed the src channel

Solution:
checked init state before reads the vdec status

Verify:
p321

Change-Id: I3b9fc2128615c5b6151915baecb0516a7ebca2f4
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2019-07-23 17:52:49 +09:00
Nanxin Qin
7603fd817e decoder: fixed build err for buildroot. [1/1]
PD#SWPL-1909

Problem:
fixed build err for builroot.

Solution:
fixed build err for builroot.

Verify:
p321

Change-Id: Ib470b9299abd853e8dbf4e4f91e56c8b8544a430
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2019-07-23 17:52:49 +09:00
Jian Wang
fb6581fc97 media: license: modify to GPL [1/1]
PD#SWPL-2111

Problem:
license source files error

Solution:
modify to GPL

Verify:
verify by locally

Change-Id: I77dc054ec4501dd3fb65079a8f437fcc8c3d144f
Signed-off-by: Jian Wang <jian.wang@amlogic.com>
2019-07-23 17:52:49 +09:00
Jian Wang
89b1ff42a0 media: add copyright license [1/1]
PD#SWPL-2111

Problem:
no license source files

Solution:
add license header

Verify:
verify by locally

Change-Id: Ia7fe71853a86dc4665a642643a1ac9f1ad8cf6ec
Signed-off-by: Jian Wang <jian.wang@amlogic.com>
2019-07-23 17:52:49 +09:00
Nanxin Qin
eba9cc8b79 media_modules: remap the highmem addr to prevent crash on the kernel 32bit [2/2]
PD#SWPL-1909

Problem:
mem rw exception caused crashed.

Solution:
1. add mapping the highmem address by the func vmap().
2. remove the flag CODEC_MM_FLAGS_CPU if not necessary.

Verify:
p212, w400

Change-Id: Id2904331098eef7245e9949619840dcb20d16b4b
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
bcd96d9ce9 media_module: fixed tl1 bringup bugs [1/1]
PD#SWPL-36

Problem:
hevc 8k mosaic on tl1-x301

Solution:
1. tl1 hevc clk run in 800Mhz default;
2. fix hevc 8k mosaic;
3. decrease hevc 8k mem consume.

Verify:
verified on x301, u212

Change-Id: Idfcce363a0a8da8e63c46a4204dc3e123474c9e5
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
43daee674f media_modules: fixed cannot run multi dec [1/2]
PD#SWPL-1964

Problem:
multi play seized up.

Solution:
fix fw load failed in multi dec

Verify:
veryfy by u212

Change-Id: Icc90e171f46b3137375456298bc8562917d4efa3
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
Renjiang Han
0ceb223ea4 H264_encoder: add case of ge2d for bgr [2/2]
PD#SWPL-1977

Problem:
Hardware coding does not support bgr

Solution:
Convert bgr to rgb using ge2d

Verify:
local

Change-Id: I9e246a0ae99a35c36fb92bb9c17ea63726bb5d28
Signed-off-by: Renjiang Han <renjiang.han@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
f5ac21ece5 h264: fixed s805x halt begin decode
PD#156197: h264: set the s805x vdec clk to 333Mhz when
start decode, and set to normal clk after decoded 30 frames.

Change-Id: I08261af396f2b99af3e1a610a68967eef58b695f
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
Rong Zhang
ec56c30577 VDEC: AVS2 [1/1]
PD#174425

Problem:
	Support AVS2 on G12A and GXLX2 for multi-instance

Solution:
	1. ucode support AVS2 HDR information push ucode
	   gerrit id:47825
	2. AVS2 C Driver support multi-instance
	3. fix buffer leakage issue due to multi-task reentry
        4. add stream buf empty check
	5. This patch was merged in gerrit 52448, but dure to
	   the fault of ucode launcher, it was revered in
	   gerrit:53708. The ucode launcher fault has been
	   resolved in bug SWPL-670 with commit: 8546160f1. And
	   now, we recommit this patch with new ucode.bin

Verify:
	Verified U212

Change-Id: I5d9b60546ef8ac4371ae19f68b0281b4d69cfd1f
Signed-off-by: Rong Zhang <rong.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
5e886ee2fe media_module: fix 264 4k mmu stream mode playback issue [1/1]
PD#SWPL-949

Problem:
1) with some 264 4k stream,  mmu doesn't  work in stream mode
2) there is no secure access right in 4k mmu

Solution:
1) fixed access rights issue in uboot in 264 mmu mode
2) disable 264 4k mmu mode

Verify:
Verified u212

Change-Id: I7b610581d96e017101a1b0a3ff7745e1b1c51b4c
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
cbb101b4ee media_module: optimization for vdec schedule debug and fw load[1/1]
PD#SWPL-895

Problem:
optimization for vdec schedule debug and fw load

Solution:
1) change vdec_core_thread priority
2) add reload flag in vdec to check if reload fw at every run
3) add mc_type to check if fw need reload at every run

Verify:
Verified p212

Change-Id: Ic14f14831bf59d913450228ba07e0f94dde5347e
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Rong Zhang
26b35ddcdd VDEC: HEVC [1/1]
PD#SWPL-869

Problem:
        Notified HDR10+ message to receiver

Solution:
	1. parse sei data to check hdr10+ data header
        and then change transfer_characteristic to
	0x30 in signal_type for each picture.
	2. add video_signal_type debug infomation

Verify:
        Verified U212

Change-Id: Ibcc65e624c2c82304fbda1b0ab02a603e975bd27
Signed-off-by: Rong Zhang <rong.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
1bba286120 media_modules: mh264: keep last frame while reset decoder [1/2]
PD#OTT-71

Problem:
google cast display green lump when seek.
bufmgr reset after seek opration.

Solution:
keep the normal pic before reset and free buffer;

Verify:
U212, Atom

Change-Id: I0b1d21fb73ed8e7b2bf9815b53e0832444f1e41a
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
e29ec06326 media_module: fix h265 playback bug on s805X [1/1]
PD#SWPL-1020

Problem:
h265 decoder report over size failed when play 1080/720 stream

Solution:
fix check 4k limit bug in ucode
ucode gerrit: 53789

Verify:
QA test on P241

Change-Id: I9a7c876dcfa06b100778c05def75d9c04bfdd81f
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Rong Zhang
15710f5ea0 media_module: vp9 [1/1]
PD#SWPL-971

Problem:
	youtube play 4k60 vp9 video file, Serious
	frame loss

Solution:
	entend decode buffer number to 12

Verify:
	Verified Ampere

Change-Id: I876c16e3b45eebda2640260ceab84c093463abfe
Signed-off-by: Rong Zhang <rong.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Rong Zhang
85df393120 Revert "VDEC: AVS2 [1/2]"
This reverts commit 1899bb901336d36074694f80f552d4e0f4bda630.

Change-Id: I1a8878a21e7b00d323df527ed12be15e05ef2a74
2019-07-23 17:52:49 +09:00