PD#SWPL-138577
Problem:
codec_mm optimization for slot centralization.
Solution:
When a large number of scatter buffers are not used,
pages replacement is carried out so that
the corresponding slot can be released
Verify:
ohm
Change-Id: Ia2188f4afae8811230278e0a779cb583a92185d2
Signed-off-by: lele xiang <lele.xiang@amlogic.com>
PD#SWPL-137630
Problem:
codec mm adds the interface for dmabuf status dumping.
Solution:
The dmabuf infos interface is mainly used to view
the status of dmabuf and track the status that dmabuf
is referenced by a process. It can provide a convenient
way for memory leakage and find the leaking process.
Verify:
ohm
Change-Id: Ib2acf59ae1cc52e5b21c19afc1053fdf3b5e4bd7
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
PD#SWPL-138573
Problem:
codec mm scatter allocation optimization.
Solution:
(1)adjust the size of scatter alloc unit to 512kb.
(2)adjust the slot size of scatter to 8MB
Verify:
ohm
Change-Id: Ia5d34bc1b6f12faa25f4949df5e0552e227c43ad
Signed-off-by: lele xiang <lele.xiang@amlogic.com>
PD#SWPL-136287
Problem:
The configuration name in kernel 5.15 is starting with "AMLOGIC_",
in order to unify configuration name, modify AML_TEE,AML_OPTEE to
AMLOGIC_AMLTEE,AMLOGIC_OPTEE.
Solution:
rename AMLTEE,AMLOGIC_OPTEE to AMLOGIC_AMLTEE,AMLOGIC_OPTEE
Verify:
Android + Kernel 5.15
Change-Id: I25be69bb990b7e86026790a9a64f64a473e9adfc
Signed-off-by: Hangyu Li <hangyu.li@amlogic.com>
PD#SWPL-132331
Problem:
Calling the codec_mm_dump function cannot fully print log information
Solution:
1.Optimize printing with not enough code mm
2.Adjust the codec mm printing method to fully output logs
Verify:
ah212
Change-Id: I969ba16bb4f22f07e8e59fde1e560cb459397504
Signed-off-by: kun.liu <kun.liu@amlogic.com>
PD#SWPL-132425
Problem:
1.secure_vdec_reserved memory should be reserved as no-map.
2.in some devices secure_vdec_reserved may exceed 4G.
3.tee_register_mem() in codec_mm.c should not force parameter as u32 type.
Solution:
1.add no-map attribute for secure_vdec_reserved dts node.
2.limit secure_vdec_reserved reserved in 0x0-0xe0000000 for some devices.
3.remove u32 type casting when call tee_register_mem().
Verify:
Android R + kernel5.15
Change-Id: Ife8cac2c4a4821a310d998766e69677c6eb2984e
Signed-off-by: Hangyu Li <hangyu.li@amlogic.com>
PD#SWPL-120929
Problem:
a new scatter watermark
Solution:
set a minimum size for cma, and calculate
the remaining cma size as the maximum size
that can be allocated by scatter.
Verify:
sc2
Signed-off-by: Hao Shi <hao.shi@amlogic.com>
Change-Id: I56e251c783d19795cc87ce2831c134863ed3408e
Signed-off-by: lele xiang <lele.xiang@amlogic.com>
PD#SWPL-128566
Problem:
tvp vendor hook not meet gki2.0
Solution:
use kprobe to get symbol.
Verify:
local.
Change-Id: I26160ebfa86ab98969bfd29d6cc0afa264b0270f
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
PD#SWPL-128403
Problem:
Large cma size out of 32 bit data size
Solution:
Large cma size out of 32 bit data size when cal tvp segment
size, use division instead of multiplication.
Verify:
t3x
Change-Id: I5e0d3f2e034c33a9bd116b03a7d9a8d412c46c77
Signed-off-by: shipeng.sun <shipeng.sun@amlogic.com>
PD#SWPL-119005
Problem:
CB2 Separate 1 tvp range to 2 4K DRM playback
Solution:
For 4K playback need more than 300M TVP Memory, cma memory exchange
maybe consume more than 1s will lead codec2 timeout, separate to 2
tvp range, and the second range will protect async doesn't block codec2
process..
Verify:
ohm
Change-Id: I1b8e182b72d6b810a767d8e34cb52e79c945765a
Signed-off-by: shipeng.sun <shipeng.sun@amlogic.com>
PD#SWPL-117620
Problem:
Play Specific stream switch channel no aduio output
Solution:
1.get video filter fd increase the ref of file
2. need to put video filter fd
Verify:
ohm
Change-Id: I84069d9af1c08669900a7368770a63244b689d3e
Signed-off-by: hui.lin <hui.lin@amlogic.com>
PD#SWPL-117836
Problem:
When the memory is insufficient,
codecmm forcibly releases the cache,
causing the address of the scatter mem pointed to
in the avbc header to become invalid,
and an address exception access occurs.
Solution:
codecmm does not release the cache when the memory is insufficient.
Verify:
T5M
Change-Id: Ie3068506a26d5e480fe8e089e7bdb09b5fd45477
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
PD#SWPL-113559
Problem:
valhall don't support lazy map process
t5m don't support video screencap
cts accuracy will fail on t5m
Solution:
add valhall support
Verify:
T5M
Change-Id: I3ade8ff97aad9d9cb03286ed7c0a788d1a640317
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
PD#SWPL-113445
Problem:
t5m dos should not access ddr1. codec_mm cma is not enough.
for some cases.
Solution:
when ddr0 is limited to DMA32_ZONE, scatter could be
alloced from DMA32_ZONE when configuration is set.
Verify:
T963D4
Change-Id: Ibb93676dfa403f1ac789f8d03c92ab9369708d61
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
PD#SWPL-113962
Problem:
For the surface -> no-surface scenario,
the surface holds the buffer and cannot be released,
resulting in excessive memory usage.
Solution:
For no-surface scenarios, recycle after the afbc buffer is output.
n addition, count the scatter mem allocated from the system.
Verify:
T5M
Change-Id: Ib35efd91ed315569753ca929e735680868aabc8e
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
PD#SWPL-109858
Problem:
the interface of function cma_alloc change
Solution:
modify it to compatible with common14-5.15
Verify:
sc2
Test:
bring up to home
Change-Id: I6edac5d1bcc17de4f0edabdb5b254debef592d72
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
PD#SWPL-109588
Problem:
build failed when set codec mm builtin.
Solution:
add macro to cma mmu operation.
Verify:
build pass.
Change-Id: I71c568101a61a5f7317757233591b03c8bd4fed5
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
PD#SWPL-105119
Problem:
Reduce the alignment width for tvp memory allocation.
Solution:
Reduce the tvp alignment to 64KB.
Verify:
ohm
Change-Id: I03c0057cd3d076647ee90b8689b7be5a69c3b14b
Signed-off-by: Hao Shi <hao.shi@amlogic.com>
PD#SWPL-106612
Problem:
Tvp enabled by codec_mm itself, but tvp_enable doesn't setting
value generate some mixed log.
Solution:
Correct log when codec_mm enable tvp by itself for support
dynamic allocate tvp platform.
Verify:
ohm
Change-Id: Idca8118f296cee8150f39c77158e833b7ff9ee10
Signed-off-by: shipeng.sun <shipeng.sun@amlogic.com>
PD#SWPL-103471
Problem:
media_modules V6 support kernel5.4.
Solution:
compatible with different symbols on 5.4 and 5.15.
Verify:
ohm
Change-Id: If76ef19734bbbdb533f63418be6e793c77deb45f
Signed-off-by: Hao Shi <hao.shi@amlogic.com>
PD#SWPL-104506
Problem:
redefine error when media buildin
Solution:
only define when buildin
Verify:
ohm
Change-Id: I2c7d229528ad52cdcec404abf4fcc68847390091
Signed-off-by: Hao Shi <hao.shi@amlogic.com>
PD#SWPL-101773
Problem:
fd is used in the upper layer to facilitate cross-process.
If the fd is closed, an exception will occur when used in the kernel.
Solution:
Change the input parameter fd to dbuf.
Verify:
sc2
Change-Id: I14788bbc7119b7a3a6d696eec495432e05e8aa12
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
PD#SWPL-101995
Problem:
In codec_mm,alloced size is greater than the value of the max alloced
Solution:
Update max allocated value
Verify:
ah212
Change-Id: I599bbedcddd06373e43cb83f947dc45c82c8c6cc
Signed-off-by: kun.liu <kun.liu@amlogic.com>
PD#SWPL-98901
Problem:
cant not modify uapi/linux/dvb header file.
Solution:
move the modification of uapi/linux/dvb to the new header file.
Verify:
no verify.
Signed-off-by: hongyu.chen <hongyu.chen@amlogic.com>
Change-Id: Ifa3a53b90124cec94ce8b6f7ec93e6a96f9a7878
PD#SWPL-96983
Problem:
the same task used the mutex tvp_protect_lock twice
Solution:
Add the conditional restrictions to avoid the repeated using of one mutex.
Verify:
ah212
Signed-off-by: lele xiang <lele.xiang@amlogic.com>
Change-Id: I820b61ed29baeeebd2714552d87cf70e0aaa8f07
PD#SWPL-94445
Problem:
the system cannot export new func for ko.
Solution:
not export cma_mmu_op() func.
Verify:
sc2_a212.
Change-Id: I8e146339f51838cc004739af77496111152df9ca
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
PD#SWPL-92587
Problem:
1. Add codec2 es type support export private
meta data use pass hdr information
Solution:
1. Add codec2 es type support export private
meta data use pass hdr information
2. Change Dmabuf alloc return fd replace phyaddress
Verify:
S905X4-AH212
Change-Id: I9847ecfcb5c819b389583bf997f3a95134c9364e
Signed-off-by: shipeng.sun <shipeng.sun@amlogic.com>
PD#SWPL-86524
Problem:
Probability of scatter memory leak
when switching resolutions frequently.
The reason is that the scatter map is an array.
Since the buffer is not limited,
the number of buffers exceeds the upper limit of the array.
When alloc scatter memory,
there is no map array record.
And the release is unsuccessful, memory leaks occur.
Solution:
increase map array size.
Verify:
sc2
Change-Id: Iad837fb8d2b80a21a368d289b6826eae5860ee61
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
PD#SWPL-89132
Problem:
use dvb-core to ko
Solution:
put aml modification to dvb-core
Verify:
not verified, compile pass
Signed-off-by: chuangcheng peng <chuangcheng.peng@amlogic.com>
Change-Id: If400a437e48a4e1c0f8193b56e2f54d06660e806
PD#SWPL-86524
Problem:
Probability of scatter memory leak
when switching resolutions frequently.
The reason is that the scatter map is an array.
Since the buffer is not limited,
the number of buffers exceeds the upper limit of the array.
When alloc scatter memory,
there is no map array record.
And the release is unsuccessful, memory leaks occur.
Solution:
Record the applied scatter context with linked list.
Verify:
sc2
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
Change-Id: Iae68510e5ab300b7ab58d7504c101556ca6d86e9