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_drv.c | 2 +- drivers/gpu/drm/msm/msm_submitqueue.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 4b2798efd9da..7fe273bf74d2 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -362,7 +362,7 @@ static void msm_postclose(struct drm_device *dev, struct drm_file *file) * It is not possible to set sysprof param to non-zero if gpu * is not initialized: */ - if (priv->gpu) + if (priv->gpu && ctx->sysprof) msm_context_set_sysprof(ctx, priv->gpu, 0); context_close(ctx); 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
