]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/amdgpu:pass ctx->guilty address to entity init
authorMonk Liu <Monk.Liu@amd.com>
Mon, 23 Oct 2017 04:25:24 +0000 (12:25 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Dec 2017 21:33:09 +0000 (16:33 -0500)
this way the real interested guilty is connected to entity->guilty
pointer, and we can use entity->pointer later in gpu recovery procedure

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Chunming Zhou <David1.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

index 0b14b537378345870f7aec058b791add80f8fa95..64a0d384171b222552a6c2dbfe86d5c0cb27b81b 100644 (file)
@@ -743,6 +743,7 @@ struct amdgpu_ctx {
        enum amd_sched_priority init_priority;
        enum amd_sched_priority override_priority;
        struct mutex            lock;
+       atomic_t        guilty;
 };
 
 struct amdgpu_ctx_mgr {
index bb5a46a000eee797916d8aa0ff513c94d80057d9..1bf4cdc597aa7666161c63a989abc5d56b4ffb71 100644 (file)
@@ -90,7 +90,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev,
                        continue;
 
                r = amd_sched_entity_init(&ring->sched, &ctx->rings[i].entity,
-                                         rq, amdgpu_sched_jobs, NULL);
+                                         rq, amdgpu_sched_jobs, &ctx->guilty);
                if (r)
                        goto failed;
        }