linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/msm/gpu: Fix idle_work time
@ 2021-11-19 22:51 Rob Clark
  2021-11-19 22:51 ` [PATCH 2/2] drm/msm/gpu: Respect PM QoS constraints Rob Clark
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rob Clark @ 2021-11-19 22:51 UTC (permalink / raw)
  To: dri-devel
  Cc: freedreno, linux-arm-msm, Rob Clark, Rob Clark, Sean Paul,
	David Airlie, Daniel Vetter, open list

From: Rob Clark <robdclark@chromium.org>

This was supposed to be a relative timer, not absolute.

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 drivers/gpu/drm/msm/msm_gpu_devfreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/gpu/drm/msm/msm_gpu_devfreq.c
index 43468919df61..7285041c737e 100644
--- a/drivers/gpu/drm/msm/msm_gpu_devfreq.c
+++ b/drivers/gpu/drm/msm/msm_gpu_devfreq.c
@@ -228,5 +228,5 @@ void msm_devfreq_idle(struct msm_gpu *gpu)
 	struct msm_gpu_devfreq *df = &gpu->devfreq;
 
 	msm_hrtimer_queue_work(&df->idle_work, ms_to_ktime(1),
-			       HRTIMER_MODE_ABS);
+			       HRTIMER_MODE_REL);
 }
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH 1/2] drm/msm/devfreq: Add some locking asserts
@ 2021-11-03 21:04 Rob Clark
  2021-11-03 21:04 ` [PATCH 2/2] drm/msm/gpu: Respect PM QoS constraints Rob Clark
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Clark @ 2021-11-03 21:04 UTC (permalink / raw)
  To: dri-devel
  Cc: freedreno, linux-arm-msm, Rob Clark, Rob Clark, Sean Paul,
	David Airlie, Daniel Vetter, open list

From: Rob Clark <robdclark@chromium.org>

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 drivers/gpu/drm/msm/msm_gpu_devfreq.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/gpu/drm/msm/msm_gpu_devfreq.c
index 47b3cf2df230..b24e5475cafb 100644
--- a/drivers/gpu/drm/msm/msm_gpu_devfreq.c
+++ b/drivers/gpu/drm/msm/msm_gpu_devfreq.c
@@ -20,6 +20,8 @@ static int msm_devfreq_target(struct device *dev, unsigned long *freq,
 	struct msm_gpu *gpu = dev_to_gpu(dev);
 	struct dev_pm_opp *opp;
 
+	WARN_ON(!mutex_is_locked(&gpu->devfreq.devfreq->lock));
+
 	opp = devfreq_recommended_opp(dev, freq, flags);
 
 	/*
@@ -63,6 +65,8 @@ static int msm_devfreq_get_dev_status(struct device *dev,
 	struct msm_gpu *gpu = dev_to_gpu(dev);
 	ktime_t time;
 
+	WARN_ON(!mutex_is_locked(&gpu->devfreq.devfreq->lock));
+
 	status->current_frequency = get_freq(gpu);
 	status->busy_time = gpu->funcs->gpu_busy(gpu);
 
@@ -75,7 +79,11 @@ static int msm_devfreq_get_dev_status(struct device *dev,
 
 static int msm_devfreq_get_cur_freq(struct device *dev, unsigned long *freq)
 {
-	*freq = get_freq(dev_to_gpu(dev));
+	struct msm_gpu *gpu = dev_to_gpu(dev);
+
+	WARN_ON(!mutex_is_locked(&gpu->devfreq.devfreq->lock));
+
+	*freq = get_freq(gpu);
 
 	return 0;
 }
-- 
2.31.1


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

end of thread, other threads:[~2021-11-20 18:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 22:51 [PATCH 1/2] drm/msm/gpu: Fix idle_work time Rob Clark
2021-11-19 22:51 ` [PATCH 2/2] drm/msm/gpu: Respect PM QoS constraints Rob Clark
2021-11-20  0:21   ` Doug Anderson
2021-11-20 18:08     ` Rob Clark
2021-11-19 22:55 ` [PATCH 1/2] drm/msm/gpu: Fix idle_work time Rob Clark
2021-11-19 23:38 ` Doug Anderson
  -- strict thread matches above, loose matches on Subject: below --
2021-11-03 21:04 [PATCH 1/2] drm/msm/devfreq: Add some locking asserts Rob Clark
2021-11-03 21:04 ` [PATCH 2/2] drm/msm/gpu: Respect PM QoS constraints Rob Clark
2021-11-05 20:49   ` Doug Anderson

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).