aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-03-27 12:58:14 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-05-15 14:43:13 -0400
commit828536385ab0d25b5ddd7153347df04ea3a6961d (patch)
tree94745c42689a8b2a48bf012572eb4efae5094ad8 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
parent9da00630188da6e8ad1596c2b58809c833b16154 (diff)
drm/amdgpu: add emit_reg_write_reg_wait ring callback
This callback writes a value to a register and then reads back another register and waits for a value in a single operation. Provide a helper function using two operations for engines that don't support this opertion. Reviewed-by: Huang Rui <ray.huang@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/drm/amd/amdgpu/amdgpu_ring.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
index 1a5911882657..08fcdf6f7b53 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
@@ -154,6 +154,9 @@ struct amdgpu_ring_funcs {
154 void (*emit_wreg)(struct amdgpu_ring *ring, uint32_t reg, uint32_t val); 154 void (*emit_wreg)(struct amdgpu_ring *ring, uint32_t reg, uint32_t val);
155 void (*emit_reg_wait)(struct amdgpu_ring *ring, uint32_t reg, 155 void (*emit_reg_wait)(struct amdgpu_ring *ring, uint32_t reg,
156 uint32_t val, uint32_t mask); 156 uint32_t val, uint32_t mask);
157 void (*emit_reg_write_reg_wait)(struct amdgpu_ring *ring,
158 uint32_t reg0, uint32_t reg1,
159 uint32_t ref, uint32_t mask);
157 void (*emit_tmz)(struct amdgpu_ring *ring, bool start); 160 void (*emit_tmz)(struct amdgpu_ring *ring, bool start);
158 /* priority functions */ 161 /* priority functions */
159 void (*set_priority) (struct amdgpu_ring *ring, 162 void (*set_priority) (struct amdgpu_ring *ring,
@@ -228,6 +231,10 @@ int amdgpu_ring_lru_get(struct amdgpu_device *adev, int type,
228 int *blacklist, int num_blacklist, 231 int *blacklist, int num_blacklist,
229 bool lru_pipe_order, struct amdgpu_ring **ring); 232 bool lru_pipe_order, struct amdgpu_ring **ring);
230void amdgpu_ring_lru_touch(struct amdgpu_device *adev, struct amdgpu_ring *ring); 233void amdgpu_ring_lru_touch(struct amdgpu_device *adev, struct amdgpu_ring *ring);
234void amdgpu_ring_emit_reg_write_reg_wait_helper(struct amdgpu_ring *ring,
235 uint32_t reg0, uint32_t val0,
236 uint32_t reg1, uint32_t val1);
237
231static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring) 238static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring)
232{ 239{
233 int i = 0; 240 int i = 0;