diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-10-23 00:25:24 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-04 16:33:09 -0500 |
commit | 1102900de082a7ef6991de0ad2ff88047ae859b3 (patch) | |
tree | 0dbd5b913768f614c1b47a6c1e8483f8e4c5c5c3 /drivers/gpu/drm/amd | |
parent | b3eebe3d899fdcc77297f1513983a5250f0bed80 (diff) |
drm/amdgpu:pass ctx->guilty address to entity init
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>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 0b14b5373783..64a0d384171b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -743,6 +743,7 @@ struct amdgpu_ctx { | |||
743 | enum amd_sched_priority init_priority; | 743 | enum amd_sched_priority init_priority; |
744 | enum amd_sched_priority override_priority; | 744 | enum amd_sched_priority override_priority; |
745 | struct mutex lock; | 745 | struct mutex lock; |
746 | atomic_t guilty; | ||
746 | }; | 747 | }; |
747 | 748 | ||
748 | struct amdgpu_ctx_mgr { | 749 | struct amdgpu_ctx_mgr { |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index bb5a46a000ee..1bf4cdc597aa 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |||
@@ -90,7 +90,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev, | |||
90 | continue; | 90 | continue; |
91 | 91 | ||
92 | r = amd_sched_entity_init(&ring->sched, &ctx->rings[i].entity, | 92 | r = amd_sched_entity_init(&ring->sched, &ctx->rings[i].entity, |
93 | rq, amdgpu_sched_jobs, NULL); | 93 | rq, amdgpu_sched_jobs, &ctx->guilty); |
94 | if (r) | 94 | if (r) |
95 | goto failed; | 95 | goto failed; |
96 | } | 96 | } |