summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
diff options
context:
space:
mode:
authorJack Xiao <Jack.Xiao@amd.com>2019-01-17 15:47:36 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-06-21 18:57:40 -0500
commitd8780dc71d56acf734a5756cac8c7787eb6bec11 (patch)
tree90273c398d9fae31b1eea9bfaaf2df73f17abfba /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
parentf92d5c6123f4f06a3660e4c398e1d453d1d29a9d (diff)
downloadlinux-d8780dc71d56acf734a5756cac8c7787eb6bec11.tar.gz
drm/amdgpu: add ib preemption status in amdgpu_job (v2)
Add ib preemption status in amdgpu_job, so that ring level function can detect preemption and program for resuming it. v2: squash in fix to restore job->preamble_status back to status value (Jack) Acked-by: Alex Deucher <alexander.deucher@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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index c84c5b483e20..c13158be3c62 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -209,6 +209,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
skip_preamble = ring->current_ctx == fence_ctx;
if (job && ring->funcs->emit_cntxcntl) {
status |= job->preamble_status;
+ status |= job->preemption_status;
amdgpu_ring_emit_cntxcntl(ring, status);
}