From mboxrd@z Thu Jan 1 00:00:00 1970 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 0B7A5CCD187 for ; Thu, 9 Oct 2025 10:29:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D10110E207; Thu, 9 Oct 2025 10:29:19 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id E53B910E207 for ; Thu, 9 Oct 2025 10:29:18 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5A4A7176A; Thu, 9 Oct 2025 03:29:10 -0700 (PDT) Received: from [10.1.34.29] (e122027.cambridge.arm.com [10.1.34.29]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7AF7F3F738; Thu, 9 Oct 2025 03:29:16 -0700 (PDT) Message-ID: Date: Thu, 9 Oct 2025 11:29:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/panthor: Ensure MCU is disabled on suspend To: Ketil Johnsen , Boris Brezillon , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20251008105112.4077015-1-ketil.johnsen@arm.com> From: Steven Price Content-Language: en-GB In-Reply-To: <20251008105112.4077015-1-ketil.johnsen@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 08/10/2025 11:51, Ketil Johnsen wrote: > Currently the Panthor driver needs the GPU to be powered down > between suspend and resume. If this is not done, then the > MCU_CONTROL register will be preserved as AUTO, which again will > cause a premature FW boot on resume. The FW will go directly into > fatal state in this case. > > This case needs to be handled as there is no guarantee that the > GPU will be powered down after the suspend callback on all platforms. > > The fix is to call panthor_fw_stop() in "pre-reset" path to ensure > the MCU_CONTROL register is cleared (set DISABLE). This matches > well with the already existing call to panthor_fw_start() from the > "post-reset" path. > > Signed-off-by: Ketil Johnsen Reviewed-by: Steven Price Do we need a Fixes tag? Or is this only actually an issue on newer GPUs? Thanks, Steve > --- > drivers/gpu/drm/panthor/panthor_fw.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c > index 9bf06e55eaee..df767e82148a 100644 > --- a/drivers/gpu/drm/panthor/panthor_fw.c > +++ b/drivers/gpu/drm/panthor/panthor_fw.c > @@ -1099,6 +1099,7 @@ void panthor_fw_pre_reset(struct panthor_device *ptdev, bool on_hang) > } > > panthor_job_irq_suspend(&ptdev->fw->irq); > + panthor_fw_stop(ptdev); > } > > /**