From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4AD8BCCF9E0 for ; Tue, 28 Oct 2025 10:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:Reply-To:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Pdwit74J4s3LcZnQiV7vL3XVqPiSscO/CKfgON5MQ/o=; b=ALDtcX7j6ghSDNckkhQZOT30w8 Iim7FRL/Ce8xZkQd3f5+c5RQIPw+4+S1HxrVZRS28G2MXotrKSHX4mwMqQ+m6oAVHhl5pszsprcF4 nhZNw4Kvr+73k6aBEOy2moyPEXwzjaj9Ao0PbgkQ1iXdF1cBgVN5mUcRM+lfdRibI3aJWie7ENrwJ Dnku1W3Tzl0qXck+O0lbwZ/ql2bcKILHxsTeZiW5ccJi4GH6bMvnJTKz1eQzqvrVOrphqqsGxKVb6 BvMy5ktIHU465sc79JbbMw540+HXS3Hqqpi0YejUoF5Hqn0XnSTz5p/oxOmGXa7aRDwNOBjopRO8/ j5na6kPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vDhHc-0000000FnN1-3SN2; Tue, 28 Oct 2025 10:50:32 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vDhHa-0000000FnLu-0cxo for linux-amlogic@lists.infradead.org; Tue, 28 Oct 2025 10:50:32 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4711b95226dso72473455e9.0 for ; Tue, 28 Oct 2025 03:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761648628; x=1762253428; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=1DQs3x2+zkMzUAZ6R855gK20nQAqjTASXPxGz49ZcCo=; b=QUez28kskIJMhxfseu+xZTLjQy6KnwqG1ZBLWdNVv6tY4lXG5ZIa1SO9+WxxCvKsRk 92CUtR6ot3HryPgI5hE/Jxj+kC8tgAvfuZEq/9hAzj18sVgSKhE3pHYHzH/ivd9qq1HK wAjGBKLgN/JtL0bQ5lFPQ+8i4iJ88hQIfKmTCQieh/kZ0/r4STIa2jlkA2JNspQCPXse Yx2C5/ay+PAoewB5yRyWrrwyMespVyv3zf7BsZI85PEFsixJGxwKph9OLstmqCejdS7a 4BbE+RD4XyLk+SonPqltJ9BNWp4E80AImGEj16fai+ZfSLlqLUOPctzhAcyB5c+jFs5J GVog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761648628; x=1762253428; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=1DQs3x2+zkMzUAZ6R855gK20nQAqjTASXPxGz49ZcCo=; b=kBKqPAsGONM0Y8Ojv1orlavVgFvUYbAkvpwj//Oqmfn1dxQCFSYJfg8lSjB4XYw2i7 Vo337rHJPENHN/FJOAfRolH2RLkcFRo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PdlzTM9TYY4CDd/gxhJoP5nLe2m7N+g== X-Received: by 2002:a5d:64e8:0:b0:429:66bf:1475 with SMTP id ffacd0b85a97d-429a7e4eb79mr2630951f8f.3.1761648628154; Tue, 28 Oct 2025 03:50:28 -0700 (PDT) Received: from ?IPV6:2a01:e0a:cad:2140:ebe6:df10:d28d:aa5? ([2a01:e0a:cad:2140:ebe6:df10:d28d:aa5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952b7a7csm19783903f8f.8.2025.10.28.03.50.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Oct 2025 03:50:27 -0700 (PDT) Message-ID: Date: Tue, 28 Oct 2025 11:50:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Subject: Re: [PATCH 0/3] Add Amlogic stateless H.264 video decoder for S4 To: zhentao.guo@amlogic.com, Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org References: <20251027-b4-s4-vdec-upstream-v1-0-620401813b5d@amlogic.com> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hkl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wB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <20251027-b4-s4-vdec-upstream-v1-0-620401813b5d@amlogic.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251028_035030_248546_59513E19 X-CRM114-Status: GOOD ( 23.42 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Neil Armstrong Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Hi, On 10/27/25 06:42, Zhentao Guo via B4 Relay wrote: > Introduce initial driver support for Amlogic's new video acceleration > hardware architecture, designed for video stream decoding. > > Compared to the current Amlogic video decoder hardware architecture, > this new implementation eliminates the Esparser hardware component, > enabling direct vb2 buffer input. The driver is designed to support > the V4L2 M2M stateless decoder API. The initial phase includes support > for H.264 decoding on Amlogic S805X2 platform. > > The driver is capable of: > - Supporting stateless H.264 decoding up to a resolution 1920x1088(on the S805X2 platform). > - Supporting I/P/B frame handling. > - Supporting vb2 mmap and dma-buf modes. > - Supporting frame-based decode mode. (Note that some H.264 bitstreams require > DPB reordering to generate reference lists, the stateless decoder driver > cannot access reordered reference lists in this mode, requiring the driver > to perform reference list reordering itself) > - Supporting NV12/NV21 output. > - Supporting Annex B start codes. Thanks for the initial drop, it's very nice ! First of all, this still requires some work so it would be better if you used the RFC tag until all issues are sorted out. You didn't tell anything about the firmware, did you build a specific version of the firmware to handle the stateless and bypass ESPARSER ? Will this technique work with the released firmwares of GXL/G12/SM1 ? Will you support the compressed format and 10bit with this ? > > This driver is tested with Gstreamer. > Example: > gst-launch-1.0 filesrc location=/tmp/video_640x360_mp4_hevc_450kbps_no_b.mp4 ! > parsebin ! v4l2slh264dec ! filesink location=/tmp/output.yuv > > The driver passes v4l2 compliance test, test reports : > v4l2-compliance 1.30.1, 64 bits, 64-bit time_t > > Compliance test for aml-vdec-drv device /dev/video0: > > Driver Info: > Driver name : aml-vdec-drv > Card type : platform:aml-vdec-drv > Bus info : platform:fe320000.video-codec > Driver version : 6.16.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 Stateless Decoder > Media Driver Info: > Driver name : aml-vdec-drv > Model : aml-vdec-drv > Serial : > Bus info : platform:fe320000.video-codec > Media version : 6.16.0 > Hardware revision: 0x00000000 (0) > Driver version : 6.16.0 > Interface Info: > ID : 0x0300000c > Type : V4L Video > Entity Info: > ID : 0x00000001 (1) > Name : aml_dev_drv-source > Function : V4L2 I/O > Pad 0x01000002 : 0: Source > Link 0x02000008: to remote pad 0x1000004 of entity 'aml_dev_drv-proc' (Video Decoder): Data, Enabled, Immutable > > Required ioctls: > test MC information (see 'Media Driver Info' above): OK > 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 > test for unlimited opens: OK > > 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 > Standard Compound Controls: 4 Private Compound 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 (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) > 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 > test blocking wait: OK Please also enable the streaming tests. > > Total for aml-vdec-drv device /dev/video0: 49, Succeeded: 49, Failed: 0, Warnings: 0 > > Some Fluster test cases are still failing. We will publish the final results > once all these Fluster test failures have been resolved. As Christian reported, please add the flutter results aswell. Neil > > Signed-off-by: Zhentao Guo > --- > Zhentao Guo (3): > dt-bindings: vdec: Add binding document of Amlogic decoder accelerator > dts: decoder: Support V4L2 stateless decoder dt node for S4 > decoder: Add V4L2 stateless H.264 decoder driver > > .../bindings/media/amlogic,vcodec-dec.yaml | 96 ++ > MAINTAINERS | 7 + > arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 24 + > drivers/media/platform/amlogic/Kconfig | 2 + > drivers/media/platform/amlogic/Makefile | 1 + > drivers/media/platform/amlogic/vdec/Kconfig | 15 + > drivers/media/platform/amlogic/vdec/Makefile | 4 + > drivers/media/platform/amlogic/vdec/aml_vdec.c | 759 +++++++++ > drivers/media/platform/amlogic/vdec/aml_vdec.h | 31 + > .../platform/amlogic/vdec/aml_vdec_canvas_utils.c | 154 ++ > .../platform/amlogic/vdec/aml_vdec_canvas_utils.h | 22 + > drivers/media/platform/amlogic/vdec/aml_vdec_drv.c | 263 +++ > drivers/media/platform/amlogic/vdec/aml_vdec_drv.h | 194 +++ > drivers/media/platform/amlogic/vdec/aml_vdec_hw.c | 652 +++++++ > drivers/media/platform/amlogic/vdec/aml_vdec_hw.h | 182 ++ > .../platform/amlogic/vdec/aml_vdec_platform.c | 37 + > .../platform/amlogic/vdec/aml_vdec_platform.h | 62 + > drivers/media/platform/amlogic/vdec/h264.c | 1790 ++++++++++++++++++++ > drivers/media/platform/amlogic/vdec/h264.h | 300 ++++ > drivers/media/platform/amlogic/vdec/reg_defines.h | 175 ++ > 20 files changed, 4770 insertions(+) > --- > base-commit: 72fb0170ef1f45addf726319c52a0562b6913707 > change-id: 20251027-b4-s4-vdec-upstream-0603c1a4c84a > > Best regards, _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic