Commit 9b389668 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: remove fence reset detection leftovers

wait_event() never returns before the fence was signaled.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fa5b5000
...@@ -260,19 +260,16 @@ static bool amdgpu_fence_seq_signaled(struct amdgpu_ring *ring, u64 seq) ...@@ -260,19 +260,16 @@ static bool amdgpu_fence_seq_signaled(struct amdgpu_ring *ring, u64 seq)
} }
/* /*
* amdgpu_ring_wait_seq_timeout - wait for seq of the specific ring to signal * amdgpu_ring_wait_seq - wait for seq of the specific ring to signal
* @ring: ring to wait on for the seq number * @ring: ring to wait on for the seq number
* @seq: seq number wait for * @seq: seq number wait for
* *
* return value: * return value:
* 0: seq signaled, and gpu not hang * 0: seq signaled, and gpu not hang
* -EDEADL: GPU hang detected
* -EINVAL: some paramter is not valid * -EINVAL: some paramter is not valid
*/ */
static int amdgpu_fence_ring_wait_seq(struct amdgpu_ring *ring, uint64_t seq) static int amdgpu_fence_ring_wait_seq(struct amdgpu_ring *ring, uint64_t seq)
{ {
bool signaled = false;
BUG_ON(!ring); BUG_ON(!ring);
if (seq > ring->fence_drv.sync_seq) if (seq > ring->fence_drv.sync_seq)
return -EINVAL; return -EINVAL;
...@@ -281,13 +278,10 @@ static int amdgpu_fence_ring_wait_seq(struct amdgpu_ring *ring, uint64_t seq) ...@@ -281,13 +278,10 @@ static int amdgpu_fence_ring_wait_seq(struct amdgpu_ring *ring, uint64_t seq)
return 0; return 0;
amdgpu_fence_schedule_fallback(ring); amdgpu_fence_schedule_fallback(ring);
wait_event(ring->fence_drv.fence_queue, ( wait_event(ring->fence_drv.fence_queue,
(signaled = amdgpu_fence_seq_signaled(ring, seq)))); amdgpu_fence_seq_signaled(ring, seq));
if (signaled)
return 0; return 0;
else
return -EDEADLK;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment