From patchwork Tue Sep 10 17:57:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 13799191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2BC0EDE9AE for ; Tue, 10 Sep 2024 18:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UdsjWTXbmVti8Q5EOK2QF7SQEemgycpVHgvmbg/SSfM=; b=Go15sQTlqxkSBe +zM/nnUxVkJ5MTRlR/2ravyNua18CRrpf7kGJ0EtBMBuOVSctjwLhpXikhxq4AihlhREFdZYj/icE g9hUpKKfFM7Dj6dhDdedl2uLODbkB5KMsxjwHsTHZNYrhT2ip7IXOa2SGC0YhvJwCd0SACqz+kB0s xXaTdardphgKz7snX8IfdV/aNiPhPJhtBvIMTeqIo6vI45RYa74zbnxqf/mvbZ0NPql+am3SAj1GB nwI00jq68p2zjagEtrZOaYVbVtnGjU2Ql2uucJHioXkWto5DEykYHnr22LMo5a8loy5ouwJgXpU1T AOGMsEDR9TdkyhdaMOUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1so5FB-00000006h8P-44J8; Tue, 10 Sep 2024 18:05:37 +0000 Received: from bali.collaboradmins.com ([2a01:4f8:201:9162::2]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1so5F8-00000006h5k-12iq for linux-rockchip@lists.infradead.org; Tue, 10 Sep 2024 18:05:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1725991531; bh=kEZ+U8Z66xptCiF1McdzJy5YJA7WQzf6RD2McVh/daI=; h=From:To:Cc:Subject:Date:From; b=V/aW2UEbOfT4WTlIRZdoHx0XfdQEDeYDPfs0w+9lizFejRIZqyLfx6NXtB7AxtQjN R1HNiEklDd5l5HQ8eD8m/KXyEmFnl2s+j1aRSZtkItVFx4awBuS6WQVnCw+6I50k2x hQ28dchLe/7joasDbNXMgCxT4229ACEwrJNTC1z1MKbJ+42R860z+n3/EABOisHfJg EIxlDDGB0kmaXFm9hRNF7RIvzbYR14h3wCGf112WwTsjm8KWuWWjrIzWzsZG1Gl+jo p9pUXl4bK8Yu/pZuEYdiZSBlEt3ulmw8+DgkHsxq3Pd52A3DWbJsf6o31VnAL9Q2IO 07t53l8DYNDaQ== Received: from jupiter.universe (dyndsl-091-248-215-127.ewe-ip-backbone.de [91.248.215.127]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sre) by bali.collaboradmins.com (Postfix) with ESMTPSA id D039D17E35F8; Tue, 10 Sep 2024 20:05:31 +0200 (CEST) Received: by jupiter.universe (Postfix, from userid 1000) id 8B0324800EA; Tue, 10 Sep 2024 20:05:31 +0200 (CEST) From: Sebastian Reichel To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Ulf Hansson Cc: Elaine Zhang , =?utf-8?q?Adri=C3=A1n_Mart?= =?utf-8?q?=C3=ADnez_Larumbe?= , Boris Brezillon , devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH v1 0/6] Fix RK3588 GPU domain Date: Tue, 10 Sep 2024 19:57:09 +0200 Message-ID: <20240910180530.47194-1-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240910_110534_509477_2A933F53 X-CRM114-Status: GOOD ( 16.33 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Hi, I got a report, that the Linux kernel crashes on Rock 5B when the panthor driver is loaded late after booting. The crash starts with the following shortened error print: rockchip-pm-domain fd8d8000.power-management:power-controller: failed to set domain 'gpu', val=0 rockchip-pm-domain fd8d8000.power-management:power-controller: failed to get ack on domain 'gpu', val=0xa9fff SError Interrupt on CPU4, code 0x00000000be000411 -- SError This series first does some cleanups in the Rockchip power domain driver and changes the driver, so that it no longer tries to continue when it fails to enable a domain. This gets rid of the SError interrupt and long backtraces. But the kernel still hangs when it fails to enable a power domain. I have not done further analysis to check if that can be avoided. Last but not least this provides a fix for the GPU power domain failing to get enabled - after some testing from my side it seems to require the GPU voltage supply to be enabled. I'm not really happy about the hack to get a regulator for a sub-node in the 5th patch, which I took over from the Mediatek driver. But to get things going and open a discussion around it I thought it would be best to send a first version as soon as possible. Greetings, -- Sebastian Sebastian Reichel (6): pmdomain: rockchip: forward rockchip_do_pmu_set_power_domain errors pmdomain: rockchip: cleanup mutex handling in rockchip_pd_power pmdomain: rockchip: reduce indention in rockchip_pd_power dt-bindings: power: rockchip: add regulator support pmdomain: rockchip: add regulator support arm64: dts: rockchip: Add GPU power domain regulator dependency for RK3588 .../power/rockchip,power-controller.yaml | 3 + .../boot/dts/rockchip/rk3588-armsom-sige7.dts | 4 + arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 +- .../boot/dts/rockchip/rk3588-coolpi-cm5.dtsi | 4 + .../rockchip/rk3588-friendlyelec-cm3588.dtsi | 4 + .../arm64/boot/dts/rockchip/rk3588-jaguar.dts | 4 + .../boot/dts/rockchip/rk3588-ok3588-c.dts | 4 + .../boot/dts/rockchip/rk3588-rock-5-itx.dts | 4 + .../boot/dts/rockchip/rk3588-rock-5b.dts | 4 + .../arm64/boot/dts/rockchip/rk3588-tiger.dtsi | 4 + .../boot/dts/rockchip/rk3588s-coolpi-4b.dts | 4 + .../dts/rockchip/rk3588s-khadas-edge2.dts | 4 + .../boot/dts/rockchip/rk3588s-orangepi-5.dts | 4 + drivers/pmdomain/rockchip/pm-domains.c | 130 +++++++++++++----- 14 files changed, 144 insertions(+), 35 deletions(-) Tested-by: Adrian Larumbe