mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 00/13] media: iris: enable VP8, MPEG1/MPEG2 and interlaced MPEG2 support
@ 2026-12-04 18:24 Dmitry Baryshkov
  2026-12-04 18:24 ` [PATCH v2 01/13] media: iris: apply the capture buffer minimum in queue_setup Dmitry Baryshkov
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2026-12-04 18:24 UTC (permalink / raw)
  To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
	Bryan O'Donoghue, Mauro Carvalho Chehab, Hans Verkuil
  Cc: linux-media, linux-arm-msm, linux-kernel, Vishnu Reddy

Bring back features supported by the Venus driver, but not supported by
the Iris driver: VP8 (encoding, decoding), MPEG1 and MPEG2 (decoding
only) video support and also support for interlaced MPEG2 streams.

Interlaced H.264 is deliberately left out. Streams that mix frame and
field coding (MBAFF and PAFF, e.g. the CAMA*, CVMA*, CVPA*, CAPA* and
HCAFF/HPCAFL conformance vectors) make the firmware fail fatally in its
H.264 hardware interface (vfw_h264_hw_if.c) on both SM8250 and SC7280,
and the Gen2 firmware fails on them as well. This persists with the
reconstruction buffers sized as downstream does (fixed here, it was a
real overrun), with every internal buffer doubled, with a single pipe,
and with the buffer counts declared as downstream does. Field-only
streams decode correctly, but the firmware only reports progressive_only,
so the driver cannot tell them apart and keeps rejecting interlaced
H.264 for now. Venus has the same vectors on its skip lists.

On the SM8250 (RB5):

debian@debian:~$ v4l2-compliance -d /dev/video0
v4l2-compliance 1.30.1, 64 bits, 64-bit time_t

Compliance test for iris_driver device /dev/video0:

Driver Info:
	Driver name      : iris_driver
	Card type        : Iris Decoder
	Bus info         : platform:aa00000.video-codec:de
	Driver version   : 7.4.0
	Capabilities     : 0x84204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
	Detected Stateful Decoder

Required ioctls:
	test VIDIOC_QUERYCAP: OK
	test invalid ioctls: OK

Allow for multiple opens:
	test second /dev/video0 open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
		fail: v4l2-compliance.cpp(771): !ok
	test for unlimited opens: FAIL

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 6 Private Controls: 0

Format ioctls:
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	test VIDIOC_G/S_PARM: OK (Not Supported)
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK
	test Composing: OK
	test Scaling: OK (Not Supported)

Codec ioctls:
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK

Buffer ioctls:
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
	test CREATE_BUFS maximum buffers: OK
	test VIDIOC_REMOVE_BUFS: OK
	test VIDIOC_EXPBUF: OK
	test Requests: OK (Not Supported)
	test blocking wait: OK

Total for iris_driver device /dev/video0: 48, Succeeded: 47, Failed: 1, Warnings: 0

debian@debian:~$ v4l2-compliance -d /dev/video1
v4l2-compliance 1.30.1, 64 bits, 64-bit time_t

Compliance test for iris_driver device /dev/video1:

Driver Info:
	Driver name      : iris_driver
	Card type        : Iris Encoder
	Bus info         : platform:aa00000.video-codec:en
	Driver version   : 7.4.0
	Capabilities     : 0x84204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
	Detected Stateful Encoder

Required ioctls:
	test VIDIOC_QUERYCAP: OK
	test invalid ioctls: OK

Allow for multiple opens:
	test second /dev/video1 open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
		fail: v4l2-compliance.cpp(771): !ok
	test for unlimited opens: FAIL

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 35 Private Controls: 0

Format ioctls:
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	test VIDIOC_G/S_PARM: OK
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK
	test Composing: OK (Not Supported)
	test Scaling: OK (Not Supported)

Codec ioctls:
	test VIDIOC_(TRY_)ENCODER_CMD: OK
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
	test CREATE_BUFS maximum buffers: OK
	test VIDIOC_REMOVE_BUFS: OK
	test VIDIOC_EXPBUF: OK
	test Requests: OK (Not Supported)
	test blocking wait: OK

Total for iris_driver device /dev/video1: 48, Succeeded: 47, Failed: 1, Warnings: 0

The "unlimited opens" failure comes from commit 397ebadcbc21 ("media:
iris: reject open() when the session limit is reached") in linux-next and
is not related to this series.

|Test|FFmpeg-VP8-v4l2m2m|GStreamer-VP8-V4L2|
|-|-|-|
|PASSED|53/61|57/61|
|FAILED\ERROR|8/61|4/61|
|TOTAL TIME|11.220s|8.579s|

Failing with both GStreamer and FFmpeg:
 - vp80-01-intra-1411
 - vp80-02-inter-1412
 - vp80-03-segmentation-1413
 - vp80-05-sharpness-1443

Failing only with FFmpeg:
 - vp80-00-comprehensive-018
 - vp80-03-segmentation-1425
 - vp80-03-segmentation-1436 (intermittent, fails the same way with v1)
 - vp80-05-sharpness-1439

|Test|FFmpeg-MPEG2_VIDEO-v4l2m2m|GStreamer-MPEG2_VIDEO-V4L2|
|-|-|-|
|PASSED|35/43|30/43|
|FAILED\ERROR|8/43|13/43|
|TOTAL TIME|69.772s|60.073s|

Failing with both GStreamer and FFmpeg:
 - att, ccm1: frame size below the 128x128 minimum
 - tcela-18: D-pictures only, not supported by the hardware
 - sony-ct1, teracom_vlc4, ntr_skipped_v3: small mismatches against the
   reference decoder

Failing with GStreamer only:
 - MEI, MEI.stream16, tcela-16, tcela-19: MPEG-1 streams, v4l2videodec
   puts MPEG-2 profile/level fields into the MPEG-1 caps (fix to be sent
   to GStreamer)
 - sony-ct2, sony-ct3, sony-ct4: the parser reports the display size from
   the sequence display extension, which is below the 128x128 minimum

Failing with FFmpeg only:
 - test
 - tcela-6: timed out in this run, passes on reruns

4:2:2 streams (MPEG2_VIDEO-422) are not supported by the hardware.

Test results for Kodiak (RB3 Gen2) mostly follow results on SM8250.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Changes in v2:
- Rebased on next-20261123, dropped the merged AR50LT prerequisite.
- New fix: apply the capture buffer minimum in queue_setup instead of
  racing with REQBUFS (made FFmpeg fail on small VP8 streams).
- Gave the new Milos firmware data its decode and encode format lists.
- Mapped HFI_H264_LEVEL_52 to V4L2 level 5.2 (Vishnu).
- Replaced the QC08C extradata padding with the two-field layout used
  downstream, which is what interlaced content actually needs (this
  supersedes the extradata naming comment, Vishnu).
- Limited interlaced support to MPEG2 and moved it after the MPEG2 patch,
  see above for H.264.
- Picked up Reviewed-by tags.
- Accept MPEG1 streams through the MPEG2 codec (dropped the MPEG2 R-b, the
  patch changed).
- New patch adding read-only controls; the VP8 and MPEG2 decoder
  profile/level controls are now read-only, report the stream's values and
  only list what the hardware decodes.
- Link to v1: https://patch.msgid.link/20260709-iris-vp8-v1-0-6af3ab578a7c@oss.qualcomm.com

---
Dmitry Baryshkov (13):
      media: iris: apply the capture buffer minimum in queue_setup
      media: iris: translate Gen1 profile/level to HFI enumerants
      media: iris: default the Gen1 encoder level to a usable value
      media: iris: size QC08C buffers to fit field-coded pictures
      media: iris: split Gen2 firmware data for vpu2-generation SoCs
      media: iris: move the decode format list into the firmware data
      media: iris: support read-only controls
      media: iris: add VP8 decode support on Gen1 firmware
      media: iris: add MPEG1 and MPEG2 decode support on Gen1 firmware
      media: iris: support interlaced MPEG2 content
      media: iris: move the encode format list into the firmware data
      media: iris: accept gen1 encoder output at a non-zero offset
      media: iris: add VP8 encode support on Gen1 firmware

 drivers/media/platform/qcom/iris/iris_buffer.c     |  56 ++--
 drivers/media/platform/qcom/iris/iris_ctrls.c      |  32 ++-
 drivers/media/platform/qcom/iris/iris_hfi_gen1.c   |  88 ++++++-
 .../platform/qcom/iris/iris_hfi_gen1_command.c     | 128 +++++++++-
 .../platform/qcom/iris/iris_hfi_gen1_defines.h     |  64 +++++
 .../platform/qcom/iris/iris_hfi_gen1_response.c    |  83 +++++-
 drivers/media/platform/qcom/iris/iris_hfi_gen2.c   | 284 +++++++++++++++++++++
 .../platform/qcom/iris/iris_hfi_gen2_response.c    |   3 -
 drivers/media/platform/qcom/iris/iris_instance.h   |   2 +
 .../platform/qcom/iris/iris_platform_common.h      |  19 +-
 .../media/platform/qcom/iris/iris_platform_vpu2.c  |  14 +-
 .../media/platform/qcom/iris/iris_platform_vpu3x.c |  17 --
 .../platform/qcom/iris/iris_platform_vpu_ar50lt.c  |   8 -
 drivers/media/platform/qcom/iris/iris_vb2.c        |   6 +-
 drivers/media/platform/qcom/iris/iris_vdec.c       |  10 +-
 drivers/media/platform/qcom/iris/iris_venc.c       |  13 +-
 drivers/media/platform/qcom/iris/iris_vpu_buffer.c |  86 +++++++
 drivers/media/platform/qcom/iris/iris_vpu_buffer.h |   6 +
 18 files changed, 821 insertions(+), 98 deletions(-)
---
base-commit: 799dd936553182df5770dde7f38d94c8337df75a
change-id: 20260708-iris-vp8-8130cdae989d

Best regards,
--  
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-12-04 18:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-04 18:24 [PATCH v2 00/13] media: iris: enable VP8, MPEG1/MPEG2 and interlaced MPEG2 support Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 01/13] media: iris: apply the capture buffer minimum in queue_setup Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 02/13] media: iris: translate Gen1 profile/level to HFI enumerants Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 03/13] media: iris: default the Gen1 encoder level to a usable value Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 04/13] media: iris: size QC08C buffers to fit field-coded pictures Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 05/13] media: iris: split Gen2 firmware data for vpu2-generation SoCs Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 06/13] media: iris: move the decode format list into the firmware data Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 07/13] media: iris: support read-only controls Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 08/13] media: iris: add VP8 decode support on Gen1 firmware Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 09/13] media: iris: add MPEG1 and MPEG2 " Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 10/13] media: iris: support interlaced MPEG2 content Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 11/13] media: iris: move the encode format list into the firmware data Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 12/13] media: iris: accept gen1 encoder output at a non-zero offset Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 13/13] media: iris: add VP8 encode support on Gen1 firmware Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®