Commit graph

4066 commits

Author SHA1 Message Date
Herman Chen
fe17ce18d8 fix[kmpp_obj]: Fix objdef index error for ioctl
The type index is for global objdef index same in kernel and userspace.
The objdefset index is the index for those defs shared to kernel.
The objdef ioctl needs to use the second index.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I5e1d76094a2f95984e7798042964b2278b37a51b
2025-10-13 17:35:24 +08:00
Herman Chen
838a8a566b fix[kmpp_obj_macro]: Fix GET_ARG0 macro
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I31d48a2e41ac492b19d325154bebc3dbb71a3aff
2025-10-13 16:52:25 +08:00
Herman Chen
15b2d77bfa fix[kmpp_obj]: Fix log format
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic91534701d1542d73005c2f62fbbdabef18adbf6
2025-10-13 14:43:08 +08:00
Herman Chen
df294a0036 fix[kmpp_buffer_test]: Fix sptr setup error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I15a6b49540d7dd52379105b05d2dbda912caf36b
2025-10-11 18:12:25 +08:00
xiaoxu.chen
e45c5c2dbb fix[mpp]: Fix compilation warnings
Change-Id: Id26f40770cf48ff20edde91f33c8a05760eb0740
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-10-11 17:22:40 +08:00
Yanjun Liao
60dfbcaace refactor[mpp]: Refactor C++ mpp to C
Change-Id: Icfe26b36d066b32355bda919e605e165399c0781
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-10-11 09:10:42 +00:00
Yanjun Liao
9a079f8c6f refactor[mpp]: Rename file type from C++ to C
Change-Id: I657ec099b95ee745a6963c0768dc97308c2c6735
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-10-11 09:10:42 +00:00
Yanjun Liao
f14c8a1e4a refactor[mpp_cluster]: Refactor C++ mpp_cluster to C
Change-Id: Icf17b9d8abf9fd23df96ea176dd61343488a6837
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-10-11 09:10:42 +00:00
Yandong Lin
d21fa529a7 fix[mpp_soc]: Add mpp_debug env reading when init
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I647ffc2df2c485d7cafb0a5b6f47a08dcbfa4601
2025-10-10 16:47:32 +08:00
Herman Chen
c3b2b9e231 chore[kmpp_buffer]: Use new ioctl cmd macro
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7be09f0b5f454c0040e772ae9405db6cef52052a
2025-09-30 15:08:10 +08:00
Herman Chen
d0d65fb27c feat[kmpp_obj]: Add kmpp ioctl trie query
1. Add kernel ioctl cmd trie query.
   It causes kernel log:
   kmpp_ioc: kmpp_ioc_ioctl: invalid ioc count 0
   Just ignore the log or update to new kmpp-develop version.
   The log will gone after kmpp-develop commit
   feat[kmpp_obj]: Add ioctl trie

2. Add objdef cmd query function.
3. Update kmpp_ioctl to support parameter "ctx".

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia3c31a7e92681fe671456f19612a199857b362a5
2025-09-30 15:07:54 +08:00
Herman Chen
23acde467b fix[test]: Fix shm test crash on old kernel
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Iec5f2ffd6f39b877f8b97abe29751543b67a6aa5
2025-09-30 15:07:43 +08:00
Herman Chen
d1f9fdc0fb chore[kmpp_ioc]: Disable ioc entry mismatch log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id9d0ae7d6ab968e37e6fdc8afb36750155d42d1d
2025-09-30 15:07:31 +08:00
Herman Chen
4db2167ff4 feat[kmpp_ioc]: Add kmpp_ioc module
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I766b0ec68f8ae572a44d96dd6ff059240ebfb698
2025-09-30 15:07:12 +08:00
Herman Chen
1c3881cbac feat[kmpp_obj]: Add ioctl related macro
1. Add ioctl ctx / in / out / in_out macro.
2. Add get objdef function.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I350a673a2302341388a68e3019299b04cce39203
2025-09-30 15:06:55 +08:00
Hongjin Li
eed8ec347f fix[hal_av1d_vdpu383]: Fix Roku player crash after seeking.
Platform: RK3576(vdpu383)
Spec: av1

Error case:
When using the Roku player, it crashes after seeking.
Because dxva->frame_refs[mapped_idx].Index == -1, cdf_buf
becomes NULL, which leads to a crash.
The deeper cause is that after seeking, playback doesn’t
start from an I-frame, so the reference frame info isn’t
ready.

Err log:
Null pointer crash stack.

Solution:
Check frame_refs index validity to avoid crashes.

Source:
test_av1_1920x1080.mp4 (Likely reproducible with other AV1 sources.)

