Skip to content

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

GitBot requested to merge linux-seco-imx/seco_lf-5.10.y-mx8m_vpu into kirkstone

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

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/10fff08b02243c5b1bfd48f792b789211e8198fa

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/f1bd00572c16f640ca3191f4a7d37021dae5b83d

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/43c770e39ef8d8cb09f54a4f9b8d7ab27f99cb4d

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/3207a38e2e24f432ee152e178eaba5a8cb05fede

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/4a5a1fcaee0eaf3691b915b29f2fafc58e90d045

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/a65b34854c3a1bba62f991568a495c9360ab1133

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/aa74604675dc160af59fca95c6c73f58047ce947

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/7d67d1657e1ecf87246a7bd0ed1b47f963abb7c2

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/0bff1cf419b61879599827c73822910038da8545

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/d0a0bf47a76378869b79332400fcaccde06ebad3

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/bf2660fe90afdada7d5f8a9477bdd78d781388fd

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/5138c2ef55bd7a9002ff29e2c8dd4baf5f4a9036

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/4d242359ceee9e8f559e1a814788a83818cb9de1

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/f1ceeccd4a73b9ee0b46f0c764cdc04c22cbf89e

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/f6397062e6f385f10b93ccd255ae0786f862b689

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/27eff3359f1eff94b5d395ca1d3bd98b04e8ca81

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/c15013bd162fd6a52ed3fe2e9319fc5c65913a1b

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/dadb32d17f98c080625a3711a542c2ca34aca5a6

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/42aae954a0313bdbec228d3417af938960ad21e0

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/e948d45cbb77a79eb5b5361f89d979b748937276

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/6ab6464187b6921be497df1fc86539eb695cbec3

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/ded2a1ab38b55844e015e60c57d6ee0fb1026562

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/abbd7f3e9956ed8a93c9f3ea8670e9406e8f8e19

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/524068829c85a649deb0bdc6a3cb3eab659774bd

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/74600e7e041e8a5dca8430d0146bd417c21f4359

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/02cba905e4f19125b49ea0cc2b419bda0651e929

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/1761d84101e157146bc4e035f22f91b9476e296c

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/28ceffaa2ad4e850094befd1b6f72e614e8191cc

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/54af30555b5bcfc15aa40f5f72ac83ac4e780d70

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/2d41f7dd1be73a01fcafb72f8cb8da00fa91306d

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/8b45e6a274d664e66507ecc7c34d48c4c0bca7b3

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/fdad76fc11cc99b9eaceeef46bf413c134b2067d

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/7c7dc0902bd5aa0a2f68fabc62659a22b85a87d9

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/342a3d4e6f7855c630ace19a09471de26bbe9650

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/810bdf4af6346c997c9c658b94e3252248473d29

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/22d490f577c43a4a92d366a9b130bba9477e1bdd

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/b48b4708fc2490f9632d2b3b9f866bb0a828e3f6

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/e347fdda467f1453a280054d5df56ff98a3fb5f8

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/738398459678a42bc0c1d158909b8def5cc872e6

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/c317d5f7107973dcffe87c832e3b4f4702592f3d

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/dcd2b3bb7c4eaf759fedee4412a3167926f14e75

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/a22d1a32c111ad84bc6cde672250df6e82267341

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/1baeb29011e907e462d8d7f440a059051a90ce93

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/d57b09be4094bbd5d745120f3c3e385f730ac82f

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/4c5a2f54ddf680db913f8d8f6b8c9bdbed416570

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/2145e57ae321b0375f51f428763d8ba51f4ca7d4

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/59d370698faecc827f31979ba99067ac7d27ca8e

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/15dc62c3cc5ba0cef28eef2eddf59cc0550c61ad

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/011c52bb69ba46043d35362a583e172b6571408e

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/f30d9b648eee6dba474d49e4126d4344d046cad5

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/43ccd3f8149a0ee145ffc0eb0a429a0a8de3f2a3

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/8f6e7ce99d641173a03f084e9f672684a1e19f23

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/39dd8efc91781719a249bfaf2f3842ed3af087e9

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/efc639e29fffb6b1b7a6c1dfef54835ab4298946

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/abce6406dd0267205971afb470a7ad00e36d428a

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/a12d097ad6f9c098e9db5dd2a6825257fd498007

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/c2b7bbd22b52e4e7ee71cc0677cc911fad39499a

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/cfcb8a3b4241c66578aee09d19b4e8fbe8c19a64

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/8ee5f76fc8e60eb777fd28f605cd2e63c7975396

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/62dffa328344a1aac4205d9b9f22c4b5a668c476

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/ef8af91f3149ec86e6d30e285e8478b71d5182a0

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/23d2ccf8d7eb4a3c3eb12f6dbb03f483c68fca39

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/7e89cb7fd77cf4193b88d823edfaad1c863384a0

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/65103a5eb1aabf7ab19ed4b58b2b6c9d1a23ebbc

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/26b444339f1f904b1495feb346064b7544972083

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/b129d911164a713b6348d5828dfbb0b87a64c4d6

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