diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index faff4a3f96e6..f52d0ba91a77 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -678,6 +678,15 @@ void amdgpu_fence_driver_clear_job_fences(struct amdgpu_ring *ring)  		ptr = &ring->fence_drv.fences[i];  		old = rcu_dereference_protected(*ptr, 1);  		if (old && old->ops == &amdgpu_job_fence_ops) { +			struct amdgpu_job *job; + +			/* For non-scheduler bad job, i.e. failed ib test, we need to signal +			 * it right here or we won't be able to track them in fence_drv +			 * and they will remain unsignaled during sa_bo free. +			 */ +			job = container_of(old, struct amdgpu_job, hw_fence); +			if (!job->base.s_fence && !dma_fence_is_signaled(old)) +				dma_fence_signal(old);  			RCU_INIT_POINTER(*ptr, NULL);  			dma_fence_put(old);  		} |