RE: [Patch v3 00/15] Add MFC v12 support.

From: Aakarsh Jain
Date: Wed Oct 12 2022 - 00:07:49 EST


Hi All,

Please find the attached v4l2-compliance complete log(mfc encoder and decoder) along with this mail for reference.

Thanks,
Aakarsh

> -----Original Message-----
> From: aakarsh jain [mailto:aakarsh.jain@xxxxxxxxxxx]
> Sent: 11 October 2022 17:55
> To: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-media@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx
> Cc: m.szyprowski@xxxxxxxxxxx; andrzej.hajda@xxxxxxxxx;
> mchehab@xxxxxxxxxx; hverkuil-cisco@xxxxxxxxx;
> ezequiel@xxxxxxxxxxxxxxxxxxxx; jernej.skrabec@xxxxxxxxx;
> benjamin.gaignard@xxxxxxxxxxxxx; stanimir.varbanov@xxxxxxxxxx;
> dillon.minfei@xxxxxxxxx; david.plowman@xxxxxxxxxxxxxxx;
> mark.rutland@xxxxxxx; robh+dt@xxxxxxxxxx; krzk+dt@xxxxxxxxxx;
> andi@xxxxxxxxxxx; alim.akhtar@xxxxxxxxxxx; aswani.reddy@xxxxxxxxxxx;
> pankaj.dubey@xxxxxxxxxxx; linux-fsd@xxxxxxxxx;
> smitha.t@xxxxxxxxxxx; aakarsh.jain@xxxxxxxxxxx
> Subject: [Patch v3 00/15] Add MFC v12 support.
>
> This patch series adds MFC v12 support. MFC v12 is used in Tesla FSD SoC.
>
> This adds support for following:
>
> * Add support for VP9 encoder
> * Add support for YV12 and I420 format (3-plane)
> * Add support for Rate Control, UHD and DMABUF for encoder
> * Add support for DPB buffers allocation based on MFC requirement
> * Update Documentation for control id definitions
>
> Changes since v2:
> - Addressed review comments by Rob Herring.
> - Addressed review comments by Krzysztof Kozlowski.
> - Addressed review comments by Andi Shyti.
>
> Smitha T Murthy (15):
> dt-bindings: media: s5p-mfc: Add new DT schema for MFC
> dt-bindings: media: s5p-mfc: Add mfcv12 variant
> media: s5p-mfc: Rename IS_MFCV10 macro
> media: s5p-mfc: Add initial support for MFCv12
> Documention: v4l: Documentation for VP9 CIDs.
> media: v4l2: Add v4l2 control IDs for VP9 encoder.
> media: s5p-mfc: Add support for VP9 encoder.
> media: s5p-mfc: Add YV12 and I420 multiplanar format support
> media: s5p-mfc: Add support for rate controls in MFCv12
> media: s5p-mfc: Add support for UHD encoding.
> media: s5p-mfc: Add support for DMABUF for encoder
> media: s5p-mfc: Set context for valid case before calling try_run
> media: s5p-mfc: Load firmware for each run in MFCv12.
> media: s5p-mfc: DPB Count Independent of VIDIOC_REQBUF
> arm64: dts: fsd: Add MFC related DT enteries
>
> .../devicetree/bindings/media/s5p-mfc.txt | 75 ---------
> .../bindings/media/samsung,s5p-mfc.yaml | 164 ++++++++++++++++++
> .../media/v4l/ext-ctrls-codec.rst | 167 +++++++
> arch/arm64/boot/dts/tesla/fsd.dtsi | 21 +
> .../platform/samsung/s5p-mfc/regs-mfc-v12.h | 60 +++
> .../platform/samsung/s5p-mfc/regs-mfc-v7.h | 1 +
> .../platform/samsung/s5p-mfc/regs-mfc-v8.h | 3 +
> .../media/platform/samsung/s5p-mfc/s5p_mfc.c | 36 +-
> .../platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.c | 3 +
> .../platform/samsung/s5p-mfc/s5p_mfc_common.h | 56 ++-
> .../platform/samsung/s5p-mfc/s5p_mfc_ctrl.c | 9 +-
> .../platform/samsung/s5p-mfc/s5p_mfc_dec.c | 51 ++-
> .../platform/samsung/s5p-mfc/s5p_mfc_enc.c | 410 +++++++++++++++--
> .../platform/samsung/s5p-mfc/s5p_mfc_opr.h | 16 +-
> .../platform/samsung/s5p-mfc/s5p_mfc_opr_v5.c | 12 +-
> .../platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c | 435
> ++++++++++++++++--
> .../platform/samsung/s5p-mfc/s5p_mfc_opr_v6.h | 7 +-
> drivers/media/v4l2-core/v4l2-ctrls-defs.c | 44 ++
> include/uapi/linux/v4l2-controls.h | 33 ++
> 19 files changed, 1349 insertions(+), 203 deletions(-) create mode 100644
> Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml
> create mode 100644 drivers/media/platform/samsung/s5p-mfc/regs-mfc-
> v12.h
>
> --
> 2.17.1

# v4l2-compliance -d /dev/video1
v4l2-compliance 1.22.1, 64 bits, 64-bit time_t

Compliance test for s5p-mfc device /dev/video1:

