From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ABAB60A5BD1 for ; Thu, 29 Oct 2026 13:36:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HFEOnoUd Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 745A51122D5; Thu, 29 Oct 2026 13:36:31 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5CD6810E80F for ; Thu, 29 Oct 2026 13:36:20 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 80B4B605D1; Thu, 29 Oct 2026 13:36:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 061091F031E3; Thu, 29 Oct 2026 13:36:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793280979; bh=D4t+OAVjG6M5tU4SmWhkJ+1SJJ6e1CicZrtdCcJOq9c=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=HFEOnoUdBn6n6m+w0Rm5qLVQDSPjYXX7tfzRKEeI57PdJPcpbWe9Fysn78C9V/fPi J2qF9XPxXuEWbdTtzCbpynBOgy+5HMczW/fjpxhOp6TN5PcF1PFOBuYTRadR4alyqQ 8awUmPd/bpEGuhRKPW+Y4bs+DQyye1kqwRv294xmVSuSgQ2wAjcQIeDXy/9Em20qiA MKMBxAUVW9zkMudxzr8xFKIfqHNov8RJ7W+Ij6/qqGJC17/zRCha1DgPabs/gMWIM+ oV1Glpe3utLQFNtdQf+Db1IpGPApnGRTrZxuH3GDxhWsXsFsdSDMyCAk3K+NHNijvc qLYtYfPN+a0Dw== From: "Rob Herring (Arm)" Date: Thu, 29 Oct 2026 08:35:51 -0500 Subject: [PATCH v4 04/31] accel: ethosu: Disable clocks on PM setup failure X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261029-ethosu-fixes-v4-4-4aa25e22578e@kernel.org> References: <20261029-ethosu-fixes-v4-0-4aa25e22578e@kernel.org> In-Reply-To: <20261029-ethosu-fixes-v4-0-4aa25e22578e@kernel.org> To: Tomeu Vizoso , Oded Gabbay , Frank Li , Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16-dev X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "dri-devel" X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 ethosu_init() enables the clocks directly to reset and query the NPU before runtime PM takes over. If runtime-PM setup fails, the error path returns while those clocks remain enabled. Disable the clocks before returning the setup error to balance the initial direct resume. Fixes: 5a5e9c0228e6 ("accel: Add Arm Ethos-U NPU driver") Cc: stable@vger.kernel.org Signed-off-by: Rob Herring (Arm) --- v2: - new patch --- drivers/accel/ethosu/ethosu_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/accel/ethosu/ethosu_drv.c b/drivers/accel/ethosu/ethosu_drv.c index 9ee144c41550..1a65e9eef562 100644 --- a/drivers/accel/ethosu/ethosu_drv.c +++ b/drivers/accel/ethosu/ethosu_drv.c @@ -311,8 +311,10 @@ static int ethosu_init(struct ethosu_device *ethosudev) pm_runtime_set_autosuspend_delay(ethosudev->base.dev, 50); pm_runtime_use_autosuspend(ethosudev->base.dev); ret = devm_pm_runtime_set_active_enabled(ethosudev->base.dev); - if (ret) + if (ret) { + ethosu_device_suspend(ethosudev->base.dev); return ret; + } pm_runtime_get_noresume(ethosudev->base.dev); ethosudev->npu_info.id = id = readl_relaxed(ethosudev->regs + NPU_REG_ID); -- 2.53.0