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 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 139FEC197BF for ; Thu, 27 Feb 2025 19:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jW8XENelR7IrheWL51sWAVGL+9rD1gdYVfPDH+Wk8Q4=; b=HPWNWVaXZCYqNot0Y31XY+nlLD sa7xYt8jSsFOb1FYqJShh5yVDBpUsz3zsvWsNzabyp8FnAp74TpM/qqSLqbZBPmcs1FNS4uAmRKsR MkXS3YNSd6cRwxruN36AWtjmEpQY+CcNZAy/mZ7vd0oheqRfnSrdG/lqagP/TXcOTH+QMFOkxOEyo P1lvuhvmjEybWRB5rUcgoL8OUSYMZQel9ron+9Szsr71t93HdzE7c3geUuqRklPw2K4iOyb2CBmSZ SASW/zx9kfQVH9cYB9DThhiNxAUl74Tl8EA3stetjpoNZWXYOuiUwaV+dWnNI82Tqg0CGtUM1i8T1 +9b214YA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tnjko-00000008abk-09gc; Thu, 27 Feb 2025 19:41:06 +0000 Received: from bali.collaboradmins.com ([2a01:4f8:201:9162::2]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tnhWG-00000008C5d-2f7s for linux-arm-kernel@lists.infradead.org; Thu, 27 Feb 2025 17:17:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1740676673; bh=hxQY0yRqvwsxj3tZRp3k9/6ZjAfhlAbWVvGg1ApCM6k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RJwb/Ot9/XVpXFQbOQONVL2lxfhSIHxSMuRaCA7wbnbRRd4QhyuwwcuiyJ/b3O7fu xf3NijODTeJPp5kGhdpbmh2SyUb1dq/pAfaxC3KFltwu0HLz04g09ttKOcrhh7spWP oOtEdYDqLMKgxLEB7uUb15U7a08j2sfdXchhqtf26Cv2bgfphx7fe3J6EpiN9h8Cp5 ajYFB9pvhAS0soCEHDTLEehUB3ZfBYksXmRMBjAvINTavwIzDEUC+gGZ4wEs/PVjK3 RrTn2RbqYuUitPcwPiyfoq+IvAMpqOelH2uz4iuvg3NIXLPfRrgQIGomDZbNbYwbaI yhToA1UEgbdwA== Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (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: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id 160A117E061D; Thu, 27 Feb 2025 18:17:53 +0100 (CET) Date: Thu, 27 Feb 2025 18:17:48 +0100 From: Boris Brezillon To: Marek Vasut Cc: linux-arm-kernel@lists.infradead.org, Conor Dooley , David Airlie , Fabio Estevam , Krzysztof Kozlowski , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Pengutronix Kernel Team , Philipp Zabel , Rob Herring , Sascha Hauer , Sebastian Reichel , Shawn Guo , Simona Vetter , Steven Price , Thomas Zimmermann , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, imx@lists.linux.dev Subject: Re: [PATCH 6/9] drm/panthor: Reset GPU after L2 cache power off Message-ID: <20250227181748.3f99d67e@collabora.com> In-Reply-To: <20250227170012.124768-7-marex@denx.de> References: <20250227170012.124768-1-marex@denx.de> <20250227170012.124768-7-marex@denx.de> Organization: Collabora X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250227_091756_861779_65C3C1C5 X-CRM114-Status: GOOD ( 21.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 27 Feb 2025 17:58:06 +0100 Marek Vasut wrote: > This seems necessary on Freescale i.MX95 Mali G310 to reliably resume > from runtime PM suspend. Without this, if only the L2 is powered down > on RPM entry, the GPU gets stuck and does not indicate the firmware is > booted after RPM resume. > > Signed-off-by: Marek Vasut > --- > Cc: Boris Brezillon > Cc: Conor Dooley > Cc: David Airlie > Cc: Fabio Estevam > Cc: Krzysztof Kozlowski > Cc: Liviu Dudau > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Pengutronix Kernel Team > Cc: Philipp Zabel > Cc: Rob Herring > Cc: Sascha Hauer > Cc: Sebastian Reichel > Cc: Shawn Guo > Cc: Simona Vetter > Cc: Steven Price > Cc: Thomas Zimmermann > Cc: devicetree@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Cc: imx@lists.linux.dev > Cc: linux-arm-kernel@lists.infradead.org > --- > drivers/gpu/drm/panthor/panthor_gpu.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c > index 671049020afaa..0f07ef7d9aea7 100644 > --- a/drivers/gpu/drm/panthor/panthor_gpu.c > +++ b/drivers/gpu/drm/panthor/panthor_gpu.c > @@ -470,11 +470,12 @@ int panthor_gpu_soft_reset(struct panthor_device *ptdev) > */ > void panthor_gpu_suspend(struct panthor_device *ptdev) > { > - /* On a fast reset, simply power down the L2. */ > - if (!ptdev->reset.fast) > - panthor_gpu_soft_reset(ptdev); > - else > - panthor_gpu_power_off(ptdev, L2, 1, 20000); > + /* > + * Power off the L2 and soft reset the GPU, that makes > + * iMX95 Mali G310 resume without firmware boot timeout. > + */ > + panthor_gpu_power_off(ptdev, L2, 1, 20000); > + panthor_gpu_soft_reset(ptdev); Unfortunately, if you do that unconditionally we no longer have a fast-reset. Would be good to figure out why the fast-reset doesn't work on this platform.