aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-09-05 09:10:50 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-12 22:16:31 -0400
commit3d138c14c4174a2c80874a96935c87eee7c82ecf (patch)
tree4ee8b15492e57641a66a113f8f6cd4a494cb63e6
parent403df1f66cc0457221f3be5c210f128ab87de547 (diff)
drm/amdgpu: revert "fix deadlock of reservation between cs and gpu reset v2"
This reverts commit 10e709cb296c98424c03408d23e3addeddcd4088. The patch doesn't work at all: 1. The CS can still be blocked because of amdgpu_ctx_add_fence(). 2. The order of submission isn't correct any more. 3. We could end up using freed up memory because we now drop the ctx reference to early. This needs to be fixed cleanly by doing the context handling after the BO handling, but this is a larger task just avoid the obvious crashes for now. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Monk Liu monk.liu@amd.com Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index baa90df90aea..ba10a83535d3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1153,7 +1153,6 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
1153 cs->out.handle = amdgpu_ctx_add_fence(p->ctx, ring, p->fence); 1153 cs->out.handle = amdgpu_ctx_add_fence(p->ctx, ring, p->fence);
1154 job->uf_sequence = cs->out.handle; 1154 job->uf_sequence = cs->out.handle;
1155 amdgpu_job_free_resources(job); 1155 amdgpu_job_free_resources(job);
1156 amdgpu_cs_parser_fini(p, 0, true);
1157 1156
1158 trace_amdgpu_cs_ioctl(job); 1157 trace_amdgpu_cs_ioctl(job);
1159 amd_sched_entity_push_job(&job->base); 1158 amd_sched_entity_push_job(&job->base);
@@ -1211,10 +1210,7 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
1211 goto out; 1210 goto out;
1212 1211
1213 r = amdgpu_cs_submit(&parser, cs); 1212 r = amdgpu_cs_submit(&parser, cs);
1214 if (r)
1215 goto out;
1216 1213
1217 return 0;
1218out: 1214out:
1219 amdgpu_cs_parser_fini(&parser, r, reserved_buffers); 1215 amdgpu_cs_parser_fini(&parser, r, reserved_buffers);
1220 return r; 1216 return r;