Reported-by: Liming Xu <rimon.xu@rock-chips.com>

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Id55c2b00aa4c42eec2ccd780974e933a052864de
2025-09-30 15:06:42 +08:00
Herman Chen
29521e7f4a chore[kmpp_obj]: Change kmpp_shm get / put input
1. Use KmppShm to replace KmppShmPtr as input.
2. Add kmpp_shm_to_entry to get valid access address.
3. Add more test case.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id554e4e60f8e11e08578c91a9c30c7b173f10ab9
2025-09-30 15:06:14 +08:00
Rimon Xu
7e060500df fix[parser]: Ensure the DTS is transmitted to the frame
Support Codec list:
  - [x] H.264
  - [x] H.265
  - [x] m2vd
  - [x] m4vd
  - [x] H.263
  - [x] AV1
  - [x] AVS
  - [x] AVS2
  - [x] JPEG
  - [x] VP8
  - [x] VP9

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: Ieff2ef14482256031fcc699e6894a546c9b29502
2025-09-30 15:05:52 +08:00
Yandong Lin
c1f1c12dcf fix[h265d]: Fix rps data update issue
1. Add rps_update_flag to indicate whether to update rps.
2. Fix global cfg data len for vdpu384a.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I1c664c99f34f6dea940368496175273042b48b18
2025-09-30 15:05:34 +08:00
Herman Chen
060aa30091 fix[kmpp_obj]: Add ptr / st compatibility handling
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I114fabf181de898200f40f73a392fd8a7615a0c4
2025-09-17 17:39:58 +08:00
Hongjin Li
c49dc36799 fix[buf_slot]: Clean up invalid logs
Platform: General
Spec: jpeg

Error case:
During JPEG decoding, the buf slot does not record
frame information, so after performing frame
information comparison in the buf slot, it will
always dump mismatch information.

Err log:
sys_cfg/legacy mismatch info

Solution:
Toggle to suppress mismatch dump messages

