Commit 5dbe2711 authored by Rob Clark's avatar Rob Clark

drm/msm/gpu: Fix check for devices without devfreq

Looks like 658f4c82 ("drm/msm/devfreq: Add 1ms delay before
clamping freq") was badly rebased on top of efb8a170 ("drm/msm:
Fix devfreq NULL pointer dereference on a3xx") and ended up with
the NULL check in the wrong place.

Fixes: 658f4c82 ("drm/msm/devfreq: Add 1ms delay before clamping freq")
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20211120200103.1051459-2-robdclark@gmail.comSigned-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 26b6f1c8
...@@ -208,9 +208,6 @@ static void msm_devfreq_idle_work(struct kthread_work *work) ...@@ -208,9 +208,6 @@ static void msm_devfreq_idle_work(struct kthread_work *work)
struct msm_gpu *gpu = container_of(df, struct msm_gpu, devfreq); struct msm_gpu *gpu = container_of(df, struct msm_gpu, devfreq);
unsigned long idle_freq, target_freq = 0; unsigned long idle_freq, target_freq = 0;
if (!df->devfreq)
return;
/* /*
* Hold devfreq lock to synchronize with get_dev_status()/ * Hold devfreq lock to synchronize with get_dev_status()/
* target() callbacks * target() callbacks
...@@ -232,6 +229,9 @@ void msm_devfreq_idle(struct msm_gpu *gpu) ...@@ -232,6 +229,9 @@ void msm_devfreq_idle(struct msm_gpu *gpu)
{ {
struct msm_gpu_devfreq *df = &gpu->devfreq; struct msm_gpu_devfreq *df = &gpu->devfreq;
if (!df->devfreq)
return;
msm_hrtimer_queue_work(&df->idle_work, ms_to_ktime(1), msm_hrtimer_queue_work(&df->idle_work, ms_to_ktime(1),
HRTIMER_MODE_REL); HRTIMER_MODE_REL);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment