aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Zhu <[email protected]>2018-10-31 12:21:55 +0000
committerAlex Deucher <[email protected]>2019-06-21 14:30:49 +0000
commit692441f2654c80e1452d66aeadf4b00da9ccddc6 (patch)
tree4ba7cae3a5152bf71434860845d340db20bcbf58
parentdrm/amdgpu: add the trailing fence per ring (diff)
downloadkernel-692441f2654c80e1452d66aeadf4b00da9ccddc6.tar.gz
kernel-692441f2654c80e1452d66aeadf4b00da9ccddc6.zip
drm/amdgpu: Add new ring interface preempt_ib
Used to trigger preemtption Acked-by: Hawking Zhang <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Jack Xiao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
index 0f497fa213aa..529ba1bdda55 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
@@ -172,6 +172,7 @@ struct amdgpu_ring_funcs {
enum drm_sched_priority priority);
/* Try to soft recover the ring to make the fence signal */
void (*soft_recovery)(struct amdgpu_ring *ring, unsigned vmid);
+ int (*preempt_ib)(struct amdgpu_ring *ring);
};
struct amdgpu_ring {
@@ -250,6 +251,7 @@ struct amdgpu_ring {
#define amdgpu_ring_pad_ib(r, ib) ((r)->funcs->pad_ib((r), (ib)))
#define amdgpu_ring_init_cond_exec(r) (r)->funcs->init_cond_exec((r))
#define amdgpu_ring_patch_cond_exec(r,o) (r)->funcs->patch_cond_exec((r),(o))
+#define amdgpu_ring_preempt_ib(r) (r)->funcs->preempt_ib(r)
int amdgpu_ring_alloc(struct amdgpu_ring *ring, unsigned ndw);
void amdgpu_ring_insert_nop(struct amdgpu_ring *ring, uint32_t count);