diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-01-16 21:55:42 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-01-27 11:13:35 -0500 |
commit | 7e6bf80f739bc2becb71964f27ce60e207d10aca (patch) | |
tree | 06504a9c98fcc56cc0874f9c21cbd36254b22bc0 /drivers/gpu | |
parent | acad2b2a7b7040b3e9e3a3239f137b7c67dea37b (diff) |
drm/amdgpu:introduce new flag to identify VM domain for cntx_ctrl
To determine whether the context uses GPUVM or not.
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index b0d9ae3b9893..a0728ff8c80f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -950,6 +950,7 @@ struct amdgpu_cs_parser { | |||
950 | #define AMDGPU_PREAMBLE_IB_PRESENT (1 << 0) /* bit set means command submit involves a preamble IB */ | 950 | #define AMDGPU_PREAMBLE_IB_PRESENT (1 << 0) /* bit set means command submit involves a preamble IB */ |
951 | #define AMDGPU_PREAMBLE_IB_PRESENT_FIRST (1 << 1) /* bit set means preamble IB is first presented in belonging context */ | 951 | #define AMDGPU_PREAMBLE_IB_PRESENT_FIRST (1 << 1) /* bit set means preamble IB is first presented in belonging context */ |
952 | #define AMDGPU_HAVE_CTX_SWITCH (1 << 2) /* bit set means context switch occured */ | 952 | #define AMDGPU_HAVE_CTX_SWITCH (1 << 2) /* bit set means context switch occured */ |
953 | #define AMDGPU_VM_DOMAIN (1 << 3) /* bit set means in virtual memory context */ | ||
953 | 954 | ||
954 | struct amdgpu_job { | 955 | struct amdgpu_job { |
955 | struct amd_sched_job base; | 956 | struct amd_sched_job base; |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 216a9572d946..972e84e4344e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -184,6 +184,9 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
184 | if (need_ctx_switch) | 184 | if (need_ctx_switch) |
185 | status |= AMDGPU_HAVE_CTX_SWITCH; | 185 | status |= AMDGPU_HAVE_CTX_SWITCH; |
186 | status |= job->preamble_status; | 186 | status |= job->preamble_status; |
187 | |||
188 | if (vm) | ||
189 | status |= AMDGPU_VM_DOMAIN; | ||
187 | amdgpu_ring_emit_cntxcntl(ring, status); | 190 | amdgpu_ring_emit_cntxcntl(ring, status); |
188 | } | 191 | } |
189 | 192 | ||