Skip to content

Integrate meta-seco-imx/linux-seco-imx/seco_lf-5.10.y-mx8m_vpu

Commit: https://git.seco.com/edgehog/layers/seco/meta-seco-imx/-/commit/9886e8f07cb1bf295f24b8a8c21075186f55e77a

Integrate linux-seco-imx/seco_lf-5.10.y-mx8m_vpu

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/5d618253cafccf554014dbb9e16bc360607c5c08

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/718e348c2e04b9df0e5606e1a49fe9adecebcd2b

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/13627d4864db4ec2819f82a69459973f3727b0cb

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/eedf2da8ed00ff5d55f2f4a48dd477b5a26472df

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/adc113e078e543c28fe45a880c11caa08ebf39f0

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/f095b5dea01397035ab32ab354b7146dd819f6a9

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/d60b49e87a6fed600ffe9256540015614f5cc91d

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/228f5e9c5e047ae79fbaa96aaedf50d6d6bf9c30

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/4702c0292b5488303b0d9246d767a208c582f79c

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/b962f2f3b2d98646185297b615780a7806c8b82a

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/ded7e7be3a39a184311cfe4f0c238c0844c0d785

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/543c480893aaf95c660058368671daf144b35779

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/26a43639e17ce5ff00a41b3a87c10c0c9cc0cda1

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/12f5503d1a322bb99fd9b8f1608a4ac32b220a9c

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/9b90250fd8bed2137eb3f186c4fc633056e8d3b4

LF6570: IMX8M VPU:solve fps setting error

1.move fps setting to output queue

Signed-off-by: TaoJiang tao.jiang_2@nxp.com

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/f2a24f065c298701bc5ffd26509102e922d59fa0

LF6572: IMX8M VPU:solve mult-instance test fail

1.add invoke timeout

Signed-off-by: TaoJiang tao.jiang_2@nxp.com

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/5f4efd274e85c84d6df59010a5d82eae3701b61f

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/49b4e78f3a9f89e92070cd187bea798dd959fbfc

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/dd3dd48471844b41fcd73af8745fe4b336b049cf

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/1445ad84c8d8e18884deabdbfdd5caa4e073ad7b

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/da770c30b29e7f1995f0ac69ecf956e646529a7c

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>

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/d9391cf7f1bfa9116026634512b09a933cf155c2

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>

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/908ef869ff0632d3ff6522cc08a8dfa1e2f0d19f

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/4a393d0ba64363403d9e8b67d64b9b0e2684054f

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/3e401e9f68a5ea0148dc8da6b678d7283369e1c2

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/12433bfaf2f605bbf87fe43723a0252986db32a7

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/ec359247cdd80996894566131432943262a8c1c1

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/7b3887f993cba4e06399cb1e55aaae4c857e1779

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/58defa510051f76ab8bc8bce0a3fe94f0dd07da8

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/37f66072be2af583927e6055f981c7c74af7ee22

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/159cc33ec9d4719518d8bc9b4cfc1bcf14fcd3a6

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/7102fb6ec564dc8aa1b66841293bac612dc09e04

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/50a510767e1b0072be73a44350597f7633bca866

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/595237fd5e4782616033d4c6c1c491dcb1d5d0a0

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/f333a1c73db65388a3833748089e5bf3ca1b026b

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/93101eebd14fd55f4a953282930c072a8030724a

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/465b895de6025941ce661bc43db8af33b605d3bf

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/dc383e1f2bdb6b1c90ee78e3f3266be9f11344f3

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/11f85a65391cd4ea8f2be938fb972cf3d9103501

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/f6b66936acb575fe0d3b875002a3c71f490d916c

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/ecc79214c4a2584c2d2361761a7a2dd8a02b6b76

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/56f759f10125410414879c9090e2c67940ae6089

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/2045f0e5c16fe080c863c2761a1b4eb26876a798

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/cceb17bc76810e7ff9aad5f2c0bf4bdf4033761d

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/ea7ff9ab6f2ccb69a529563af9a7dec762240a60

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/5f10117610091c621cf22afc5134cdd8a6e33751

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/af59b30d64986424c84f1ba7d1d86804a7223fb8

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/f3ad5e877b8d67936e04313e646c72ea7fa3ce35

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/be83f6c6c8a9109ce01f06a22d318186473a8930

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/a35f4021769916d12fad9b5242126a7b2df9b1d1

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/7d6c83a3cfbc45905b4544939be3ccca056193cd

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/199fa92cdbc16edcf4740962cc173100d124253b

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/73a7e085cd928bb16f070a1a7fa6f4068487a61d

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/f780074001330130efd1c7a3e5062718c8f77f5b

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/4749757463010fb50d13fd12aeea580534e333b8

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/53559f3ddae4e7df93aef5248c4551a151f2bfc9

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/019a34658cc174cb568d11b687e217c31f5c5044

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/1386f2716917bafc44daa308c7ba45d2474019f8

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/62dff21d6266badaccc66d7e7ac9ba86d1085101

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/cc87aecd8847cc23c71731b5ced9d8ea525b7c8d

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/8326cadf5374fde3f3c9e6d54e30400ce55e6b66

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/e04e34a4352dbc7fe42a53ac6771f744882c1411

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/dea331b8d1faa386a34697c9ff3f797c4d4bf484

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/f15a60ec270ed9e48adf62a31947507fe754713e

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/0cd6ff906147a6654b47ff6d218c9cd0b5ec6c36

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/aca37d07d6128c77622ad218ee286d5226f1aa3c

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

--

Commit: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/76d5e10b00182bde8b6a4b54dcb1fb21720a5193

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

Merge request reports

Loading