aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorMonk Liu <[email protected]>2017-10-17 04:08:02 +0000
committerAlex Deucher <[email protected]>2017-12-04 21:33:10 +0000
commit7716ea564f6538236c34749cdf3a6351c2844c1a (patch)
tree772cb034a298df3fa6400f28296ad272604d1d6b /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentdrm/amdgpu:pass ctx->guilty address to entity init (diff)
downloadkernel-7716ea564f6538236c34749cdf3a6351c2844c1a.tar.gz
kernel-7716ea564f6538236c34749cdf3a6351c2844c1a.zip
drm/amdgpu:skip job for guilty ctx in parser_init
Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-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 */