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

drm/radeon: drop RADEON_FENCE_SIGNALED_SEQ v2

It's causing issues with VMID handling and comparing the
fence value two times actually doesn't make handling faster.

v2: rebased on reset changes
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9867d00d
...@@ -120,9 +120,6 @@ extern int radeon_bapm; ...@@ -120,9 +120,6 @@ extern int radeon_bapm;
#define RADEONFB_CONN_LIMIT 4 #define RADEONFB_CONN_LIMIT 4
#define RADEON_BIOS_NUM_SCRATCH 8 #define RADEON_BIOS_NUM_SCRATCH 8
/* fence seq are set to this number when signaled */
#define RADEON_FENCE_SIGNALED_SEQ 0LL
/* internal ring indices */ /* internal ring indices */
/* r1xx+ has gfx CP ring */ /* r1xx+ has gfx CP ring */
#define RADEON_RING_TYPE_GFX_INDEX 0 #define RADEON_RING_TYPE_GFX_INDEX 0
......
...@@ -328,16 +328,10 @@ static bool radeon_fence_seq_signaled(struct radeon_device *rdev, ...@@ -328,16 +328,10 @@ static bool radeon_fence_seq_signaled(struct radeon_device *rdev,
*/ */
bool radeon_fence_signaled(struct radeon_fence *fence) bool radeon_fence_signaled(struct radeon_fence *fence)
{ {
if (!fence) { if (!fence)
return true;
}
if (fence->seq == RADEON_FENCE_SIGNALED_SEQ) {
return true; return true;
} if (radeon_fence_seq_signaled(fence->rdev, fence->seq, fence->ring))
if (radeon_fence_seq_signaled(fence->rdev, fence->seq, fence->ring)) {
fence->seq = RADEON_FENCE_SIGNALED_SEQ;
return true; return true;
}
return false; return false;
} }
...@@ -445,15 +439,11 @@ int radeon_fence_wait(struct radeon_fence *fence, bool intr) ...@@ -445,15 +439,11 @@ int radeon_fence_wait(struct radeon_fence *fence, bool intr)
} }
seq[fence->ring] = fence->seq; seq[fence->ring] = fence->seq;
if (seq[fence->ring] == RADEON_FENCE_SIGNALED_SEQ)
return 0;
r = radeon_fence_wait_seq_timeout(fence->rdev, seq, intr, MAX_SCHEDULE_TIMEOUT); r = radeon_fence_wait_seq_timeout(fence->rdev, seq, intr, MAX_SCHEDULE_TIMEOUT);
if (r < 0) { if (r < 0) {
return r; return r;
} }
fence->seq = RADEON_FENCE_SIGNALED_SEQ;
return 0; return 0;
} }
...@@ -487,10 +477,6 @@ int radeon_fence_wait_any(struct radeon_device *rdev, ...@@ -487,10 +477,6 @@ int radeon_fence_wait_any(struct radeon_device *rdev,
seq[i] = fences[i]->seq; seq[i] = fences[i]->seq;
++num_rings; ++num_rings;
/* test if something was allready signaled */
if (seq[i] == RADEON_FENCE_SIGNALED_SEQ)
return 0;
} }
/* nothing to wait for ? */ /* nothing to wait for ? */
......
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