From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.1 X-Yandex-Fwd: 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1653064206; bh=MP217v6ova6U6xqAY7X61CK6f/C6gCQhCIkdjkp1hjY=; h=Reply-To:In-Reply-To:References:Date:Subject:Cc:To:From: Message-Id; b=cnBQ3ns68QhhEfVNv8J2x6kPM/KwR7xOK8kRrRr49L4K0DP6UaxiWjyoGys5r5LWK 5JpAOI/ZQj8HexEfT391DP4R/hDwhzHRZ3+V2cG6w8J1fROqKw1wR4ITFgThKoD6pH oo7BppK4jgmvfy+5TAX7mMMDD+wYgkC0arc+D3hM= Authentication-Results: sas1-c5718652e2f2.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru From: asheplyakov@yandex.ru To: devel@lists.altlinux.org Date: Fri, 20 May 2022 20:28:42 +0400 Message-Id: <20220520162849.1554351-29-asheplyakov@yandex.ru> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220520162849.1554351-1-asheplyakov@yandex.ru> References: <20220520162849.1554351-1-asheplyakov@yandex.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Vitaly Chikunov , Igor Chudov , Alexey Sheplyakov , Evgeny Sinelnikov Subject: [devel] [PATCH 28/35] arm64: device tree: baikal: mark GPU as dma-coherent X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2022 16:30:29 -0000 Archived-At: List-Archive: List-Post: From: Alexey Sheplyakov 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 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 "gpu-coherent" property (and adjusting jobs affinity for dual core group GPU) makes panfrost work just fine on Baikal-M. X-DONTUPSTREAM X-feature-Baikal-M --- arch/arm64/boot/dts/baikal/bm1000.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/baikal/bm1000.dtsi b/arch/arm64/boot/dts/baikal/bm1000.dtsi index bc69835c4d4f..cc4e7d199c27 100644 --- a/arch/arm64/boot/dts/baikal/bm1000.dtsi +++ b/arch/arm64/boot/dts/baikal/bm1000.dtsi @@ -692,6 +692,7 @@ gpu: gpu@2a200000 { interrupt-names = "job", "mmu", "gpu"; clocks = <&cmu_mali>; clock-names = "gpuclk"; + dma-coherent; operating-points-v2 = <&gpu_opp_table>; }; -- 2.32.0