dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/panfrost: Ensure GPU quirks are always initialised
@ 2020-09-09 12:29 Steven Price
  2020-09-09 14:13 ` Alyssa Rosenzweig
  2020-09-10 13:42 ` Steven Price
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Price @ 2020-09-09 12:29 UTC (permalink / raw)
  To: Daniel Vetter, David Airlie, Rob Herring, Tomeu Vizoso
  Cc: Neil Armstrong, linux-kernel, dri-devel, Steven Price,
	Alyssa Rosenzweig, Marty E. Plummer

The GPU 'CONFIG' registers used to work around hardware issues are
cleared on reset so need to be programmed every time the GPU is reset.
However panfrost_device_reset() failed to do this.

To avoid this in future instead move the call to
panfrost_gpu_init_quirks() to panfrost_gpu_power_on() so that the
regsiters are always programmed just before the cores are powered.

Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Signed-off-by: Steven Price <steven.price@arm.com>
---
 drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c
index e0f190e43813..6d17d3cbd1df 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gpu.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c
@@ -305,6 +305,8 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev)
 	int ret;
 	u32 val;
 
+	panfrost_gpu_init_quirks(pfdev);
+
 	/* Just turn on everything for now */
 	gpu_write(pfdev, L2_PWRON_LO, pfdev->features.l2_present);
 	ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO,
@@ -356,7 +358,6 @@ int panfrost_gpu_init(struct panfrost_device *pfdev)
 		return err;
 	}
 
-	panfrost_gpu_init_quirks(pfdev);
 	panfrost_gpu_power_on(pfdev);
 
 	return 0;
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/panfrost: Ensure GPU quirks are always initialised
  2020-09-09 12:29 [PATCH] drm/panfrost: Ensure GPU quirks are always initialised Steven Price
@ 2020-09-09 14:13 ` Alyssa Rosenzweig
  2020-09-10 13:42 ` Steven Price
  1 sibling, 0 replies; 3+ messages in thread
From: Alyssa Rosenzweig @ 2020-09-09 14:13 UTC (permalink / raw)
  To: Steven Price
  Cc: Tomeu Vizoso, Neil Armstrong, David Airlie, linux-kernel,
	dri-devel, Marty E. Plummer


[-- Attachment #1.1: Type: text/plain, Size: 857 bytes --]

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>

> diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c
> index e0f190e43813..6d17d3cbd1df 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c
> @@ -305,6 +305,8 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev)
>  	int ret;
>  	u32 val;
>  
> +	panfrost_gpu_init_quirks(pfdev);
> +
>  	/* Just turn on everything for now */
>  	gpu_write(pfdev, L2_PWRON_LO, pfdev->features.l2_present);
>  	ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO,
> @@ -356,7 +358,6 @@ int panfrost_gpu_init(struct panfrost_device *pfdev)
>  		return err;
>  	}
>  
> -	panfrost_gpu_init_quirks(pfdev);
>  	panfrost_gpu_power_on(pfdev);
>  
>  	return 0;
> -- 
> 2.20.1
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/panfrost: Ensure GPU quirks are always initialised
  2020-09-09 12:29 [PATCH] drm/panfrost: Ensure GPU quirks are always initialised Steven Price
  2020-09-09 14:13 ` Alyssa Rosenzweig
@ 2020-09-10 13:42 ` Steven Price
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Price @ 2020-09-10 13:42 UTC (permalink / raw)
  To: Daniel Vetter, David Airlie, Rob Herring, Tomeu Vizoso
  Cc: Marty E. Plummer, Alyssa Rosenzweig, linux-kernel, dri-devel,
	Neil Armstrong

On 09/09/2020 13:29, Steven Price wrote:
> The GPU 'CONFIG' registers used to work around hardware issues are
> cleared on reset so need to be programmed every time the GPU is reset.
> However panfrost_device_reset() failed to do this.
> 
> To avoid this in future instead move the call to
> panfrost_gpu_init_quirks() to panfrost_gpu_power_on() so that the
> regsiters are always programmed just before the cores are powered.
> 
> Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
> Signed-off-by: Steven Price <steven.price@arm.com>

Applied to drm-misc-next

Steve
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-10 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 12:29 [PATCH] drm/panfrost: Ensure GPU quirks are always initialised Steven Price
2020-09-09 14:13 ` Alyssa Rosenzweig
2020-09-10 13:42 ` Steven Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).