2020-01-09 13:42:15

by Steven Price

[permalink] [raw]
Subject: [PATCH] drm/panfrost: Remove core stack power management

Explict management of the GPU's core stacks is only necessary in the
case of a broken integration with the PDC. Since there are no known
platforms which have such a broken integration let's remove the explict
control from the driver since this apparently causes problems on other
platforms and will have a small performance penality.

The out of tree mali_kbase driver contains this text regarding
controlling the core stack (CONFIGMALI_CORESTACK):

Enabling this feature on supported GPUs will let the driver powering
on/off the GPU core stack independently without involving the Power
Domain Controller. This should only be enabled on platforms which
integration of the PDC to the Mali GPU is known to be problematic.
This feature is currently only supported on t-Six and t-HEx GPUs.

If unsure, say N.

Signed-off-by: Steven Price <[email protected]>
---
drivers/gpu/drm/panfrost/panfrost_gpu.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c
index 8822ec13a0d6..460fc190de6e 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gpu.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c
@@ -309,10 +309,6 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev)
ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO,
val, val == pfdev->features.l2_present, 100, 1000);

- gpu_write(pfdev, STACK_PWRON_LO, pfdev->features.stack_present);
- ret |= readl_relaxed_poll_timeout(pfdev->iomem + STACK_READY_LO,
- val, val == pfdev->features.stack_present, 100, 1000);
-
gpu_write(pfdev, SHADER_PWRON_LO, pfdev->features.shader_present);
ret |= readl_relaxed_poll_timeout(pfdev->iomem + SHADER_READY_LO,
val, val == pfdev->features.shader_present, 100, 1000);
@@ -329,7 +325,6 @@ void panfrost_gpu_power_off(struct panfrost_device *pfdev)
{
gpu_write(pfdev, TILER_PWROFF_LO, 0);
gpu_write(pfdev, SHADER_PWROFF_LO, 0);
- gpu_write(pfdev, STACK_PWROFF_LO, 0);
gpu_write(pfdev, L2_PWROFF_LO, 0);
}

--
2.20.1


2020-01-09 16:18:21

by Alyssa Rosenzweig

[permalink] [raw]
Subject: Re: [PATCH] drm/panfrost: Remove core stack power management

A-b

On Thu, Jan 09, 2020 at 01:31:04PM +0000, Steven Price wrote:
> Explict management of the GPU's core stacks is only necessary in the
> case of a broken integration with the PDC. Since there are no known
> platforms which have such a broken integration let's remove the explict
> control from the driver since this apparently causes problems on other
> platforms and will have a small performance penality.
>
> The out of tree mali_kbase driver contains this text regarding
> controlling the core stack (CONFIGMALI_CORESTACK):
>
> Enabling this feature on supported GPUs will let the driver powering
> on/off the GPU core stack independently without involving the Power
> Domain Controller. This should only be enabled on platforms which
> integration of the PDC to the Mali GPU is known to be problematic.
> This feature is currently only supported on t-Six and t-HEx GPUs.
>
> If unsure, say N.
>
> Signed-off-by: Steven Price <[email protected]>
> ---
> drivers/gpu/drm/panfrost/panfrost_gpu.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c
> index 8822ec13a0d6..460fc190de6e 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c
> @@ -309,10 +309,6 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev)
> ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO,
> val, val == pfdev->features.l2_present, 100, 1000);
>
> - gpu_write(pfdev, STACK_PWRON_LO, pfdev->features.stack_present);
> - ret |= readl_relaxed_poll_timeout(pfdev->iomem + STACK_READY_LO,
> - val, val == pfdev->features.stack_present, 100, 1000);
> -
> gpu_write(pfdev, SHADER_PWRON_LO, pfdev->features.shader_present);
> ret |= readl_relaxed_poll_timeout(pfdev->iomem + SHADER_READY_LO,
> val, val == pfdev->features.shader_present, 100, 1000);
> @@ -329,7 +325,6 @@ void panfrost_gpu_power_off(struct panfrost_device *pfdev)
> {
> gpu_write(pfdev, TILER_PWROFF_LO, 0);
> gpu_write(pfdev, SHADER_PWROFF_LO, 0);
> - gpu_write(pfdev, STACK_PWROFF_LO, 0);
> gpu_write(pfdev, L2_PWROFF_LO, 0);
> }
>
> --
> 2.20.1
>


Attachments:
(No filename) (2.19 kB)
signature.asc (849.00 B)
Download all attachments

2020-01-10 03:31:52

by Nicolas Boichat

[permalink] [raw]
Subject: Re: [PATCH] drm/panfrost: Remove core stack power management

On Thu, Jan 9, 2020 at 9:44 PM Alyssa Rosenzweig
<[email protected]> wrote:
>
> A-b
>
> On Thu, Jan 09, 2020 at 01:31:04PM +0000, Steven Price wrote:
> > Explict management of the GPU's core stacks is only necessary in the
> > case of a broken integration with the PDC. Since there are no known
> > platforms which have such a broken integration let's remove the explict
> > control from the driver since this apparently causes problems on other
> > platforms and will have a small performance penality.
> >
> > The out of tree mali_kbase driver contains this text regarding
> > controlling the core stack (CONFIGMALI_CORESTACK):
> >
> > Enabling this feature on supported GPUs will let the driver powering
> > on/off the GPU core stack independently without involving the Power
> > Domain Controller. This should only be enabled on platforms which
> > integration of the PDC to the Mali GPU is known to be problematic.
> > This feature is currently only supported on t-Six and t-HEx GPUs.
> >
> > If unsure, say N.
> >

Work on my G-72 Bifrost, no more errors on power on!

Reviewed-by: Nicolas Boichat <[email protected]>
Tested-by: Nicolas Boichat <[email protected]>

> > Signed-off-by: Steven Price <[email protected]>
> > ---
> > drivers/gpu/drm/panfrost/panfrost_gpu.c | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c
> > index 8822ec13a0d6..460fc190de6e 100644
> > --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c
> > +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c
> > @@ -309,10 +309,6 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev)
> > ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO,
> > val, val == pfdev->features.l2_present, 100, 1000);
> >
> > - gpu_write(pfdev, STACK_PWRON_LO, pfdev->features.stack_present);
> > - ret |= readl_relaxed_poll_timeout(pfdev->iomem + STACK_READY_LO,
> > - val, val == pfdev->features.stack_present, 100, 1000);
> > -
> > gpu_write(pfdev, SHADER_PWRON_LO, pfdev->features.shader_present);
> > ret |= readl_relaxed_poll_timeout(pfdev->iomem + SHADER_READY_LO,
> > val, val == pfdev->features.shader_present, 100, 1000);
> > @@ -329,7 +325,6 @@ void panfrost_gpu_power_off(struct panfrost_device *pfdev)
> > {
> > gpu_write(pfdev, TILER_PWROFF_LO, 0);
> > gpu_write(pfdev, SHADER_PWROFF_LO, 0);
> > - gpu_write(pfdev, STACK_PWROFF_LO, 0);
> > gpu_write(pfdev, L2_PWROFF_LO, 0);
> > }
> >
> > --
> > 2.20.1
> >