Skip to content

Commit 49e4776

Browse files
committed
drm/msm: Switch ordering of runpm put vs devfreq_idle
In msm_devfreq_suspend() we cancel idle_work synchronously so that it doesn't run after we power of the hw or in the resume path. But this means that we want to ensure that idle_work is not scheduled *after* we no longer hold a runpm ref. So switch the ordering of pm_runtime_put() vs msm_devfreq_idle(). v2. Only move the runpm _put_autosuspend, and not the _mark_last_busy() Fixes: 9bc9557 ("drm/msm: Devfreq tuning") Signed-off-by: Rob Clark <robdclark@chromium.org> Link: https://lore.kernel.org/r/20210927152928.831245-1-robdclark@gmail.com Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20220608161334.2140611-1-robdclark@gmail.com Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent ce0db50 commit 49e4776

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/gpu/drm/msm/msm_gpu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,6 @@ static void retire_submit(struct msm_gpu *gpu, struct msm_ringbuffer *ring,
672672
msm_submit_retire(submit);
673673

674674
pm_runtime_mark_last_busy(&gpu->pdev->dev);
675-
pm_runtime_put_autosuspend(&gpu->pdev->dev);
676675

677676
spin_lock_irqsave(&ring->submit_lock, flags);
678677
list_del(&submit->node);
@@ -686,6 +685,8 @@ static void retire_submit(struct msm_gpu *gpu, struct msm_ringbuffer *ring,
686685
msm_devfreq_idle(gpu);
687686
mutex_unlock(&gpu->active_lock);
688687

688+
pm_runtime_put_autosuspend(&gpu->pdev->dev);
689+
689690
msm_gem_submit_put(submit);
690691
}
691692

0 commit comments

Comments
 (0)