| Message ID | 20260505134812.408316-6-wens@kernel.org (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-23140-sunxi=pue.re@lists.linux.dev> X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id F38261C0224 for <noreply@patchwork.local>; Tue, 5 May 2026 15:53:48 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=kernel.org; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-23140-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-23140-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 587CD30125B0 for <noreply@patchwork.local>; Tue, 5 May 2026 13:48:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C4791480950; Tue, 5 May 2026 13:48:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k5dFEt8Y" X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9C1D2480944; Tue, 5 May 2026 13:48:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777988903; cv=none; b=cDu7yG/p0KxNw9f6gqVhw639M3xlqZrFo/vblVsfofZXYqQVF7VU44ainPtYqW9ilD0I/y8GX5FxRqw7uN0rQS5bppDZ3K6BeXvKThNBuSXm5581oNHbs8nwauu5D4aDP0dQtFUlelu084wZvodCEKnnxLPG+MjFwWw67/RaXDA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777988903; c=relaxed/simple; bh=SmJP1v6k7XMlEDKnWfg6SBf41AMTtCvcAOTsyx0JJ20=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KSnzlFsGpZ7DntynrrVG/5hwvjSzhutJqKAKqCrBvJ/ePXfvdK+NvvrmRdx3ua0dshRzRrlxrWCqt8Azx7ZfqXXU8OwKwtjthsA07T9BIHEpCHh2/lWXsGb6a7+ae9xVZOs7Xru8Tr9PNv6Si1U8iqNqA3l2elHkv8xWeu+OxKM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k5dFEt8Y; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61921C2BCB9; Tue, 5 May 2026 13:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777988903; bh=SmJP1v6k7XMlEDKnWfg6SBf41AMTtCvcAOTsyx0JJ20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k5dFEt8Y+/elNtbUoXdo50/jpfD7T3Ly1kmcmCRH8UmkyrqXSNO20iSYYMAGfsXA/ rnwiqkBUHj62oXKOuEQtbYSVB9knjZ6eOTtZOlKfglMnNFgb2b/un7NiocLCFKhQ6R q7u0vJaQEeyKoPykpxohGaVDPuYPvavlM7FZCoBR1tJ2V47+dV1lVQXircyKa65S81 7t+nyj4+rV1mbUONsXZO3Wmm2++GWA+he7sfAmg315N1j1o7ybh4/8LN2PbU0mSfxi TYWGddruM9TIiU5zgDTZ3x1kKpmv94DbuZ3pshDImYNhEdTbghBvcAayudEVH2kRIM sXnIhLUBD7gRw== Received: by wens.tw (Postfix, from userid 1000) id 5AB295FFE0; Tue, 05 May 2026 21:48:19 +0800 (CST) From: Chen-Yu Tsai <wens@kernel.org> To: Maxime Ripard <mripard@kernel.org>, Paul Kocialkowski <paulk@sys-base.io>, Mauro Carvalho Chehab <mchehab@kernel.org>, Chen-Yu Tsai <wens@kernel.org>, Jernej Skrabec <jernej@kernel.org>, Samuel Holland <samuel@sholland.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] arm64: dts: allwinner: sun50i-h6: Add missing SRAM region for video engine Date: Tue, 5 May 2026 21:48:09 +0800 Message-ID: <20260505134812.408316-6-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260505134812.408316-1-wens@kernel.org> References: <20260505134812.408316-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: <linux-sunxi.lists.linux.dev> List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [0.84 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[104.64.211.4:from]; DMARC_POLICY_QUARANTINE(1.50)[kernel.org : SPF not aligned (relaxed),quarantine]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; R_DKIM_PERMFAIL(0.00)[kernel.org:s=k20201202]; TAGGED_RCPT(0.00)[dt]; DBL_BLOCKED_OPENRESOLVER(0.00)[sin.lore.kernel.org:rdns,sin.lore.kernel.org:helo]; FUZZY_BLOCKED(0.00)[rspamd.com]; PRECEDENCE_BULK(0.00)[]; DKIM_TRACE(0.00)[kernel.org:~]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:63949, ipnet:104.64.192.0/19, country:SG]; MIME_TRACE(0.00)[0:+]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:104.64.211.4]; TAGGED_FROM(0.00)[bounces-23140-noreply=patchwork.local]; FROM_NEQ_ENVFROM(0.00)[wens@kernel.org,linux-sunxi@lists.linux.dev]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: F38261C0224 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= |
| Series |
arm64: allwinner: h616: Support Video Engine
|
|
Commit Message
Chen-Yu Tsai
May 5, 2026, 1:48 p.m. UTC
The SRAM C region contains a partial alias to the VE SRAM already
referenced by the video engine. To avoid access through this alias
window, the region should also be claimed by the video engine.
Add a reference to the SRAM C region to the video engine node.
Fixes: b542570e5605 ("arm64: dts: allwinner: h6: Add Video Engine node")
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
---
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Dne torek, 5. maj 2026 ob 15:48:09 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a): > The SRAM C region contains a partial alias to the VE SRAM already > referenced by the video engine. To avoid access through this alias > window, the region should also be claimed by the video engine. > > Add a reference to the SRAM C region to the video engine node. > > Fixes: b542570e5605 ("arm64: dts: allwinner: h6: Add Video Engine node") > Signed-off-by: Chen-Yu Tsai <wens@kernel.org> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Best regards, Jernej
Hi Chen-Yu, On Tue 05 May 26, 21:48, Chen-Yu Tsai wrote: > The SRAM C region contains a partial alias to the VE SRAM already > referenced by the video engine. To avoid access through this alias > window, the region should also be claimed by the video engine. > > Add a reference to the SRAM C region to the video engine node. It feels very weird to have a reference to the DE2 SRAM region in the VE node. It seems unlikely that the same region would be used by both DE2 and VE and I am pretty sure can have both running at the same time without overstepping. From what I can see we have so far assumed that the SRAM C and SRAM C1 are two different physical SRAM areas, but this is most likely not the case. My guess would be that SRAM C1 is actually a part of SRAM C and the DE2 is using another part of it. The syscon block probably allows switching access to these different parts of SRAM C. Also the sram_c1 node implies it's 2 MiB, which sounds quite unlikely. All the best, Paul > > Fixes: b542570e5605 ("arm64: dts: allwinner: h6: Add Video Engine node") > Signed-off-by: Chen-Yu Tsai <wens@kernel.org> > --- > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > index 72ce1a75647b..88c6e3e105c0 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > @@ -205,7 +205,7 @@ video-codec@1c0e000 { > clock-names = "ahb", "mod", "ram"; > resets = <&ccu RST_BUS_VE>; > interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; > - allwinner,sram = <&ve_sram 1>; > + allwinner,sram = <&ve_sram 1>, <&de2_sram 1>; > iommus = <&iommu 3>; > }; > > -- > 2.47.3 >
On Tue, May 5, 2026 at 10:35 PM Paul Kocialkowski <paulk@sys-base.io> wrote: > > Hi Chen-Yu, > > On Tue 05 May 26, 21:48, Chen-Yu Tsai wrote: > > The SRAM C region contains a partial alias to the VE SRAM already > > referenced by the video engine. To avoid access through this alias > > window, the region should also be claimed by the video engine. > > > > Add a reference to the SRAM C region to the video engine node. > > It feels very weird to have a reference to the DE2 SRAM region in the > VE node. It seems unlikely that the same region would be used by both DE2 and > VE and I am pretty sure can have both running at the same time without > overstepping. > > From what I can see we have so far assumed that the SRAM C and SRAM C1 > are two different physical SRAM areas, but this is most likely not the case. > My guess would be that SRAM C1 is actually a part of SRAM C and the DE2 is No. It's the opposite. 0x28000 maps to the same SRAM block at 0x1a00000. If you write to one, you see the results in both. However the alias at 028000 can be disabled while retaining access to 0x1a00000. I don't remember how much of the alias points to VE SRAM (0x1a00000). Maybe it was the whole alias on the H6. Also, I can't remember if this was tested on the H6 or H616, but the VE indeed writes to VE SRAM (0x1a00000), so that part is indeed used by the video engine. > using another part of it. The syscon block probably allows switching access > to these different parts of SRAM C. >From what I've seen in the vendor BSP, both drivers toggle the switch. I believe the goal is to prevent the CPU from having access, rather than either peripheral claiming it as its own. And that is also what our SRAM driver does. It claims the SRAM from the CPU. That's all. The toggle bit pattern used by both drivers is the same. > Also the sram_c1 node implies it's 2 MiB, which sounds quite unlikely. That is what the memory map says. Calling it SRAM C1 is probably wrong. ChenYu > All the best, > > Paul > > > > > Fixes: b542570e5605 ("arm64: dts: allwinner: h6: Add Video Engine node") > > Signed-off-by: Chen-Yu Tsai <wens@kernel.org> > > --- > > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > index 72ce1a75647b..88c6e3e105c0 100644 > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > @@ -205,7 +205,7 @@ video-codec@1c0e000 { > > clock-names = "ahb", "mod", "ram"; > > resets = <&ccu RST_BUS_VE>; > > interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; > > - allwinner,sram = <&ve_sram 1>; > > + allwinner,sram = <&ve_sram 1>, <&de2_sram 1>; > > iommus = <&iommu 3>; > > }; > > > > -- > > 2.47.3 > > > > -- > Paul Kocialkowski, > > Independent contractor - sys-base - https://www.sys-base.io/ > Free software developer - https://www.paulk.fr/ > > Expert in multimedia, graphics and embedded hardware support with Linux.
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 72ce1a75647b..88c6e3e105c0 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -205,7 +205,7 @@ video-codec@1c0e000 { clock-names = "ahb", "mod", "ram"; resets = <&ccu RST_BUS_VE>; interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; - allwinner,sram = <&ve_sram 1>; + allwinner,sram = <&ve_sram 1>, <&de2_sram 1>; iommus = <&iommu 3>; };