From c56213dfab7c40d08e795715730e9afb383c58d6 Mon Sep 17 00:00:00 2001 From: Monk Liu Date: Tue, 17 Oct 2017 12:08:02 +0800 Subject: [PATCH 2054/4131] drm/amdgpu:skip job for guilty ctx in parser_init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I44019f6475b1eaaba55633cf5f8bb84284f19a2c Signed-off-by: Monk Liu Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index a1381fc..ed72bc9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -89,6 +89,12 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data) ret = -EINVAL; goto free_chunk; } + + /* skip guilty context job */ + if (atomic_read(&p->ctx->guilty) == 1) { + ret = -ECANCELED; + goto free_chunk; + } mutex_lock(&p->ctx->lock); -- 2.7.4