On Thu, 27 Feb 2025 17:58:06 +0100
Marek Vasut <ma...@denx.de> 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 <ma...@denx.de>
> ---
> Cc: Boris Brezillon <boris.brezil...@collabora.com>
> Cc: Conor Dooley <conor...@kernel.org>
> Cc: David Airlie <airl...@gmail.com>
> Cc: Fabio Estevam <feste...@gmail.com>
> Cc: Krzysztof Kozlowski <krzk...@kernel.org>
> Cc: Liviu Dudau <liviu.du...@arm.com>
> Cc: Maarten Lankhorst <maarten.lankho...@linux.intel.com>
> Cc: Maxime Ripard <mrip...@kernel.org>
> Cc: Pengutronix Kernel Team <ker...@pengutronix.de>
> Cc: Philipp Zabel <p.za...@pengutronix.de>
> Cc: Rob Herring <r...@kernel.org>
> Cc: Sascha Hauer <s.ha...@pengutronix.de>
> Cc: Sebastian Reichel <s...@kernel.org>
> Cc: Shawn Guo <shawn...@kernel.org>
> Cc: Simona Vetter <sim...@ffwll.ch>
> Cc: Steven Price <steven.pr...@arm.com>
> Cc: Thomas Zimmermann <tzimmerm...@suse.de>
> Cc: devicet...@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: i...@lists.linux.dev
> Cc: linux-arm-ker...@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.

Reply via email to