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 2E53EC27C6E for ; Sun, 16 Jun 2024 07:28:48 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9PwehLLejCtOiPnn6+yGtemClQ8+VcbdNNl6UHzsxOw=; b=MlekpwbLI0j8GZ qf/E+jhFzAGIRWN2i+vTpOT2e6Y+4f4YQvvetnDIcLQrq8qT2XHByt7btIopc53bjxuWk5lL9Pdg7 zEBwQRfhHPhRI8FWJfsaNrWPiVmpQeNXPqAmzdBnrOkTzAGwTqoweyW1rM5ErlYLHvLfT7G9qC0QD M3iD0HO+ulvCMPR3LS55cINRnwFYJRhdif5N8LntiYvjviYTTqaaqIKcfldCx5oQNZSidr1Y6x0vG D3QIKTguzl2jg0Ph3rln9n5qvNPP0+PVchm/S4QX77UQeZcqO71IMS70aKWo5jqux+0k5FlQow5bq FuGlbaQ7mRabsWqs2iHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sIkJg-000000071LT-1SAn; Sun, 16 Jun 2024 07:28:44 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sIkJd-000000071KW-0gYm; Sun, 16 Jun 2024 07:28:42 +0000 Received: from 79-98-74-242.sys-data.com ([79.98.74.242] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sIkJO-00007I-3M; Sun, 16 Jun 2024 09:28:26 +0200 From: Heiko Stuebner To: Jonas Karlman , Detlev Casanova Cc: linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Sebastian Reichel , Dragan Simic , Alexey Charkov , Cristian Ciocaltea , Diederik de Haas , Andy Yan , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev Subject: Re: [PATCH 3/3] arm64: dts: rockchip: Add rkvdec2 Video Decoder on rk3588(s) Date: Sun, 16 Jun 2024 09:28:25 +0200 Message-ID: <6812626.ejJDZkT8p0@phil> In-Reply-To: <3666279.iZASKD2KPV@arisu> References: <20240615015734.1612108-1-detlev.casanova@collabora.com> <944c4296-8dd2-4ffd-b430-1839ff3a3ed2@kwiboo.se> <3666279.iZASKD2KPV@arisu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240616_002841_215508_E96047D2 X-CRM114-Status: GOOD ( 31.29 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Am Samstag, 15. Juni 2024, 21:55:54 CEST schrieb Detlev Casanova: > On Saturday, June 15, 2024 4:25:27 A.M. EDT Jonas Karlman wrote: > > Hi Detlev, > > > > On 2024-06-15 03:56, Detlev Casanova wrote: > > > Add the rkvdec2 Video Decoder to the RK3588s devicetree. > > > > > > Signed-off-by: Detlev Casanova > > > --- > > > > > > .../boot/dts/rockchip/rk3588-rock-5b.dts | 4 ++++ > > > .../boot/dts/rockchip/rk3588s-orangepi-5.dts | 4 ++++ > > > arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 19 +++++++++++++++++++ > > > 3 files changed, 27 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > > > b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts index > > > c551b676860c..965322c24a65 100644 > > > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > > > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > > > @@ -503,6 +503,10 @@ &pwm1 { > > > > > > status = "okay"; > > > > > > }; > > > > > > +&rkvdec0 { > > > + status = "okay"; > > > +}; > > > > Enable of rkvdec0 should probably be split out from the patch that adds > > the rkvdec0 node to soc dtsi. > > Ack > > > Also why is rkvdec0 only enabled on rock-5b and orangepi-5? > > I only could test on those two but I can enable it on all rk3588 devices. > > > > + > > > > > > &saradc { > > > > > > vref-supply = <&avcc_1v8_s0>; > > > status = "okay"; > > > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts > > > b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts index > > > feea6b20a6bf..2828fb4c182a 100644 > > > --- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts > > > +++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts > > > @@ -321,6 +321,10 @@ typec5v_pwren: typec5v-pwren { > > > > > > }; > > > > > > }; > > > > > > +&rkvdec0 { > > > + status = "okay"; > > > +}; > > > + > > > > > > &saradc { > > > > > > vref-supply = <&avcc_1v8_s0>; > > > status = "okay"; > > > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > > > b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi index > > > 0fecbf46e127..09672636dcea 100644 > > > --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > > > +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > > > @@ -3034,6 +3034,9 @@ system_sram2: sram@ff001000 { > > > > > > ranges = <0x0 0x0 0xff001000 0xef000>; > > > #address-cells = <1>; > > > #size-cells = <1>; > > > > Blank line is missing. > > > > > + rkvdec0_sram: rkvdec-sram@0 { > > > + reg = <0x0 0x78000>; > > > + }; > > > > > > }; > > > > > > pinctrl: pinctrl { > > > > > > @@ -3103,6 +3106,22 @@ gpio4: gpio@fec50000 { > > > > > > #interrupt-cells = <2>; > > > > > > }; > > > > > > }; > > > > > > + > > > + rkvdec0: video-decoder@fdc38100 { > > > + compatible = "rockchip,rk3588-vdec2"; > > > + reg = <0x0 0xfdc38100 0x0 0x500>; > > > + interrupts = ; > > > + clocks = <&cru ACLK_RKVDEC0>, <&cru HCLK_RKVDEC0>, > <&cru > > > CLK_RKVDEC0_CORE>, + <&cru > CLK_RKVDEC0_CA>, <&cru > > > CLK_RKVDEC0_HEVC_CA>; > > > + clock-names = "axi", "ahb", "core", > > > + "cabac", "hevc_cabac"; > > > + assigned-clocks = <&cru ACLK_RKVDEC0>, <&cru > CLK_RKVDEC0_CORE>, > > > + <&cru CLK_RKVDEC0_CA>, <&cru > CLK_RKVDEC0_HEVC_CA>; > > > + assigned-clock-rates = <800000000>, <600000000>, > > > + <600000000>, <1000000000>; > > > + power-domains = <&power RK3588_PD_RKVDEC0>; > > > > iommus and resets should probably be added. > > > > > + status = "disabled"; > > > + }; > > > > The iommu node for rkvdec0_mmu seem to be missing, is it not required to > > be able to use memory >4GiB as decoding buffers? > > I need to check if the current rockchip iommu driver will work for this > decoder. I remember that the iommu code for AV1 was a bit different, not sure > about this rkvdec. > > > I would also consider adding the rkvdec1 node(s), if I am understanding > > correctly they can both be used in a cluster or completely independent. > > They can be used independently, yes. I'll add rkvdec1 for rk3588 devices > (rk3588s only has 1 core) Please check in with Sebastian Reichel about clusters/independent controllers. He had a lot of fruitful discussions for the VEPU121/VPU121 support he is working on. Baseline being, while we want the hw to be described correctly wrt the multiple instances, we don't generally want to expose them individually to userspace, because that would then require userspace to do all the scheduling. _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip