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

drm/amdgpu: drop AMDGPU_FENCE_SIGNALED_SEQ

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

Port of radeon commit "d6d5c5b8".
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarMonk Liu <monk.liu@amd.com>
parent 5fb1941d
...@@ -84,9 +84,6 @@ extern int amdgpu_vm_block_size; ...@@ -84,9 +84,6 @@ extern int amdgpu_vm_block_size;
#define AMDGPUFB_CONN_LIMIT 4 #define AMDGPUFB_CONN_LIMIT 4
#define AMDGPU_BIOS_NUM_SCRATCH 8 #define AMDGPU_BIOS_NUM_SCRATCH 8
/* fence seq are set to this number when signaled */
#define AMDGPU_FENCE_SIGNALED_SEQ 0LL
/* max number of rings */ /* max number of rings */
#define AMDGPU_MAX_RINGS 16 #define AMDGPU_MAX_RINGS 16
#define AMDGPU_MAX_GFX_RINGS 1 #define AMDGPU_MAX_GFX_RINGS 1
......
...@@ -463,11 +463,7 @@ bool amdgpu_fence_signaled(struct amdgpu_fence *fence) ...@@ -463,11 +463,7 @@ bool amdgpu_fence_signaled(struct amdgpu_fence *fence)
if (!fence) if (!fence)
return true; return true;
if (fence->seq == AMDGPU_FENCE_SIGNALED_SEQ)
return true;
if (amdgpu_fence_seq_signaled(fence->ring, fence->seq)) { if (amdgpu_fence_seq_signaled(fence->ring, fence->seq)) {
fence->seq = AMDGPU_FENCE_SIGNALED_SEQ;
if (!fence_signal(&fence->base)) if (!fence_signal(&fence->base))
FENCE_TRACE(&fence->base, "signaled from amdgpu_fence_signaled\n"); FENCE_TRACE(&fence->base, "signaled from amdgpu_fence_signaled\n");
return true; return true;
...@@ -637,15 +633,11 @@ int amdgpu_fence_wait(struct amdgpu_fence *fence, bool intr) ...@@ -637,15 +633,11 @@ int amdgpu_fence_wait(struct amdgpu_fence *fence, bool intr)
long r; long r;
seq[fence->ring->idx] = fence->seq; seq[fence->ring->idx] = fence->seq;
if (seq[fence->ring->idx] == AMDGPU_FENCE_SIGNALED_SEQ)
return 0;
r = amdgpu_fence_wait_seq_timeout(fence->ring->adev, seq, intr, MAX_SCHEDULE_TIMEOUT); r = amdgpu_fence_wait_seq_timeout(fence->ring->adev, seq, intr, MAX_SCHEDULE_TIMEOUT);
if (r < 0) { if (r < 0) {
return r; return r;
} }
fence->seq = AMDGPU_FENCE_SIGNALED_SEQ;
r = fence_signal(&fence->base); r = fence_signal(&fence->base);
if (!r) if (!r)
FENCE_TRACE(&fence->base, "signaled from fence_wait\n"); FENCE_TRACE(&fence->base, "signaled from fence_wait\n");
...@@ -682,10 +674,6 @@ int amdgpu_fence_wait_any(struct amdgpu_device *adev, ...@@ -682,10 +674,6 @@ int amdgpu_fence_wait_any(struct amdgpu_device *adev,
seq[i] = fences[i]->seq; seq[i] = fences[i]->seq;
++num_rings; ++num_rings;
/* test if something was allready signaled */
if (seq[i] == AMDGPU_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