[PATCH 6/6] drm/amdgpu: dependency is already signaled if ctx has been freed

Chunming Zhou David1.Zhou at amd.com
Thu Aug 18 07:50:18 UTC 2016


It makes sure userspace can look up dependency.

Change-Id: Ie26086776de7df276fa041d977f0ea8264b32387
Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index cfae65d..f6dd530 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -833,7 +833,7 @@ static int amdgpu_cs_dependencies(struct amdgpu_device *adev,
 
 			ctx = amdgpu_ctx_get(deps[j].ctx_id);
 			if (ctx == NULL)
-				return -EINVAL;
+				continue;;
 
 			fence = amdgpu_ctx_get_fence(ctx, ring,
 						     deps[j].handle);
-- 
1.9.1



More information about the amd-gfx mailing list