We should be holding a runpm ref when we try to set/clear GMU OOB
requests.  Apparently we'd been getting autosuspend lucky before.

Signed-off-by: Rob Clark <[email protected]>
---
 drivers/gpu/drm/msm/msm_submitqueue.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/msm_submitqueue.c 
b/drivers/gpu/drm/msm/msm_submitqueue.c
index d307cdd17d90..e3e7c401fa5c 100644
--- a/drivers/gpu/drm/msm/msm_submitqueue.c
+++ b/drivers/gpu/drm/msm/msm_submitqueue.c
@@ -9,6 +9,7 @@
 
 int msm_context_set_sysprof(struct msm_context *ctx, struct msm_gpu *gpu, int 
sysprof)
 {
+       guard(pm_runtime_active)(&gpu->pdev->dev);
        guard(rwsem_write)(&ctx->ctxlock);
 
        /*
@@ -21,7 +22,7 @@ int msm_context_set_sysprof(struct msm_context *ctx, struct 
msm_gpu *gpu, int sy
        default:
                return UERR(EINVAL, gpu->dev, "Invalid sysprof: %d", sysprof);
        case 2:
-               pm_runtime_get_sync(&gpu->pdev->dev);
+               pm_runtime_get(&gpu->pdev->dev);
                fallthrough;
        case 1:
                refcount_inc(&gpu->sysprof_active);
-- 
2.56.0

Reply via email to