diff options
author | Jack Xiao <Jack.Xiao@amd.com> | 2019-01-18 05:13:36 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-01-25 16:15:35 -0500 |
commit | c4c905ec7b8aaeb06331ee875d3cc9b73dfa481f (patch) | |
tree | 109c55c019d77d12fbae3e71e584f147349a05d0 /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |
parent | a7cd97718166be64b3359f586bbe0a6bb64a6ba4 (diff) |
drm/amdgpu: add flags to emit_ib interface v2
Replace the last bool type parameter with a general flags parameter,
to make the last parameter be able to contain more information.
v2: drop setting need_ctx_switch = false
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
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) |