From: sashiko-bot@kernel.org
To: "Chen-Yu Tsai" <wens@kernel.org>
Cc: devicetree@vger.kernel.org, robh@kernel.org,
linux-sunxi@lists.linux.dev, conor+dt@kernel.org
Subject: Re: [PATCH v3 5/7] arm64: dts: allwinner: sun50i-h6: Add missing SRAM region for video engine
Date: Sun, 12 Jul 2026 03:08:56 +0000 [thread overview]
Message-ID: <20260712030857.050931F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260712030011.3778169-6-wens@kernel.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The newly added `<&de2_sram 1>` phandle is silently ignored by the OS because the SRAM driver hardcodes parsing to only the first array element.
- [Medium] Assigning `de2_sram` to the Video Engine creates an unresolvable resource conflict with the Display Engine, guaranteeing a probe failure if the SRAM driver were to parse it.
--
--- Patch [5]: [PATCH v3 5/7] arm64: dts: allwinner: sun50i-h6: Add missing SRAM region for video engine ---
commit dbe16923a66cbda638350c813c16a8b1c65e3b6b
Author: Chen-Yu Tsai <wens@kernel.org>
arm64: dts: allwinner: sun50i-h6: Add missing SRAM region for video engine
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.
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> index 72ce1a75647bf..88c6e3e105c07 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>;
[Severity: Medium]
Will this second phandle actually be parsed by the OS?
Looking at the driver code in drivers/soc/sunxi/sunxi_sram.c, it seems
the parser hardcodes the index to 0:
drivers/soc/sunxi/sunxi_sram.c:sunxi_sram_of_parse() {
...
ret = of_parse_phandle_with_fixed_args(node, "allwinner,sram", 1, 0,
&args);
...
}
Does the driver need to be updated to parse multiple SRAM elements so
this alias window is actually closed?
[Severity: Medium]
If the driver is updated to parse this second element, will it cause a probe
failure due to a resource conflict?
The de2_sram region is already claimed by the Display Engine (bus@1000000).
Looking at sunxi_sram_claim(), the API enforces strict exclusive ownership:
drivers/soc/sunxi/sunxi_sram.c:sunxi_sram_claim() {
...
if (sram_desc->claimed) {
spin_unlock(&sram_lock);
return -EBUSY;
}
...
}
If both the Display Engine and Video Engine try to claim de2_sram, won't the
second device to probe be rejected with -EBUSY?
> iommus = <&iommu 3>;
> };
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260712030011.3778169-1-wens@kernel.org?part=5
next prev parent reply other threads:[~2026-07-12 3:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-12 3:00 [PATCH v3 0/7] arm64: allwinner: h616: Support Video Engine Chen-Yu Tsai
2026-07-12 3:00 ` [PATCH v3 1/7] dt-bindings: media: sun4i-a10-video-engine: Fix IOMMU count for H6 Chen-Yu Tsai
2026-07-12 3:08 ` sashiko-bot
2026-07-12 3:00 ` [PATCH v3 2/7] dt-bindings: media: sun4i-a10-video-engine: Fix SRAM " Chen-Yu Tsai
2026-07-12 3:08 ` sashiko-bot
2026-07-12 3:00 ` [PATCH v3 3/7] dt-bindings: media: sun4i-a10-video-engine: Add H616 compatible Chen-Yu Tsai
2026-07-12 3:00 ` [PATCH v3 4/7] staging: media: sunxi: cedrus: add H616 variant Chen-Yu Tsai
2026-07-12 3:00 ` [PATCH v3 5/7] arm64: dts: allwinner: sun50i-h6: Add missing SRAM region for video engine Chen-Yu Tsai
2026-07-12 3:08 ` sashiko-bot [this message]
2026-07-12 3:00 ` [PATCH v3 6/7] arm64: dts: allwinner: sun50i-h6: Add missing IOMMU " Chen-Yu Tsai
2026-07-12 3:09 ` sashiko-bot
2026-07-12 3:00 ` [PATCH v3 7/7] arm64: dts: allwinner: sun50i-h616: Add " Chen-Yu Tsai
2026-07-12 3:08 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260712030857.050931F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wens@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox