summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2017-10-17 07:08:02 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-12-05 00:33:10 +0300
commit7716ea564f6538236c34749cdf3a6351c2844c1a (patch)
tree772cb034a298df3fa6400f28296ad272604d1d6b /drivers
parent1102900de082a7ef6991de0ad2ff88047ae859b3 (diff)
downloadlinux-7716ea564f6538236c34749cdf3a6351c2844c1a.tar.xz
drm/amdgpu:skip job for guilty ctx in parser_init
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index b4b3ecf9f96d..16947bad5b49 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -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 */