Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1704508lqs; Sun, 16 Jun 2024 00:29:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVy1IN5p71qUHbWVNgZjofCVsMP8mEYATVjYJKC+bE4jcHBM/VsnaAfNBdFIbiueqS/zJGpGPJsYxE2SUIPuTqgJV8MBxb6jjijZl5shA== X-Google-Smtp-Source: AGHT+IF7f+Kc6gfNuOp7Fmd14RPXFYP+zo18lJ6zAV8eBbnU3/5Gpsc2YdqLY0RPDYRZYOoQbleg X-Received: by 2002:a17:902:c404:b0:1f4:9b2a:b337 with SMTP id d9443c01a7336-1f8625d4a47mr86245695ad.3.1718522941834; Sun, 16 Jun 2024 00:29:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718522941; cv=pass; d=google.com; s=arc-20160816; b=YlORVhy+vVGGcjnqiNoTHGSdn3DSKrMBv36kIxbsa6rmTg2jVi39o3X/Zthdntjrt2 oourLWO7Nd8mJfi1nKFjUDCAKl1aj7ytv+z512sr604j20CN/uhl4CPVmGTaOmPURo3i pz8zzMxvRJag9D/rhzHlttJUp4RGAKt4HsRaIltdVVN3iAEcfaux57EO4P1qFaopOTUU 4H0ycb2b/CDn+7TqZx/f8DARyG1FK7s/4YQxdweWe7FLZkd3JMbRG6IMKCkxPOFnJWFS vNO9IZXe5iKVKMzwWItKqpUskat/5/h8ZfLnGE6ebArvHRxrg1MUnCF+PMh/OgSOx45h zgnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=YWWKiV6zcP7r94QoJsSIetTaZiAI781mfv8njiTDarY=; fh=4ehb7UiNX/bYhF4oE/EUH6SKfenb2pfsywJa/uYKoq4=; b=jpuUvyuxv7Ts38cKJ8wqZ9tDNROCuWBb2HLphSBt7IEDbZ37XLgVXzxRo3/XtSPStH sD+BOih0km1E1cZ0TYvSTr7ieHQiLDvJ1Cs29Qa25oPfkaK3o/PF4zdTF0LZX0nXMk+3 G6PM45XBbpY3gk2kuhbcdn3J6eZMU83JOZRte++vRKVb0vIfO854TUFU7xogAat/DnjP 5p+/Pfnc/MOYrH9pE70HNDOp5ey7Z++6ke6GVaXUPDVDBGNLL5S55dfe3pvk9X2dfMTF mXElFoJlSYHeXXnebuv8hZTz4H43cfMw+JV5Tob0C0ZN0vcwA9qpJpwRkzH/+8mN21tJ LX1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sntech.de dmarc=pass fromdomain=sntech.de); spf=pass (google.com: domain of linux-kernel+bounces-216160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216160-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f855ecae60si67905535ad.265.2024.06.16.00.29.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jun 2024 00:29:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-216160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sntech.de dmarc=pass fromdomain=sntech.de); spf=pass (google.com: domain of linux-kernel+bounces-216160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216160-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D70D9B20FE0 for ; Sun, 16 Jun 2024 07:28:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB643179663; Sun, 16 Jun 2024 07:28:44 +0000 (UTC) Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D0EB16DEB4; Sun, 16 Jun 2024 07:28:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718522924; cv=none; b=Ddsydk2zqzGuvMKlmkovMgOqftyK9ShLoDCoeEgVGo6FUcHy3fqHb4KB3IOOHvZkLMaW4U9C+X9W4Xpdbl3LVxs0ebl7lQF+v1Xy4b9xqkh+5vn2CB9Bn7IaHgrcnMJqlnuDwJvwA/Ma+koKtiGnJiNqLxEvNtBt2f1st8wCX6o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718522924; c=relaxed/simple; bh=onAJtnmk6+29s6dUauR5dhJqG7zZiy9rFtztLY7oXC4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ON0+lBgYeDjuIb8BpH6FqMFxXjIaKA56rOBKaR9VX4ffjSZIF+jP3i0tu8WRkF3JEqxuAuzwVtgfA+T01DJAGNkFORo/6TUEBQIZL3v3Gdz6A+EJw6SDxPpovShRKLXS9JhIiOnZfKtGRwIcL4ZRCWoIEsFYdvKSNe50c5/Q34w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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.