Integrate linux-seco-imx/seco_lf-5.10.y-mx8m_vpu
LF-5607 imx8mm: vpu_enc: correctly recover encoder status when power resume
Rewrite mirror_regs to hw_regs only in encoding finished(irq_status & 0x04), also need to clear 'reg_corrupt'.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25830-1 imx8mm: vpu_enc: use file handle indicate which instance is occupying encoder core
Previously, use 'currrent->pid' indicate which instance is occupying the core, which might has issue in below case: Application(pid_0) create a new thread(pid_1) to do encode, thus current->pid = pid_1. If directly 'kill -9 pid_0', will close encoder in pid_0, hence, 'dev->pid(pid_1) != pid_0', and some dev flag will not be cleaned, which will impact following encode.
File handle is unique for each instance, it is more reasonable and safe to use file handle to indicate which instance is occuping encoder core.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com
--
LF-7236-3: imx8m: vpu: don't return EPOLLERR if qbuf isn't called
disable quirk_poll_must_check_waiting_for_buffers, this quirk check only affect capture queue, and it's set by V4L2 for backwards compatibility reasons.
But it's not used for m2m device, the vpu decoder is m2m device, but not implement using m2m helper function.
just keep consistent with the m2m implementation
Signed-off-by: Ming Qian ming.qian@nxp.com Tested-by: xiahong.bao xiahong.bao@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com
--
LF-7290: imx8m: vpu: wakeup poll and return epipe if only enqueue invalid codec config data
the eos event is deprecated, if the error occurs during parsing sequence header, driver can wakeup the poll waiting, and set last_buffer_dequeued, then the client can get the errno "-EPIPE"
Signed-off-by: Ming Qian ming.qian@nxp.com Tested-by: Xu Mao mao.xu@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com
--
LF-7236-2: imx8m: vpu: handle seek first, then source change
if source change event is triggered during seek, handle seek first, it requires that the capture streamoff and on for seek and source change separately
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com Tested-by: xiahong.bao xiahong.bao@nxp.com
--
LF-7236-1: imx8m: vpu: return the queued buffer before source change
if source change event is not received, driver will prevent streamon capture really, if do seek in this case, return the queued but not actived buffer.
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com Tested-by: xiahong.bao xiahong.bao@nxp.com
--
LF-7019: imx8m: vpu: report video full range if colour_description_present_flag is false
In H264/H265 spec, the video_full_range_flag is not controlled by colour_description_present_flag,
so if colour_description_present_flag is false, the sequence header still may report the video_full_range_flag
and when the video_full_range_flag syntax element is not present, the value of video_full_range_flag shall be inferred to be equal to 0.
so when sequence header is found, report the parsed video_full_range_flag
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com
--
LF-6690-4:imx8m:vpu: simplify the calculation of sizeimage
refine the function verifyPlanesize
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com
--
LF-6690-3: imx8m: vpu: recalculate sizeimage after source change
when daemon report source change event to driver, driver need recalculate the sizeimage
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com Tested-by: Ming Zhou ming.zhou@nxp.com
--
MA-20476: imx8m:vpu: clear resolution change count when reset decoder
driver will prevert to enqueue capture buffer to daemon if resolution change is never received, after reset decoder, driver needs to clear the resolution change count to prevert to enqueue capture buffer to daemon.
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com
--
LF-6690-2:imx8m:vpu: correct the sizeimage of nv16 and nv24
Add the missing sizeiamge of chroma
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com
--
LF-6697: imx8m: vpu: calculate default bytesperline according pixel format
Driver use the width as the default bytesperline, no matter what pixel format is. The it requires the user set correct bytesperline, if not, some error occurs.
Add some protection in driver that calculating default bytesperline according format and width
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com
--
LF-6691: imx8m: vpu: correct V4L2_XFER_FUNC_LINEAR to V4L2_XFER_FUNC_NONE
V4L2 has defined V4L2_XFER_FUNC_NONE for linear transfer characteristics
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com
--
LF-6690: imx8m: vpu_enc: support contiguous and non contiguous formats
To be compatible with Android, driver need to support contiguous formats, and the encoder can support non contiguous formats, so support contiguous and non contiguous formats in the same time.
Support NV12 NV12M YUV420 YUV420M NV21 NV21M.
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: TaoJiang tao.jiang_2@nxp.com
--
LF6570: IMX8M VPU:solve fps setting error
1.move fps setting to output queue
Signed-off-by: TaoJiang tao.jiang_2@nxp.com
--
LF6572: IMX8M VPU:solve mult-instance test fail
1.add invoke timeout
Signed-off-by: TaoJiang tao.jiang_2@nxp.com
--
LF-6451: imx8m: vpu_enc: correct the pixel format for non contiguous formats
For the format that has non contiguous planes, we should use the non contiguous format.
use V4L2_PIX_FMT_NV12M instead of V4L2_PIX_FMT_NV12 use V4L2_PIX_FMT_YUV420M instead of V4L2_PIX_FMT_YUV420 use V4L2_PIX_FMT_NV21M instead of V4L2_PIX_FMT_NV21
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com
--
LF-6130: imx8m: vpu_dec: call poll_wait on the first invocation
vsi_dec_capture_on will be called after source change event. so if user poll on capture queue before it's really stream on, the poll will wait until timeout.
call poll_wait on the first invocation on all the potential queues of interest
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com
--
LF-5945-2: imx8m: vpu_dec: remove check reschange in driver
after daemon send reschange event to driver, it requires driver to send captureon cmd to it, otherwise it keeps waiting. we add this check to compatible with ffmpeg. if the source change event is handled by capture streamon or start cmd, driver can always notify userspace a source change event.
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com
--
LF-5945: LF-5924: imx8m: vpu_dec: report source change event when bit depth is changed
Driver will report all possible format in enum_fmt before source change event, so client may choose the 10bit format, for example nv12_10le. but if the stream is 8bit, when the sequence header is parsed, only 8 bit format is supported, so need to send source change event to client, then client can setup capture with 8bit format.
If the source change event is missed, the result may be unexpected
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com
--
LF-5924: imx8m: vpu_dec: set last flag before buffer done
the flag V4L2_BUF_FLAG_LAST should be set before vb2_buffer_done, v4l2 core can set the last_buffer_dequeued to the vb2_queue, then any attempt to dequeue more CAPTURE buffers beyond the buffer marked with V4L2_BUF_FLAG_LAST will result in a -EPIPE error from VIDIOC_DQBUF().
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: Zhou Peng <eagle.zhou>
--
LF-5776-2 imx8m: vpu_dec: correct the sizeimage of format rfc and rcfx
If VP9 decoding caputre format is 'RFC0', the capture buffer needs contain luma_table and chroma_table, so correct the sizeimage of format rfc and rcfx. Driver can't use the sizeimage reported by daemon directly, as daemon report the sizeimage according bit depth, not format, so the reported sizeimage maybe inaccuracy.
Besides, driver need to notify source change event if daemon has stream on the capture.
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: Zhou Peng <eagle.zhou>
--
LF-5776 imx8m: vpu_dec: take a big sizeimage between driver calculated and daemon reported
If VP9 decoding caputre format is 'RFC0', the capture buffer needs contain luma_table and chroma_table, thus, total buffer size is bigger than driver calculated size according to width and height. In order to meet decoding needs, we need take a big sizeimage between driver calculated and daemon reported.
Signed-off-by: Shijie Qin shijie.qin@nxp.com
--
LF-5736 imx8m: vpu_dec: report source change event if capture buffers are not sufficient
VPU start decode until the number of capture buffers received is more than or equal to the minimum required number, however, user might cannot queue all buffer after seek due to some buffers hold on display, which will lead to user and VPU wait for each other. In order to avoid such issue, report source change event to user is needed if it capture buffers are not sufficient, and user will request additional buffers generally.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com
--
LF-5702 imx8m: vpu_dec: skip pending capture streamon if need notify source change
Driver need pending first capture streamon until receive source change event, if need notifies this event to user that means user will set capture format and streamon again. So, driver need skip previous pending capture streamon, otherwise, capture streamon - streamoff - streamon will lead to vpu drop some decoded frames.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-5657 imx8m: vpu_dec: update capture format when set output in the initial
The latset(version 1.20) gstreamer setup sequence is output set format, capture get format, capture set format, output/capture streamon. Gstreamer does not depond on driver send source change event at first resolution.
Driver need update capture format when set output, otherwise, gstreamer will get wrong resolution on capture at beginning, which will lead to driver send source change event and do unexpected capture streamoff/on operations.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-5645: imx8m: vpu: imx8m: vpu: implement v4l2_buffer sequcne and 'V4L2_BUF_FLAG_ERROR'
If consumed bitstream buffer but no decoded frame, return output v4l2_buffer with 'V4L2_BUF_FLAG_ERROR' flag. If decoded frame but can't output it, increase capture buffer sequence to notify user there has one frame be dropped.
Use output v4l2_buffer 'V4L2_BUF_FLAG_ERROR' flag and capture buffer sequence strategy could replace 'V4L2_EVENT_SKIP' event.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com
--
MA-20005-13 hantro_v4l2: Fix build error exposed by -Wshift-count-overflow
Fix below build error: drivers/mxc/hantro_v4l2/vsi-v4l2.c:699:14: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .dma_mask = DMA_BIT_MASK(64), ^~~~~~~~~~~~~~~~ include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK' ^ ~~~
Signed-off-by: Jindong Yue jindong.yue@nxp.com Reviewed-by: Shijie Qin shijie.qin@nxp.com
--
LF-5604 imx8m: vpu_dec: handle invalid timestamp which tv_sec or tv_usec is negative
If tv_usec is negative, which convert to u32 is a big positive value, thus will confusing timestamp manager. Use 'BUF_FLAG_TIMESTAMP_INVALID' to idicate such invalid timestamp which tv_sec or tv_usec is negative.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-5570 imx8m: vpu_enc: implement 'V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET' v4l2-control
Implement 'V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET' for H264/HEVC. Since HEVC don't have such control, HEVC reuse it for now. If there's any change from kernel, it's easy to change in API.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-5187 imx8m: vpu: safely release v4l2_ctx
- Add lock for vb2_queue operation in release_ctx() to avoid vb2_queue synchronization issue.
- Add refcnt for ctx to guarantees that ctx is not freed before each user finishes using it.
- Check vb buffer before reference it.
[ 1127.768934] WARNING: CPU: 1 PID: 1042 at drivers/media/common/videobuf2/videobuf2-core.c:1960 __vb2_queue_cancel+0x1b0/0x2c [ 1127.917829] Call trace: [ 1127.920275] __vb2_queue_cancel+0x1b0/0x21c [ 1127.924459] vb2_core_queue_release+0x28/0xa0 [ 1127.928820] vb2_queue_release+0x14/0x20 [ 1127.932743] release_ctx+0x160/0x244 [ 1127.936320] vsi_v4l2_release+0x3c/0x7c [ 1127.940156] v4l2_release+0xc0/0xf4
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-5212 imx8m: vpu_enc: implement 'V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE' v4l2-control
Implement 'V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE' for H264. Since HEVC don't have such control, HEVC reuse it for now. If there's any change from kernel, it's easy to change in API.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-5211 imx8m: vpu_dec: compatible with ffmpeg about report source-change
- No need check 'needed_dpb_nums' on first source change since it always is '0' before.
- Width/height align to pixel step of format when set_fmt(), since width/height of vpu reported are align to pixel step of format.
- Before source change, capture crop equal to setting width/height and not align it.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-5210 imx8m: vpu_enc: refine QP related v4l2-controls
- Add max/min qp v4l2-controls for HEVC.
- qpMaxI/qpMinI set by xxx_MAX/MIN_QP too.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-4984 imx8m: vpu_dec: Uninitialized scalar variable
Fix a coverity issue about using uninitialized value. (coverity ID 18179917)
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-4929 imx8mx vpu: modify supported resolution matrix
Modify supported resolution matrix according to hantro hardware spec, in order to support as many resolutions as possible.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-4836 arm64: imx8mx vpu: make sure output streamon cmd is seet to daemon after buffer is queued
the cmd V4L2_DAEMON_VIDIOC_STREAMON_OUTPUT should be sent to daemon when the minimum needed buffers are queued. so we should make sure that when buffers are queued, we send it to daemon. These is a bug that driver may not send it to daemon due to some statue issue.
Signed-off-by: Ming Qian ming.qian@nxp.com Reviewed-by: Shijie Qin shijie.qin@nxp.com
--
LF-4769 arm64: imx8mx vpu: compatible with ffmpeg
Make decoder driver compatible with ffmpeg:
- Capture streamon until receive source change event;
- If client set accurate capture format in advance, driver doesn't report source change event if format same as set;
- Correct 'decbufinfo->OutBufSize'.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
Revert "MLK-25709-12 arm64: imx8mx vpu_dec: fix v4l2-compliance fail of VIDIOC_CREATE_BUFS"
In some seek&reschange stream cases, user(gstreamer) try to create_buf() with old sizeimage which smaller than current expected, thus will return fail. This is common flow in gstreamer, but driver no good solution to handle it currently. So disable vidioc_create_bufs() temporarily, disable it not affect nomal use except for a not support create_buf warning when run v4l2-compliance.
This reverts commit cb1cffc3a0e8846d331b9a4244a2964a37599b4c.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
LF-4756 arm64: imx8mx vpu: remove sizeimage alignment
imx8m vpu hardware no limitation about buffer size align to page boundary(4K), hence, we could remove sizeimage alignment in driver, otherwise possible meet sizeimage not match problem when connect other components such as camera.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25705 arm64: imx8mx vpu_enc: separate CAPTURE and OUTPUT streamoff operation in encoder
Use 'V4L2_DAEMON_VIDIOC_STREAMOFF_OUTPUT/CAPTURE'/ 'V4L2_DAEMON_VIDIOC_STREAMOFF_OUTPUT/CAPTURE_DONE' cmd/event to communicate with daemon. Perviously, 'V4L2_DAEMON_VIDIOC_STREAMOFF' used for notify daemon destroy instance, rename it to 'V4L2_DAEMON_VIDIOC_DESTROY_ENC'.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-13 arm64: imx8mx vpu_dec: fix v4l2-compliance fail of format operations
Decoder: refine code about VIDIOC_G/S_FMT, VIDIOC_TRY_FMT and Cropping.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-12 arm64: imx8mx vpu_dec: fix v4l2-compliance fail of VIDIOC_CREATE_BUFS
Decoder: add vsi_dec_create_bufs to vsi_dec_ioctl.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-11 arm64: imx8mx vpu_dec: fix v4l2-compliance fail of VIDIOC_(TRY_)DECODER_CMD
Decoder: add vsi_dec_try_decoder_cmd to vsi_dec_ioctl.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-10 arm64: imx8mx vpu_dec: fix v4l2-compliance fail of VIDIOC_G/S_PARM
Decoder: actually donot support VIDIOC_G/S_PARM, remove vsi_dec_g/s_parm from vsi_dec_ioctl.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-9 arm64: imx8mx vpu_dec: fix v4l2-compliance fail of VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT
Decoder: use v4l2_ctrl_subscribe_event for V4L2_EVENT_CTRL, v4l2-core will help to add v4l2_ctrl_sub_ev_ops.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-8 arm64: imx8mx vpu_dec: fix v4l2-compliance fail of VIDIOC_G/S/ENUMINPUT
Decoder: the driver donot support VIDIOC_G/S/ENUMINPUT, remove vsi_dec_s_input from vsi_dec_ioctl.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-7 arm64: imx8mx vpu_enc: fix v4l2-compliance fail of format operations
Encoder: refine code about VIDIOC_G/S_FMT, VIDIOC_TRY_FMT and Cropping.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-6 arm64: imx8mx vpu_enc: fix v4l2-compliance fail of CREATE_BUFS
Encoder: add vsi_enc_create_bufs to vsi_enc_ioctl.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-5 arm64: imx8mx vpu_enc: fix v4l2-compliance fail of VIDIOC_(TRY_)ENCODER_CMD
Encoder: add vsi_enc_try_encoder_cmd to vsi_enc_ioctl.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-4 arm64: imx8mx vpu_enc: fix v4l2-compliance fail of VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT
Encoder: use v4l2_ctrl_subscribe_event for V4L2_EVENT_CTRL, v4l2-core will help to add v4l2_ctrl_sub_ev_ops.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-3 arm64: imx8mx vpu_enc: fix v4l2-compliance fail of VIDIOC_G/S_PARM
- The v4l2 driver not support 'V4L2_CAP_READWRITE', hence, set writebuffers / readbuffers to 0.
- capturemode / outputmode unused, better don't set them, or v4l2-compliance report error or warning.
- Set valid timeperframe.denominator/numerator.
- Set param capability to 'V4L2_CAP_TIMEPERFRAME'.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-2 arm64: imx8mx vpu_enc: fix v4l2-compliance fail of VIDIOC_G/S/ENUMINPUT
Encoder: the vpu driver donot support v4l2_ioctl of S_INPUT/G_INPUT, remove vsi_enc_s_input from vsi_enc_ioctl.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25709-1 arm64: imx8mx vpu: fix v4l2-compliance fail of unlimited open
Extend max instances to 200 to pass unlimited open testing. VPU no limitation of instance count, so, the instance count limited by memory space.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25703 arm64: imx8mx vpu: not support invoke daemon on Android
To compatible with Android GKI image, do not support invoke daemon on Android.
- Init invoke_vsidaemon param according CONFIG_ANDROID.
- Function call_usermodehelper() is invalid in GKI image, even prohibit build in symbol.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com Reviewed-by: Ming Zhou ming.zhou@nxp.com
--
MLK-25700 arm64: imx8mx vpu: release daemon instance effectively
When release ctx, notify daemon release relevant instance if it exists.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MLK-25757 imx8mm: vpu:g1/g2: support disable g1/g2 individually
Support disable g1/g2 individually in dts. There is no binding of core index, dynamically set it according probe sequence.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com
--
MA-20005-12 hantro_vc8000e: Fix build error exposed by -Wunused-variable
Fix below two build errors: drivers/mxc/hantro_vc8000e/hx280enc_vc8000e.c:149:30: error: unused variable 'asic_status' [-Werror,-Wunused-variable] static volatile unsigned int asic_status; ^
drivers/mxc/hantro_vc8000e/hx280enc_vc8000e.c:702:13: error: unused function 'hantroenc_ioctl32' [-Werror,-Wunused-function] static long hantroenc_ioctl32(struct file *filp, unsigned int cmd, unsigned long arg) ^
Signed-off-by: Jindong Yue jindong.yue@nxp.com Reviewed-by: Shijie Qin shijie.qin@nxp.com
--
MLK-25830-2 imx8mp: vpu_enc: use file handle indicate which instance is occupying encoder core
File handle is unique for each instance, it is more reasonable and safe to use file handle to indicate which instance is occuping encoder core.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com
--
LF-4670 arm64: imx8m: vpu: check regs.offset/size accurately
Directly check 'regs.offset + regs.size', instead of '(regs.offset + regs.size) / 4', that has a risk if it isn't multiple of 4. (coverity ID 17802820)
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MA-19423-1 arm64: imx8mp: vpu: vc8000e: add new ioctl to read/write HW registers
Userspace could select through the new ioctl to read/write VPU HW registers, instead of through mmap HW registers. This method generally used for secure mode that avoid userspace directly access HW registers.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com
--
LF-7280: amr64: imx8mq: vpu: solve 8mq suspend problem
1.add registers protection when suspend 2.add sem to ensure save work scene after one decode operation
Signed-off-by: TaoJiang tao.jiang_2@nxp.com
--
MLK-25290: arm64: imx8mx: vpu: remove dependence to device_cooling
replace device_cooling notifier with thermal_of_cooling_device_register()
Signed-off-by: Zhou Peng eagle.zhou@nxp.com
--
LF-3332-1: arm64: imx8: vpu: fix build errors due to API change
hantro g1/g2/h1/vc8000: replace get_fs()/set_fs() with force_uaccess_xxx()
Signed-off-by: Zhou Peng eagle.zhou@nxp.com
--
LF-4936 imx8mm: vpu_enc: potential risk during suspend/resume operation
In EncAsicFrameStart(): (1) set sw mirror registers through EncAsicSetRegisterValue() (2) set hw registers through EWLWriteReg() (3) set hw enable register to trigger HW if suspend happen between (1) and (3), e.g. most hw registers will be cleared before trigger HW, as a result, 'ASIC_STATUS_ERROR' will be reported after EWLWaitHwRdy().
Add new ioctl 'HX280ENC_IOCG_EN_CORE' to trigger HW. During suspend, if HW is reserved, backup HW registers to mirror_regs; if in encoding, enter suspend until encode current frame finish.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MA-19423-3 arm64: imx8mm: vpu: avoid tepedef risk
Include linux/types.h in uapi/linux/hx280enc.h to avoid tepedef risk in userspace.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: ming_qian ming.qian@nxp.com
--
MA-19423-2 arm64: imx8mm: vpu: h1: add new ioctl to read/write HW registers
imx8mm vpu h1 encoder: add new ioctl to read/write VPU HW registers.
Signed-off-by: Shijie Qin shijie.qin@nxp.com Reviewed-by: Zhou Peng eagle.zhou@nxp.com