diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index c48207b377bc..0b8ef2d27d6b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -202,12 +202,12 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
202 | amdgpu_asic_flush_hdp(adev, ring); | 202 | amdgpu_asic_flush_hdp(adev, ring); |
203 | } | 203 | } |
204 | 204 | ||
205 | if (need_ctx_switch) | ||
206 | status |= AMDGPU_HAVE_CTX_SWITCH; | ||
207 | |||
205 | skip_preamble = ring->current_ctx == fence_ctx; | 208 | skip_preamble = ring->current_ctx == fence_ctx; |
206 | if (job && ring->funcs->emit_cntxcntl) { | 209 | if (job && ring->funcs->emit_cntxcntl) { |
207 | if (need_ctx_switch) | ||
208 | status |= AMDGPU_HAVE_CTX_SWITCH; | ||
209 | status |= job->preamble_status; | 210 | status |= job->preamble_status; |
210 | |||
211 | amdgpu_ring_emit_cntxcntl(ring, status); | 211 | amdgpu_ring_emit_cntxcntl(ring, status); |
212 | } | 212 | } |
213 | 213 | ||
@@ -221,8 +221,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
221 | !amdgpu_sriov_vf(adev)) /* for SRIOV preemption, Preamble CE ib must be inserted anyway */ | 221 | !amdgpu_sriov_vf(adev)) /* for SRIOV preemption, Preamble CE ib must be inserted anyway */ |
222 | continue; | 222 | continue; |
223 | 223 | ||
224 | amdgpu_ring_emit_ib(ring, job, ib, need_ctx_switch); | 224 | amdgpu_ring_emit_ib(ring, job, ib, status); |
225 | need_ctx_switch = false; | 225 | status &= ~AMDGPU_HAVE_CTX_SWITCH; |
226 | } | 226 | } |
227 | 227 | ||
228 | if (ring->funcs->emit_tmz) | 228 | if (ring->funcs->emit_tmz) |