Commit Graph

24 Commits

Author SHA1 Message Date
Hao Shi 5ef408908c dmabuf_manage : CF0 add secmem v3 64bit addr support [1/1]
PD#SWPL-176629

Problem:
add secmem v3 64bit addr support

Solution:
add secmem v3 64bit addr support

Verify:
None

Change-Id: Id5c6bca16e8620140770b7dc9f6b9dbddc395850
Signed-off-by: shipeng sun <shipeng.sun@amlogic.com>
2024-08-12 22:09:13 -07:00
Hao Shi 4a443340db codec_mm: scatter owner register [1/1]
PD#SWPL-176775

Problem:
scatter keep size need expand for vdin

Solution:
scatter user can set scatter keep size
by register scatter owner.

Verify:
ohm

Change-Id: I4be8af6dff0454cda9191666ec48cd1e03464127
Signed-off-by: Hao Shi <hao.shi@amlogic.com>
2024-07-15 02:11:29 -07:00
shipeng sun e49480a2f7 dmabuf_manage: CB1 Remove unused code [1/1]
PD#SWPL-176200

Problem:
Remove dmabuf_manage and secure vdec heap's unused code

Solution:
Remove dmabuf_manage and secure vdec heap's unused code

Verify:
ohm_wv4

Change-Id: Ib88ff7393c41767e275a4db26035bdc00ba2d4db
Signed-off-by: shipeng sun <shipeng.sun@amlogic.com>
2024-07-08 05:57:10 -07:00
gan.zhang 6fca55e0c8 codec_mm: add config for scatter alloc from DMA32. [1/1]
PD#SWPL-143076

Problem:
mmu copy cannot access address over 4G.

Solution:
set alloc from dma32 zone when config_alloc_flags bit0 is set.

Verify:
S5

Change-Id: I142f182dff1509e591d20ed0e440a6851f8d7029
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
2024-03-28 03:57:07 -07:00
lele xiang e934d0f0f9 codec_mm: CF1 provider the interface of preallocing tvp_pool. [1/2]
PD#SWPL-155060

Problem:
preallocing tvp_pool for av1 fg playback

Solution:
provider the interface of preallocing tvp_pool for decoder driver

Verify:
ap222

Change-Id: Iaad60b432a7a9ff1147a3b292120aa12e034dcf8
Signed-off-by: lele xiang <lele.xiang@amlogic.com>
2024-02-01 04:11:25 -07:00
Nanxin Qin e8045f9b34 media: CF1 Adds debugfs for codec status management. [1/1]
PD#SWPL-145646

Problem:
Adds debugfs for codec status management.

Solution:
Add codec state module, mainly collect and
manage codec status information, and facilitate
the management of the configuration of each module.

Verify:
ohm

Change-Id: I8f877a954f9873c4aa4d632e007a67c0a41ff2b1
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2023-11-15 20:27:47 -07:00
rong.quan 04275ad21a common: CB2 fix typo error . [1/1]
PD#SWPL-144466

Problem:
function name has typo error.

Solution:
fix typo error.

Verify:
ohm

Change-Id: I89e3d79da8ada1d445bc0e5a32b7502baaef3b46
Signed-off-by: rong.quan <rong.quan@amlogic.com>
2023-11-13 00:01:39 -07:00
Nanxin Qin 0a10d170ea media: CF1 Extends the type of dmabuf for info dumping. [1/1]
PD#SWPL-142144

Problem:
Extends the type of dmabuf for info dumping.

Solution:
It supports the dump of commonly used of dmabuf info,
which are UVM, ES, and dmabuf heap. Please refer to
the confluence instructions for specific usage.

Verify:
ohm

Change-Id: I5f1482043c46ef983c37277bec1eb49cf70bd4fd
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2023-10-18 08:13:43 -07:00
zhentao.guo 3edbf5ef50 media: CB1 Fix cts CRC flaky issue [1/1]
PD#SWPL-139469

Problem:
Dirty date in cacheline may pollute data in memory when
flush cacheline

Solution:
Use noncache mapping in afbc decompress lib

Verify:
T7C

Change-Id: I4f6ed2ad6473c0aaab80d175663434b38dfb2af5
Signed-off-by: zhentao.guo <zhentao.guo@amlogic.com>
2023-10-09 23:18:47 -07:00
Jianxiong Pan 1d4c7262e4 mm: fix crash when enable debug spinlock. [1/1]
PD#SH-16324

Problem:
enable CONFIG_DEBUG_SPINLOCK, system crash.

Solution:
not neable cma_mmu_op function when enable debug spinlock.

Verify:
local.

Change-Id: I61b7edb7c5026b72b7ac6e66c6e19304eca00a61
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2023-09-17 22:49:11 -07:00
shipeng.sun 9b4080fc3a dmabuf_manage: use secmem v2 implement secure vdec heap [1/3]
PD#SWPL-129785

