aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-10-08 14:55:42 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-06-21 09:30:39 -0500
commitdfc9847956d55cdd1111711e2a3d9901967b4368 (patch)
tree6caae895189706d94ad86411082d10264dc7722b /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
parentdrm/amdgpu: enable virtual display feature for navi10 (diff)
downloadlinux-dev-dfc9847956d55cdd1111711e2a3d9901967b4368.tar.xz
linux-dev-dfc9847956d55cdd1111711e2a3d9901967b4368.zip
drm/amdgpu: Add helper function amdgpu_ring_set_preempt_cond_exec
can preempt the ring by setting cond_exec to false Acked-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@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_ring.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
index cdddce938bf5..764bf851c1df 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
@@ -266,6 +266,12 @@ void amdgpu_ring_emit_reg_write_reg_wait_helper(struct amdgpu_ring *ring,
bool amdgpu_ring_soft_recovery(struct amdgpu_ring *ring, unsigned int vmid,
struct dma_fence *fence);
+static inline void amdgpu_ring_set_preempt_cond_exec(struct amdgpu_ring *ring,
+ bool cond_exec)
+{
+ *ring->cond_exe_cpu_addr = cond_exec;
+}
+
static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring)
{
int i = 0;