drm/amdgpu:skip job for guilty ctx in parser_init
authorMonk Liu <Monk.Liu@amd.com>
Tue, 17 Oct 2017 04:08:02 +0000 (12:08 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Dec 2017 21:33:10 +0000 (16:33 -0500)
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

index b4b3ecf..16947ba 100644 (file)
@@ -90,6 +90,12 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
                goto free_chunk;
        }
 
+       /* skip guilty context job */
+       if (atomic_read(&p->ctx->guilty) == 1) {
+               ret = -ECANCELED;
+               goto free_chunk;
+       }
+
        mutex_lock(&p->ctx->lock);
 
        /* get chunks */