The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] drm/msm/devfreq: Fix OPP refcnt leak
@ 2021-11-04 22:28 Rob Clark
  2021-11-05  0:11 ` Doug Anderson
  2021-11-05  4:32 ` Steev Klimaszewski
  0 siblings, 2 replies; 4+ messages in thread
From: Rob Clark @ 2021-11-04 22:28 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-arm-msm, freedreno, Rob Clark, Douglas Anderson, Rob Clark,
	Sean Paul, David Airlie, Daniel Vetter, open list

From: Rob Clark <robdclark@chromium.org>

Reported-by: Douglas Anderson <dianders@chromium.org>
Fixes: 9bc95570175a ("drm/msm: Devfreq tuning")
Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 drivers/gpu/drm/msm/msm_gpu_devfreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/gpu/drm/msm/msm_gpu_devfreq.c
index d32b729b4616..9bf8600b6eea 100644
--- a/drivers/gpu/drm/msm/msm_gpu_devfreq.c
+++ b/drivers/gpu/drm/msm/msm_gpu_devfreq.c
@@ -20,8 +20,6 @@ static int msm_devfreq_target(struct device *dev, unsigned long *freq,
 	struct msm_gpu *gpu = dev_to_gpu(dev);
 	struct dev_pm_opp *opp;
 
-	opp = devfreq_recommended_opp(dev, freq, flags);
-
 	/*
 	 * If the GPU is idle, devfreq is not aware, so just ignore
 	 * it's requests
@@ -31,6 +29,8 @@ static int msm_devfreq_target(struct device *dev, unsigned long *freq,
 		return 0;
 	}
 
+	opp = devfreq_recommended_opp(dev, freq, flags);
+
 	if (IS_ERR(opp))
 		return PTR_ERR(opp);
 
-- 
2.31.1


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

end of thread, other threads:[~2021-11-05 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-04 22:28 [PATCH] drm/msm/devfreq: Fix OPP refcnt leak Rob Clark
2021-11-05  0:11 ` Doug Anderson
2021-11-05  4:32 ` Steev Klimaszewski
2021-11-05 15:29   ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox