diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 42d6298eb9d7..eed409c59492 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -143,6 +143,7 @@ int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs, | |||
143 | struct amdgpu_ring *ring; | 143 | struct amdgpu_ring *ring; |
144 | struct amdgpu_ctx *ctx, *old_ctx; | 144 | struct amdgpu_ctx *ctx, *old_ctx; |
145 | struct amdgpu_vm *vm; | 145 | struct amdgpu_vm *vm; |
146 | uint64_t sequence; | ||
146 | unsigned i; | 147 | unsigned i; |
147 | int r = 0; | 148 | int r = 0; |
148 | 149 | ||
@@ -215,9 +216,12 @@ int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs, | |||
215 | return r; | 216 | return r; |
216 | } | 217 | } |
217 | 218 | ||
219 | sequence = amdgpu_enable_scheduler ? ib->sequence : 0; | ||
220 | |||
218 | if (ib->ctx) | 221 | if (ib->ctx) |
219 | ib->sequence = amdgpu_ctx_add_fence(ib->ctx, ring, | 222 | ib->sequence = amdgpu_ctx_add_fence(ib->ctx, ring, |
220 | &ib->fence->base); | 223 | &ib->fence->base, |
224 | sequence); | ||
221 | 225 | ||
222 | /* wrap the last IB with fence */ | 226 | /* wrap the last IB with fence */ |
223 | if (ib->user) { | 227 | if (ib->user) { |