Dr[ 95.014797] vidioc_g_parm:2576: Setting FPS is only possible for the output queue
[ 95.022670] s5p-mfc 12880000.mfc: Encoding not initialised
[ 95.022728] s5p-mfc 12880000.mfc: Encoding not initialised
[ 95.022812] vidioc_g_parm:2576: Setting FPS is only possible for the output queue
[ 95.022871] vidioc_try_fmt:1607: failed to try output format
[ 95.047169] s5p_mfc_queue_setup:2690: invalid state: 0
[ 95.047181] vidioc_reqbufs:1725: error in vb2_reqbufs() for E(D)
iver Info:
Driver name : s5p-mfc
Card type : s5p-mfc-enc
Bus info : platform:12880000.mfc
Driver version : 5.19.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(736): !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
fail: v4l2-test-controls.cpp(473): g_ctrl returned an error (22)
test VIDIOC_G/S_CTRL: FAIL
fail: v4l2-test-controls.cpp(704): g_ext_ctrls returned an error (22)
test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
fail: v4l2-test-controls.cpp(872): subscribe event for control 'User Controls' failed
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 128 Private Controls: 11

Format ioctls:
fail: v4l2-test-formats.cpp(282): node->codec_mask & STATEFUL_ENCODER
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
fail: v4l2-test-formats.cpp(1310): is_stateful_enc && !out->capability
test VIDIOC_G/S_PARM: FAIL
test VIDIOC_G_FBUF: OK (Not Supported)
fail: v4l2-test-formats.cpp(474): !pix_mp.width || !pix_mp.height
test VIDIOC_G_FMT: FAIL
fail: v4l2-test-formats.cpp(474): !pix_mp.width || !pix_mp.height
test VIDIOC_TRY_FMT: FAIL
warn: v4l2-test-formats.cpp(1147): S_FMT cannot handle an invalid pixelformat.
warn: v4l2-test-formats.cpp(1148): This may or may not be a problem. For more information see:
warn: v4l2-test-formats.cpp(1149): http://www.mail-archive.com/linux-media@xxxxxxxxxxxxxxx/msg56550.html
fail: v4l2-test-formats.cpp(478): pixelformat 34363248 (H264) for buftype 9 not reported by ENUM_FMT
test VIDIOC_S_FMT: FAIL
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)

Codec ioctls:
fail: v4l2-test-codecs.cpp(35): node->function != MEDIA_ENT_F_PROC_VIDEO_ENCODER
test VIDIOC_(TRY_)ENCODER_CMD: FAIL
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Suppor[ 95.403655] vidioc_g_parm:2576: Setting FPS is only possible for the output queue
ted)

Buffer ioctls:
fail: v4l2-test-buffers.cpp(607): q.reqbufs(node, 1)
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
fail: v4l2-test-buffers.cpp(783): VIDIOC_EXPBUF is supported, but the V4L2_MEMORY_MMAP support is missing or malfunctioning.
fail: v4l2-test-buffers.cpp(784): VIDIOC_EXPBUF is supported, but the V4L2_MEMORY_MMAP support is missing, probably due to earlier failing format tests.
test VIDIOC_EXPBUF: OK (Not Supported)
test Requests: OK (Not Supported)

Total for s5p-mfc device /dev/video1: 45, Succeeded: 34, Failed: 11, Warnings: 3
#


# v4l2-compliance -d /dev/video0
v4l2-compliance 1.22.1, 64 bits, 64-bit time_t

Compliance test for s5p-mfc device /dev/video0:

Drive[ 198.767611] vidioc_g_selection:816: Can not get compose information
[ 198.768087] vidioc_g_selection:816: Can not get compose information
[ 198.768175] vidioc_g_fmt:397: Format could not be read
[ 198.768179] vidioc_g_selection:816: Can not get compose information
[ 198.768182] vidioc_g_selection:816: Can not get compose information
[ 198.768448] s5p-mfc 12880000.mfc: Decoding not initialised
[ 198.768469] s5p-mfc 12880000.mfc: Decoding not initialised
[ 198.768610] vidioc_g_fmt:397: Format could not be read
[ 198.768640] vidioc_g_selection:816: Can not get compose information
[ 198.768643] vidioc_g_selection:816: Can not get compose information
[ 198.768646] vidioc_g_selection:816: Can not get compose information
[ 198.768648] vidioc_g_selection:816: Can not get compose information
[ 198.768650] vidioc_g_selection:816: Can not get compose information
[ 198.768658] vidioc_g_selection:816: Can not get compose information
[ 198.768731] vidioc_g_selection:816: Can not get compose information
[ 198.768760] vidioc_g_selection:816: Can not get compose information
[ 198.768837] vidioc_g_selection:816: Can not get compose information
[ 198.768861] vidioc_g_selection:816: Can not get compose information
[ 198.768866] vidioc_try_fmt:429: Unsupported format for destination.
[ 198.768894] vidioc_g_selection:816: Can not get compose information
[ 198.768915] vidioc_g_selection:816: Can not get compose information
[ 198.768917] vidioc_try_fmt:429: Unsupported format for destination.
[ 198.768939] vidioc_g_selection:816: Can not get compose information
r Info:
Driver name : s5p-mfc
Card type : s5p-mfc-dec
Bus info : platform:12880000.mfc
Driver version : 5.19.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(736): !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
fail: v4l2-test-controls.cpp(473): g_ctrl returned an error (22)
test VIDIOC_G/S_CTRL: FAIL
fail: v4l2-test-controls.cpp(704): g_ext_ctrls returned an error (22)
test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
fail: v4l2-test-controls.cpp(872): subscribe event for control 'User Controls' failed
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 7 Private Controls: 2

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
fail: v4l2-test-formats.cpp(620): Video Capture Multiplanar cap set, but no Video Capture Multiplanar formats defined
test VIDIOC_G_FMT: FAIL
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)

Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
fail: v4l2-test-codecs.cpp(104): node->function != MEDIA_ENT_F_PROC_VIDEO_DECODER
test VIDIOC_(TRY_)DECODER_CMD: FAIL

Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK (Not Supported)
test Requests: OK (Not Supported)

Total for s5p-mfc device /dev/video0: 45, Succeeded: 39, Failed: 6, Warnings: 0
#