]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
Merge tag 'opp-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_sched.c
index e9b45089a28a69eb7738fab4cfcb50abe0eede98..863b2a34b2d64ab032f3f4e0b6f3bbbb1068a63f 100644 (file)
@@ -38,6 +38,7 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
 {
        struct fd f = fdget(fd);
        struct amdgpu_fpriv *fpriv;
+       struct amdgpu_ctx_mgr *mgr;
        struct amdgpu_ctx *ctx;
        uint32_t id;
        int r;
@@ -51,8 +52,11 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
                return r;
        }
 
-       idr_for_each_entry(&fpriv->ctx_mgr.ctx_handles, ctx, id)
+       mgr = &fpriv->ctx_mgr;
+       mutex_lock(&mgr->lock);
+       idr_for_each_entry(&mgr->ctx_handles, ctx, id)
                amdgpu_ctx_priority_override(ctx, priority);
+       mutex_unlock(&mgr->lock);
 
        fdput(f);
        return 0;
This page took 0.034024 seconds and 4 git commands to generate.