Reported-by: Lukaß Zhang <lekco_1320@qq.com> (github: #876)

Change-Id: Id7bc34b7876a9bf415b217eba1b55dcf7a2df208
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-09-15 20:07:08 +08:00
Herman Chen
8596bbb7aa feat[kmpp_obj]: Add KmppShm allocate function
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I15cbc70c9df81586fe4f9002dcaed1f52ffcaf3a
2025-09-15 17:40:36 +08:00
Herman Chen
b0c69ecb46 fix[mpp]: Fix some typos
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ie21c286c5884139d631845162da458a7ac1803a6
2025-09-11 10:09:07 +00:00
Herman Chen
b68672dbb2 fix[kmpp_obj]: Fix obj update flag update issue
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7bee6599ac9e7328af28a4f096fe9b84eb7c1bf7
2025-09-11 10:00:44 +00:00
Herman Chen
20d045ae2c chore[kmpp_obj]: Update macros
1. Remove init / deinit function in kmpp_obj_func.h
2. Add extern "C" in kmpp_obj_func.h
3. Set register / unregister function in kmpp_obj_helper.h to be static

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic7210c8114f4a3fc9fc94f69f350c586d6bdd3d2
2025-09-11 06:27:25 +00:00
Herman Chen
a30fe2262b feat[kmpp_obj]: Add more functions
1. Add objdef find function.
2. Add preset function.
3. Add priv size on objdef init.
4. Add obj to flags / flags_size function.
5. Add pool size debug log macro.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I22a5c160d3d14bac98044a90558ef610cc89270c
2025-09-11 10:45:39 +08:00
Hongjin Li
8202197857 fix[hal_av1d]: Fix AV1 background frame decoding failure.
Platform: RK3588
Spec: av1

Error case:
Decode the AV1 bitstream from Bilibili that includes
background frames.

Err log:
Correct: mpp_av1dec: irq_status: 00001100
Error:   mpp_av1dec: irq_status: 00040100 // hw timeout

Solution:
The swreg8.sw_idr_pic_e shall be set to 1 when current frame
is an intra frame.

Source: Bilibili AV1 videos
ex: https://www.bilibili.com/video/BV11ibPzLEhe

Reported-by: redmine #575039

Change-Id: I9f83fe7025f2c7ed70c8121798f9db0bfc4b0a24
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-09-11 01:29:27 +00:00
xiaoxu.chen
ef396e9333 test[osd]: Add osd3 test for RV1126B
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
Change-Id: I177dc995ff3480b43ee9e2e75368d382ea53088d
2025-09-10 17:47:39 +08:00
Herman Chen
f507421f8b chore[mpp_enc_cfg]: Remove MppEncCodecCfg
1. Revert codec cfg to separate h264/h265/jpeg/vp8 cfg.
2. Update enc/dec/sys cfg_test print.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ida5da8a6b738fbf710e1ab590bc6b6f3438319c4
2025-09-10 17:39:55 +08:00
Herman Chen
4ed4f77864 docs: Update 1.0.11 CHANGELOG.md
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia04f68f2cbbb973b4e97b0ef97937e6ad48c6c5c
2025-09-10 17:02:04 +08:00
Herman Chen
ddb95f5a4f feat[mpp_trie]: Add info name max length record
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I0a784d6938e9a19632c20e6e92597b77c12604d9
2025-09-10 17:01:22 +08:00
Herman Chen
b313e9c018 chore[dec_test]: Remove unused code
https://github.com/rockchip-linux/mpp/issues/901

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7cf65a6f277caced12960ca50885c2bab5ed1e72
2025-09-10 16:59:06 +08:00
Herman Chen
5d9da6f29e feat[mpp_enc_cfg]: Separate init function
Add mpp_enc_cfg_init_k for kernel encoder config init.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I4ebdc179b27115d72a2efa213405cbb4dca564d0
2025-09-10 16:57:08 +08:00
Yandong Lin
fdba12d3fa fix[h265e]: Remove unused buffer
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ief949dd9a1f00252e0268007f9dac1449578d997
2025-09-03 09:38:17 +00:00
Herman Chen
fb23f69ca7 chore[mpp_singleton]: Update name print
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I24c4ce23032a8b264837040425123e0027f90578
2025-09-03 12:03:49 +08:00
Herman Chen
aa15b9b5bd refactor[sys_cfg]: Refactor C++ sys_cfg to C
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I59f4e3b13ba5e49ae34bb1b4886f37bd3341ce56
2025-09-03 11:48:55 +08:00
Herman Chen
ced006c2a8 refactor[test]: Refactor C++ test file to C
1. Refactor test cpp files to c.
2. Update test license to Apache-2.0 OR MIT.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I02f3e23ddae8435ca851a5f0164f04ef5f51ccc2
2025-09-03 11:15:38 +08:00
Herman Chen
ca061993ef refactor[osal]: Refactor C++ osal file to C
1. Refactor osal cpp files to c.
2. Update osal license to Apache-2.0 OR MIT.
3. Remove windows support.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic5545d861676880f7a6247515404d585cd4fcef5
2025-09-02 17:49:14 +08:00
Herman Chen
6666925dab refactor[rc]: Refactor C++ rc/rc_base to C
Change-Id: Iae123d5bc76e74b06a09655829de3ef0508ebd30
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2025-09-02 15:04:56 +08:00
Yandong Lin
8beb56a735 fix[mpp]: Add null check for sync pkt buffer
Change-Id: I5e17ce26ee3af2232d97a414f52820122e2402f9
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-09-02 03:26:29 +00:00
Yanjun Liao
d135040c83 fix[mpp_meta]: Add user data deep copy support
Platform: all
Spec: all

Deep copy user data/datas in meta to ensure async safety
and avoid use-after-free

Change-Id: Iebc42563b7700a1f3ca24a535a446cc1f6a7c451
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-09-02 10:55:34 +08:00
timkingh.huang
6588b71f2b fix[mpp_meta]: Add KEY_NPU_UOBJ_FLAG and KEY_NPU_SOBJ_FLAG
UOBJ: deliver userspace buffer for rk3588 and rk3576
SOBJ: deliver shared memory buffer for rv1126b

Sync to kmpp-develop patch with the same log:
If596371639eaedb01d6900c737d1f7fec49bf8d4

Change-Id: I8927f6341b5d3f94bf52af32c02b75cd24ad0681
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2025-09-01 17:35:25 +08:00
Yanjun Liao
9a6bf0e0b0 fix[kmpp_obj]: Fix obj ioctl typo
Use "flags" instead of "flag" for KmppIoc entry

Change-Id: I87b0557a09cfad87d825836de1c6be72478957e5
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-08-28 14:52:11 +08:00
Herman Chen
63343c7761 fix[mpp_trie]: Fix get err node issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia4db61137545f55be0ef08acf06f8d6a439297e2
2025-08-28 09:46:10 +08:00
Alexander Koval
90c205ca47 fix[vdpp] Fix building tests against musl libc
Reported by https://github.com/rockchip-linux/mpp/pull/893

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I76c362823337f6dba5fcffe4aac43e2798fbfce1
2025-08-25 09:20:56 +08:00
Alexander
07805f336b fix[script]: Prepend bash with /usr/bin/env
Reported by https://github.com/rockchip-linux/mpp/pull/890

Change-Id: I066dad0e3cef66546994406394daf29df4a67849
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2025-08-22 09:10:30 +08:00
xiaoxu.chen
54bdc5ddbc refactor[enc]: Use KmppShmPtr to represent osd buffer
Change-Id: I2211b806d4b4a065faf1f0fa5a240e104bbb30ab
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-08-13 14:55:14 +08:00
Yandong Lin
0ce028aaa9 fix[kmpp_buffer]: Close fd when deinit
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie12c20ecaa6d2b090d257e8fe1ba8f578da4a054
2025-08-12 09:27:30 +00:00
xiaoxu.chen
317fce0bee chore[hal]: Organize the relevant processes for vepu fmt
1. Move Vepu fmt from vepu541_common to vepu5xx_common
2. Create vepu580_common
3. Add vepu ARGB4444, ARGB1555, AYUV1BPP, AYUV2BPP

Change-Id: I372e35d9ccf93ecf082d4a279c03841bef3bc581
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-08-12 03:40:29 +00:00
xiaoxu.chen
bb2f5bba51 refactor[kmpp]: Fix kmpp obj compilation warning
Change-Id: I081c631b1e921b67324e81dc193732b338aefe17
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-08-12 10:39:52 +08:00