Problem:
use secmem v2 implement secure vdec heap

Solution:
use secmem v2 implement secure vdec heap.

Verify:
sc2

Change-Id: If81debfd32ca00e2cf361c094e71392677d042de
Signed-off-by: shipeng.sun <shipeng.sun@amlogic.com>
2023-07-20 05:12:22 -07:00
Jianxiong Pan c0bb9c0310 mm: clear tvp secure memory use kprobe. [1/1]
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>
2023-06-21 01:09:27 -07:00
shihong.zheng ee1d37b567 codec_mm: CB1 add lock for list operation. [1/1]
PD#SWPL-126795

Problem:
release callback list is found corruption
and crash.

Solution:
change spinlock range, add list_del_init to
spinlock range.

Verify:
T963D4

Change-Id: I1a234172a948194f69928ed941f68d15954bee28
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
2023-06-20 21:00:37 -07:00
shipeng.sun 9b3a4a7fd9 dmabuf: CF2 Support secure stream in dynamic free [1/5]
PD#SWPL-103836

Problem:
Support secure stream in dynamic free

Solution:
1.Support secure stream in dynamic free

Verify:
S905X4

Change-Id: Ifbf4065b57d539ff783f843e8089cda253abcd0a
Signed-off-by: Hangyu Li <hangyu.li@amlogic.com>
Signed-off-by: shipeng.sun <shipeng.sun@amlogic.com>
2023-05-05 03:23:45 -07:00
miaohong chen 98b3b5414e v4ldec: CF2 scatter mem saving optimization [1/2]
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>
2023-03-12 23:13:30 -08:00
Jianxiong Pan 5498b9ad89 tvp: add cma_mmu_op api for clear or set page pte. [1/1]
PD#SWPL-109588

Problem:
serror when access tvp secure area.

Solution:
add page pte operation api.

Verify:
t7c.

Change-Id: I200b9d4fada3c3697caaae0660e0615ebb9beefb
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
Signed-off-by: Hao Shi <hao.shi@amlogic.com>
2023-02-12 18:42:11 -08:00
miaohong chen 2d7aacf4b3 dma_manage: CB2 Optimize related interfaces input parameters. [1/1]
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>
2022-12-07 02:02:30 -07:00
Hao Shi 77986697bc codec_mm: enable codec_mm_scatter 64bit addr support. [1/1]
PD#SWPL-98294

Problem:
codec_mm_scatter can not cross 4g addr.

Solution:
enable codec_mm_scatter 64bit addr support.

Verify:
t7

Change-Id: I9829c29e40ddeb551a50fabcb7ff555fda79e99b
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
Signed-off-by: Hao Shi <hao.shi@amlogic.com>
2022-12-05 21:08:11 -07:00
shipeng.sun f19a58f503 damabufmanage: CF1 Add codec2 clear es support [1/1]
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>
2022-09-07 20:06:45 +08:00
shipeng.sun 0c40a7cedb damabufmanage: CF1 support alloc cma memory [1/1]
PD#SWPL-88808

Problem:
1.support alloc cma memory by dmabufmanager
2.update secure vdec dmabuf pool

Solution:
1.support alloc cma memory by dmabufmanager
2.Update secure vdec dmabufpool capacity by maxallocsize

Verify:
S905X4-AH212

Change-Id: I3ca8ceec06097eb848072cc45d5b7bd7b3d854ac
Signed-off-by: shipeng.sun <shipeng.sun@amlogic.com>
2022-09-07 20:06:43 +08:00
Miaohong Chen 0d2fdc169a codec_mm: CB2 Scatter memory leakage. [1/1]
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>
2022-09-07 20:06:43 +08:00
miaohong chen f02304af39 codec_mm: CB2 Scatter memory leakage. [1/1]
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
2022-09-07 20:06:42 +08:00
shipeng.sun 66a6d829f7 dmabuf: Support dmabuf manager implement v3 [1/1]
PD#SWPL-89594

Problem:
Support dmabuf manager implement v3

Solution:
Support dmabuf manager implement v3, sync some code from
kernel 54.

Verify:
ohm

Change-Id: Ifd46d14c6de1514306f21a0ff10f21565f1600ca
Signed-off-by: shipeng.sun <shipeng.sun@amlogic.com>
2022-09-07 20:06:42 +08:00
hao.shi f34460cb00 codec_mm: CF2 codec_mm & vfm [1/1]
PD#SWPL-72686

Problem:
add codec_mm & vfm

Solution:
add codec_mm & vfm

Verify:
s4d

Change-Id: Icecc654eaa7468a17da97d0513adae849651d456
Signed-off-by: hao.shi <hao.shi@amlogic.com>
2022-03-25 01:01:07 -07:00