support hack for err ref check for decoder
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib61336b50dde626d85f9f6bb25950ea70149ea49
Add MPP_FLAGS_REG_OFFSET_ALONE flag to mpp_service_cmd_poll to avoid the
flag be cleared in kernel.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I27ef320ec472e871eace77c9238378abab3f2b34
https://redmine.rock-chips.com/issues/379038
When the reg_offset ioctl is not set the first time decoding will get
error on translate the pps buffer fd in kernel.
So we must set the MPP_FLAGS_REG_OFFSET_ALONE on each message.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I67f8413047adc77ca3addfe8dbed28ab1b0bcea8
NOTE: realloc may change the buffer base. This will invalid the pointer
which point to the old buffer base.
This issue will make 4 tile H.265 encoding with multi osd generate
error stream.
Change-Id: I764ee9b2097687ae9d5f2bcc8d2ff5987a636844
Signed-off-by: sayon.chen <sayon.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>
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>
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>
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>
NOTE: When MppDev is not output to mpp_dec the codec info update is
disabled.
This patch may cause kernel show the following log on old kernel:
mpp_process_request:1078: unknown mpp ioctl cmd 403
This log has no harm at all and new kernel will disable this log.
Change-Id: I26c8d78e279b5809bb2d1e51baf2c48e7f6e5a33
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Tips: User should close fd before changing the client_type. Otherwise
the kernel will leak one info structure.
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I2f99e4840d1e9a3805306be50e4afa3653f43c0c
tips:
according to rcb_size descending, and sent rcb_info to the kernel.
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I85e951d9cc1c15962e702ab9781df35e6739bb6a
New kernel use /proc/mpp_service/supports-cmd
Change-Id: I7c1d258c3652ecf5346c2e19383b90975a30a629
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Change mpp_device into a new layer for kernel drvier.
2. Separate mpp_service driver and vcodec_service driver.
3. Add mpp_service.c for /dev/mpp_service driver support.
4. Add global mpp_service info query interface.
5. Remove unused function in mpp_device.c
Change-Id: I3f53bba3aef525ad3b1f450bb55830d1eeaf29a6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>