Err notes:
mpp/osal/allocator/allocator_dma_heap.c:26:27: fatal error:linux/dma-buf.h: No such file or directory
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib5f0aa77f36adfd3bea98ff16de8000a82f49720
The dma_heap is introduced in kernel 5.10.
Change-Id: Id3c116d996da461467fe380a79434ba5ea875033
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Tested on RK3588 EVB with musl-1.2.2 and gcc-10.2.
Change-Id: I10574446f46964bad5e67ab45c76060a193b8335
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
1. Move mpp_log.h to inc for external user.
2. Add mpp_debug.h for mpp internal logging.
3. Fix some warning.
4. Add log level setup function.
5. Check env log_level value in mpp_get_log_level call.
NOTE:
1. mpp internal module should use mpp_debug.h and mpp external user
should use mpp_log.h
2. Use mpp_get_log_level to update mpp_log_level when the env changed.
Change-Id: I90a55a02a72db177533013280dfe111ca3479229
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This module is for backward / forward compatiblity with external users.
1. Support compatible feature query.
2. Support update user program compatible feature update.
Change-Id: I7661f17c442eca0a0d0d57d2a35efdb5fd88be72
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
NOTE: The wait function MUST be used with lock protection.
Change-Id: I14f48795d5833c9aedc311c56139775bf07f0e79
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add SET_SESSION_FD cmd.
2. Support new delimit interface to send multi request in one ioctl.
Change-Id: I07980cc9c70b5e31585254d1ffde7bc56a3007e2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
rk3588 encoder needs buffer end address so zero size should be allowed.
Change-Id: Ie350f62c77d99f91b2ca1f02e7b4ff7afe0b0dd8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Move callback module to osal for later mpp_device callback.
2. Make callback command a pre-defined value to avoid include issue.
3. Separate callback cmd and param to separate header.
Change-Id: Ibd5cf11650a1cd2a326baddb82dc60fa1767ac87
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add dec cfg update before mpp_init.
2. Add hw_type eheck and process on hal_jpegd init.
3. Disable soc cap error log.
Change-Id: Idb5929bf1eace77d4b09205b60d0c1f0e0eb50b5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The first jpegd vdpu2 will send codec info with normal register access
operation. But some old kernel will not support the codec info cmd 403.
Then kernel will discard the whole ioctl operation and let the first
decoding task failed.
So we separate codec info cmd from the normal register access cmd.
Change-Id: Ic364c90367a0493f132dc78e76fae3d4fd6011ca
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When /dev/mpp_service is opened and be forked to another thread the
leaked fd will increase file refcnt in kernel.
Then the codec kernel session will be leaked on mpp_destroy.
Change-Id: I5bb682792c8e58591ec3a21af36e3f8a967f77fb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
There is a bug when using single drm allocator device for all buffers:
Sample:
1. external fd a is import to mpp_buffer and get handle B / fd b.
2. external fd a is import to mpp_buffer again and get handle B / fd c.
NOTE: The handle is the same in mpp for drm allocator is the same
and the handle ref_count is not increased.
4. release fd b and handle B. (NOTE: The handle B is released in kernel)
5. mmap fd c by handle B. (Crash on getting handle B in kernel)
So we should reacquire handle for fd c when it need mmap or free.
Change-Id: Ide0591f97be5e00ca71f6a16e0ff676c4ed206a5
Signed-off-by: aaron.sun <aaron.sun@rockchips-com>
Add hw capability to parser and check resolustion based on hardware
capability.
Change-Id: Id9b719b238c74d6b77f78fd8d583a3de854a94f4
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Batch mode will send multiple task to kernel at one time. And its
non-block poll is triggered by timer and looper.
This mode will reduce the ioctl overhead on ultra multi-instance case.
Main features and some notes:
1. Each client type has independence batch server.
2. Each mpp_device can attach or not attach to server independently.
3. When a device is attached to server all its tasks will be sent to
kernel through the server session not original client session.
4. The tasks are sent non-block and wait in block or non-block.
5. The batch mode can only be switch on/off when hardware is not
working.
Change-Id: I07462d852cb002259d2873e13c12f6f8a489ba8e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>