Commit Graph

653994 Commits

Author SHA1 Message Date
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
Rong Zhang
2f3f2d09aa VDEC: AVS2 [1/2]
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

Verify:
	Verified U212

Change-Id: I28998ac9f7a66fa8738afdbc812bcc1ca7436b24
Signed-off-by: Rong Zhang <rong.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Chuangcheng Peng
1f8afba3b0 DVB:fix g12a can't record ts issue [1/1]
PD# SWPL-479

Problem:
dvr function will cause crash

Solution:
open async_fifo init function

Verify:
verify by u200 at android p.

Change-Id: I97812b2241d5857646e19230232805fa4b39849f
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Zhi Zhou
7a7cb8c898 vmh264: fixed crash bug.when no virt addr.
PD#172483: if reserved mem is not maped;
	must check the memory before used.

Change-Id: Ie6955059c73858e071c6d3b13e0698d659e6891a
Signed-off-by: Zhi Zhou <zhi.zhou@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
24e759113f media_modules: tl1 bringup changes [1/3]
PD#SWPL-520

Problem:
tl1 bringup changes

Solution:
1. add tl1 cpu type
2. hevc decoder support 8k
3. replace get_cpu_type() with get_cpu_major_id()
ucode commitid:
d9582c3a6697c25d81b706d41d20d8908158ef9f

Change-Id:
Iac3a5f20698277d3f7f500fba6a27b88f6ac5839

Verify:
p212, w400

Change-Id: Iac3a5f20698277d3f7f500fba6a27b88f6ac5839
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
live.li
4d1f1ffb27 media_module: adec: 32bit&64bit kernel compatible [1/1]
PD#SWPL-841

Problem:
 R311 32bit kernel audio cant output

Solution:
 R311 32bit kernel adec driver can't get
 cbus base addr correct, fix it

Verify:
   R311 32bit kernel

Change-Id: Ia6da4726aa49078e8d1a65002bde17555601728d
Signed-off-by: live.li <live.li@amlogic.com>
Signed-off-by: Jian Xu <jian.xu@amlogic.com>
2019-07-23 17:52:49 +09:00
Peng Yixin
a20dfbc252 media_module: h265: [1/1]
PD#174220

Problem:
After analyzing SPS, we found the value of sps_num_reorder_pics_0 is 0.
it is an error value, cause video play block.

Solution:
if it value is 0, we will set 7 for pass cts test.

Verify:
Verified S905X2

Change-Id: Iff03ec4448f687d4fca2de2dbf3210cb65a90568
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Yao.Liu
72b294a41b media_module: vp9/h265: add save buf mode [2/2]
PD#173436 PD#SWPL-349

Problem:
not enought codec mm for cts decoder test which
running in both none-nativewindow and nativewindow mode

Solution:
reduce omx output buffer and decoder buffer for gsi

Verify:
QA verified

Change-Id: I7cf120722c42db2ed75cc09e25a3fbb34cdf9598
Signed-off-by: Yao.Liu <yao.liu@amlogic.com>
2019-07-23 17:52:49 +09:00
Peng Yixin
be3f6f1bd9 media_module: mpeg2 vh264: [1/1]
PD#173066

Problem:
have some KASAN bug

Solution:
fixed user-memory-access defect.

Verify:
Verified S905X

Change-Id: Ic4fc16d512d1a7bd14a0df9901ae9e6e201bb8a7
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Lifeng Cao
49859761b1 media_module: fix issue of div_s64 usage on 32bit kernel
PD#174336: vp9&avs2: fix issue of div_s64 usage

Change-Id: I351c8d1a93a38585da0d4ed0760bd6c7905f5f3f
Signed-off-by: Lifeng Cao <lifeng.cao@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
63b5b63e7f media_module: add debug level limit for hdr info
Change-Id: I6c9f1bc8f66366b1859230886978409880c9b621
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Peng Yixin
5f4c8b5445 media_module: h265: fix video play block issue.
PD#174220:

After analyzing SPS, we found the value of sps_num_reorder_pics_0 is 0, it is an error value, which also caused the video play block.

Change-Id: I6e6d9bccf1284977f64fed9805fd329749fe020c
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Jian Xu
05957f1255 adec: clear up the uio interface
PD#166264

Change-Id: I74241eb9844a8642e33084f502d79c690a6cd000
2019-07-23 17:52:49 +09:00
rongrong zhou
b3a170d087 amvdec_ports: fix vdec_h264_if dpb size calculation errors.
PD# 173402

dpb size error

Change-Id: Ia1fcb6c689f4a9663065a38bf1bd04499366d5f8
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
a4d634c06a mh264: parse vui info for buffer number calculation
PD#173030: vmh264: parse vui info max_dec_frame_buffering to
calc reorder_pic_num when bitstream_restriction_flag is enabled.

Change-Id: Ib14e54be3f5149cf4150ac63fe66d88171c14c2b
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
Nanxin Qin
fdfd1e23b1 amvdec_ports: fixed the build err with the kernel 32bit.
PD#170885

Change-Id: I2d4ed2e0dc2497190f00e24e96b28223d675c0dc
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2019-07-23 17:52:49 +09:00
Nanxin Qin
683ef21d17 amvdec_ports: optimize some codes of the v4l vcodec.
PD#170885

1. support the h264 decoding with multi-instance.
2. the reference count of clk mux has't clean was fixed.
3. replace capture worker to thread process.
4. optimize the machine status of the vcodec.
5. remover some locks unnecessary to promote efficiency.
6. the picture infos used to vda that was fixed.

