[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200713234614.GB24345@jcrouse1-lnx.qualcomm.com>
Date: Mon, 13 Jul 2020 17:46:14 -0600
From: Jordan Crouse <jcrouse@...eaurora.org>
To: Jonathan Marek <jonathan@...ek.ca>
Cc: freedreno@...ts.freedesktop.org, David Airlie <airlied@...ux.ie>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<linux-arm-msm@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<dri-devel@...ts.freedesktop.org>, Rob Clark <robdclark@...il.com>,
Daniel Vetter <daniel@...ll.ch>, Sean Paul <sean@...rly.run>
Subject: Re: [Freedreno] [PATCH v4 2/3] drm/msm: reset devfreq
freq_table/max_state before devfreq_add_device
On Mon, Jul 13, 2020 at 06:53:41PM -0400, Jonathan Marek wrote:
> These never get set back to 0 when probing fails, so an attempt to probe
> again results in broken behavior. Fix the problem by setting thse to zero
> before they are used.
Reviewed-by: Jordan Crouse <jcrouse@...eaurora.org>
> Signed-off-by: Jonathan Marek <jonathan@...ek.ca>
> ---
> drivers/gpu/drm/msm/msm_gpu.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
> index a22d30622306..aa9775ab52f0 100644
> --- a/drivers/gpu/drm/msm/msm_gpu.c
> +++ b/drivers/gpu/drm/msm/msm_gpu.c
> @@ -93,7 +93,11 @@ static void msm_devfreq_init(struct msm_gpu *gpu)
> /*
> * Don't set the freq_table or max_state and let devfreq build the table
> * from OPP
> + * After a deferred probe, these may have be left to non-zero values,
> + * so set them back to zero before creating the devfreq device
> */
> + msm_devfreq_profile.freq_table = NULL;
> + msm_devfreq_profile.max_state = 0;
>
> gpu->devfreq.devfreq = devm_devfreq_add_device(&gpu->pdev->dev,
> &msm_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
> --
> 2.26.1
>
> _______________________________________________
> Freedreno mailing list
> Freedreno@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/freedreno
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Powered by blists - more mailing lists