aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
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 14:23:30 -0400
commitaa4ec7ce7ec52c7230cfa73b06d79288b45fe1c9 (patch)
treed17a8bce59d768b86a4cbc28f3b28eedac0b67cd /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parent64d03abe6ee36ec48e997743e9397ae160eb508a (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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-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 e58db0c69c6a..3fe816f6beca 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1148,7 +1148,6 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
1148 cs->out.handle = amdgpu_ctx_add_fence(p->ctx, ring, p->fence); 1148 cs->out.handle = amdgpu_ctx_add_fence(p->ctx, ring, p->fence);
1149 job->uf_sequence = cs->out.handle; 1149 job->uf_sequence = cs->out.handle;
1150 amdgpu_job_free_resources(job); 1150 amdgpu_job_free_resources(job);
1151 amdgpu_cs_parser_fini(p, 0, true);
1152 1151
1153 trace_amdgpu_cs_ioctl(job); 1152 trace_amdgpu_cs_ioctl(job);
1154 amd_sched_entity_push_job(&job->base); 1153 amd_sched_entity_push_job(&job->base);
@@ -1206,10 +1205,7 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
1206 goto out; 1205 goto out;
1207 1206
1208 r = amdgpu_cs_submit(&parser, cs); 1207 r = amdgpu_cs_submit(&parser, cs);
1209 if (r)
1210 goto out;
1211 1208
1212 return 0;
1213out: 1209out:
1214 amdgpu_cs_parser_fini(&parser, r, reserved_buffers); 1210 amdgpu_cs_parser_fini(&parser, r, reserved_buffers);
1215 return r; 1211 return r;