Change-Id: I061ebdc088c8c7e14eab73032308715da5f4aafb
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2019-07-23 17:52:49 +09:00
Peng Yixin
8a1571bf31 media_module: h265: fast output the first I frame
PD#172137:
the first I frame output when decoder statu is HEVC_DECPIC_DATA_DONE.

Change-Id: Ib6625b670268b8d9c251c05e261a137199677f6c
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
d2a0e21fa9 media_module: support 264 mmu for G12A
PD#169065: add 264 mmu support for G12A

ucode gerrit: 47098

Change-Id: I8b0b97005c2f6d9b19a271dab258c014c06bd4e0
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
Hui Zhang
b81f149cde media_module: fix MAX_BUF_NUM redefine issue
PD#166415: vp9: fix MAX_BUF_NUM MACRO redefine issue

Change-Id: I54370f682cf6ddfd24d25ef450f2c5b74e944337
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
2019-07-23 17:52:49 +09:00
jintao xu
e6db8b0669 decoder: set vp9 buffer to 12 for cpu id less than G12A
PD#166415:

Change-Id: Id5a5b4abe2753f7503796c161abd65aa09ec90d5
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
558a8cd709 vmpeg12: fix mpeg12 fw tee_load fail
mpeg12 fw tee load will be fail without name, must pass
a name.

Change-Id: I5bf12ce9158237687c93acc0c54d4c29460cecea
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
shihong.zheng
1a63229ef3 decoder: optimize code and sync from iptv
PD#170744: decoder:
1. fix mh264 mosaic when play mjpeg at sametime in frame mode;
2. sync the mjpeg multi play code;
3. add the mpeg2&mpeg4 multi play code;
4. force exit when load ucode fail;
5. set time out for vdec_disconnet wait_for_completion;
6. reset core when active vdec to disconnect list and before run;
7. fix some coverity error;
8. remove ucode load when mmu enable in vmh264 init.

Change-Id: Ic8f296526ddac5b3904a323ce2850b1d9178a284
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2019-07-23 17:52:49 +09:00
zhilei.wu
48ee09ae0d vh265: output the correct sei information for dv
PD#169710: vh265: output the correct sei information for dv

Change-Id: I60368cdfa04e76d4b5b5bad5c2c066a50a878431
Signed-off-by: zhilei.wu <zhilei.wu@amlogic.com>
2019-07-23 17:52:49 +09:00
Nanxin Qin
9cf96f904b firmware: update video_ucode.bin
PD#172379:
add a firmware of vp9_mmu for g12a.

ucode commitid:
db4e7eba46d4e88be1cca178e7ee523c14dd9a08

Change-Id: I2f2d02ec387b3b276245f4480409dc8c934f2473
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2019-07-23 17:52:49 +09:00
Jian Wang
e5d993404e amstream: copy drm flags for slave dec
PD# 171839

copy drm flags for slave dec

Change-Id: Ib1b68b7d72b451e6d2694f518148691004490222
2019-07-23 17:52:49 +09:00
Peng Yixin
43e4a8b210 vh265: config hevc buf num by node
PD#172077

the value of dynamic_buf_num_margin was not set before, it causes the allocation of memory fail when config 1G DDR, so modify the code to set its value in driver.

Change-Id: I86d1f1dac5936bad693f6643826ee35596fb0bac
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Ao Xu
bf633a3836 media_module: solve 32bit compile error
PD#169652: media_modules: solve 32bit compile error

Change-Id: Id12608913df7372a303606dbf39b1f349eaaf08d
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
2019-07-23 17:52:49 +09:00
Nanxin Qin
4bf595fa56 decoder: fixed an issue of the h263 playback.
PD#172068
needs to use VIDEO_DEC_H263 on the firmware loading.

Change-Id: Ia55c47046a848bb300947e5f3b79a73ae2203c05
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2019-07-23 17:52:49 +09:00
Peng Yixin
fa6ba91951 vmh264: fix block in isr thread.
PD#167539

max_frame_num value exceeds the maximum value in the specification, and that cause block.
judge the validity of max_frame_num value to solve this issue.

Change-Id: Ic08e3f419e18d823cee4d0309b940dffa2058249
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Peng Yixin
38250cbd4a media_module: Getting hdr information from ucode for mh264 and mpeg2
PD#167533:

ucode gerrit id: 49327 and 49371

Change-Id: Id55415f32884425391b128b2e34d57e7a77e5191
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Nanxin Qin
3381e66954 modules: the firmware loading the way was optimized.
PD#171042:
1. removed the way which used cpu type to choice fw.
2. removed redundant code.

ucode gitid
45b7330fd00f96d2e9859ac1ec91d1e46f70a1b2

Change-Id: Ie737701e682244223e437b2d6c5eb02420e10fbb
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2019-07-23 17:52:49 +09:00
Peng Yixin
9e1e8402e0 media: fix some coverity error
PD#170543

Change-Id: I8494394be526b99f16eab43f5510d4b48aa4a311
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
2019-07-23 17:52:49 +09:00
Chuanzhi Wang
f84109b20a media_module: Add configuration items to control dvb module compilation.[2\2]
PD#169652: media_module: add CONFIG_AMLOGIC_DVB

Change-Id: If44aa8cb7f8119320d10413615da9b3606fed522
Signed-off-by: Chuanzhi Wang <chuanzhi.wang@amlogic.com>
2019-07-23 17:52:49 +09:00