[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=WBkGMXPvuLaQ0n2V3UgAQajvYg=dPwZNx-TnpXMV1bvw@mail.gmail.com>
Date: Fri, 5 Nov 2021 13:49:30 -0700
From: Doug Anderson <dianders@...omium.org>
To: Rob Clark <robdclark@...il.com>
Cc: dri-devel@...ts.freedesktop.org,
Rob Clark <robdclark@...omium.org>,
David Airlie <airlied@...ux.ie>, linux-arm-msm@...r.kernel.org,
open list <linux-kernel@...r.kernel.org>,
Sean Paul <sean@...rly.run>, freedreno@...ts.freedesktop.org
Subject: Re: [PATCH 2/2] drm/msm/gpu: Respect PM QoS constraints
Hi,
On Wed, Nov 3, 2021 at 1:59 PM Rob Clark <robdclark@...il.com> wrote:
>
> From: Rob Clark <robdclark@...omium.org>
>
> Signed-off-by: Rob Clark <robdclark@...omium.org>
> ---
> drivers/gpu/drm/msm/msm_gpu_devfreq.c | 31 +++++++++++++++++++++++++--
> 1 file changed, 29 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/gpu/drm/msm/msm_gpu_devfreq.c
> index b24e5475cafb..427c55002f4d 100644
> --- a/drivers/gpu/drm/msm/msm_gpu_devfreq.c
> +++ b/drivers/gpu/drm/msm/msm_gpu_devfreq.c
> @@ -158,6 +158,33 @@ void msm_devfreq_suspend(struct msm_gpu *gpu)
> devfreq_suspend_device(gpu->devfreq.devfreq);
> }
>
> +static void set_target(struct msm_gpu *gpu, unsigned long freq)
> +{
> + struct msm_gpu_devfreq *df = &gpu->devfreq;
> + unsigned long min_freq, max_freq;
> + u32 flags = 0;
> +
> + /*
> + * When setting the target freq internally, we need to apply PM QoS
> + * constraints (such as cooling):
> + */
> + min_freq = dev_pm_qos_read_value(df->devfreq->dev.parent,
> + DEV_PM_QOS_MIN_FREQUENCY);
Chatted with Rob offline about this, but to document on the lists for
those playing at home: the above function isn't exported to modules,
so this will fail with "allmodconfig".
In general this isn't the right approach here. I believe that the
right approach is to boost with freq_qos_update_request() and then
kick off a timer to stop boosting after a fixed period of time.
-Doug
Powered by blists - more mailing lists