[Arm64-baikalm] [PATCH 2/2] arm64: device tree: baikal: mark GPU as dma-coherent

Alexey Sheplyakov asheplyakov на basealt.ru
Ср Янв 12 16:44:07 MSK 2022


From: Alexey Sheplyakov <asheplyakov at altlinux.org>

With memattr 0x888d88 (set by arm_mali_lpae_alloc_pgtable) GPU
(Mali T628 r1p0) experiences a lot of DATA_INVALID faults,
unhandled page faults, and other errors. Also the screen goes
black almost immediately.

On the other hand with memattr 0x484d48 (as set by mali_kbase)
the GPU appears to work just fine.

Robin Murphy <robin.murphy at arm.com> explains:

> using the outer-cacheable attribute is deliberate because it is necessary
> for I/O-coherent GPUs to work properly (and should be irrelevant for
> non-coherent integrations)

> I'd note that panfrost has been working OK - to the extent that Mesa
> supports its older ISA - on the T624 (single core group) in Arm's
> Juno SoC for over a year now since commit 268af50f38b1.

> If you have to force outer non-cacheable to avoid getting translation
> faults and other errors that look like the GPU is inexplicably seeing
> the wrong data, I'd check whether you have the same thing where your
> integration is actually I/O-coherent and you're missing the "dma-coherent"
> property in your DT.

Indeed setting the "gpu-coherent" property (and adjusting jobs
affinity for dual core group GPU) makes panfrost work just fine
on BE-M1000.
---
 src/kernel/arch/arm64/boot/dts/baikal/bm1000.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/kernel/arch/arm64/boot/dts/baikal/bm1000.dtsi b/src/kernel/arch/arm64/boot/dts/baikal/bm1000.dtsi
index 351775a9d..390f0a0c6 100644
--- a/src/kernel/arch/arm64/boot/dts/baikal/bm1000.dtsi
+++ b/src/kernel/arch/arm64/boot/dts/baikal/bm1000.dtsi
@@ -692,6 +692,7 @@
 			interrupt-names = "job", "mmu", "gpu";
 			clocks = <&cmu_mali>;
 			clock-names = "gpuclk";
+			dma-coherent;
 			operating-points-v2 = <&gpu_opp_table>;
 		};
 
-- 
2.32.0



Подробная информация о списке рассылки Arm64-baikalm