Index | Thread | Search

From:
Landry Breuil <landry@openbsd.org>
Subject:
Re: smmu(4): don't always set DMA coherent tag
To:
Patrick Wildt <patrick@blueri.se>
Cc:
tech@openbsd.org, kettenis@openbsd.org
Date:
Sun, 21 Sep 2025 14:02:58 +0200

Download raw body.

Thread
Le Sun, Sep 21, 2025 at 10:29:15AM +0200, Patrick Wildt a écrit :
> On Thu, Aug 28, 2025 at 08:28:31AM +0200, Landry Breuil wrote:
> > Le Wed, Aug 27, 2025 at 02:03:39PM +0200, Patrick Wildt a ?crit :
> > > Hi,
> > > 
> > > SMMUs don't necessarily influence device DMA coherency attributes.
> > > I assume we have been lucky so far that our machines that have an
> > > SMMUv2 usually have devices with DMA coherency.  On the RK3588
> > > this is not the case, and us always adding the COHERENT flag makes
> > > devices fail to work when used with smmu(4) enabled.
> > > 
> > > Please give this a run on machines where "dmesg | grep ^smmu" shows
> > > some output.
> > 
> > i dont have regressions on the omnibook x14 with that patch and the
> > previous, but smmu is still disabled. should i test with it enabled ?
> > that's only adding 'early 1' to the 'smmu* at fdt?' line right ?
> 
> Needs slightly more on top than just 'early 1':

omnibook x14 still works, dmesg diff below (with only that diff):

@@ -113,7 +113,9 @@
 simplebus0 at mainbus0: "soc"
 qcmtx0 at simplebus0
 syscon0 at simplebus0: "clock-controller"
+smmu0 at simplebus0: 22 CBs (0 S2-only), bypass quirk
 qcgpio0 at simplebus0
+smmu1 at simplebus0: 74 CBs (0 S2-only), bypass quirk
 agintc0 at simplebus0 shift 4:4 nirq 1024 nredist 12 ipi 0: "interrupt-controller"
 agintcmsi0 at agintc0
 "clock-controller" at simplebus0 not configured
@@ -200,7 +202,6 @@
 "gpu" at simplebus0 not configured
 "gmu" at simplebus0 not configured
 "clock-controller" at simplebus0 not configured
-smmu0 at simplebus0: disabled
 "interconnect" at simplebus0 not configured
 "interconnect" at simplebus0 not configured
 qcpas0 at simplebus0
@@ -315,7 +316,6 @@
 "tpdm" at simplebus0 not configured
 "tpda" at simplebus0 not configured
 "funnel" at simplebus0 not configured
-smmu1 at simplebus0: disabled
 qccpucp0 at simplebus0
 "rsc" at simplebus0 not configured
 "timer" at simplebus0 not configured