aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/cik_sdma.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/cik_sdma.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
index 34e41590c5c8..49b34decce58 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
@@ -848,22 +848,6 @@ static void cik_sdma_ring_emit_vm_flush(struct amdgpu_ring *ring,
848 amdgpu_ring_write(ring, (0xfff << 16) | 10); /* retry count, poll interval */ 848 amdgpu_ring_write(ring, (0xfff << 16) | 10); /* retry count, poll interval */
849} 849}
850 850
851static unsigned cik_sdma_ring_get_emit_ib_size(struct amdgpu_ring *ring)
852{
853 return
854 7 + 4; /* cik_sdma_ring_emit_ib */
855}
856
857static unsigned cik_sdma_ring_get_dma_frame_size(struct amdgpu_ring *ring)
858{
859 return
860 6 + /* cik_sdma_ring_emit_hdp_flush */
861 3 + /* cik_sdma_ring_emit_hdp_invalidate */
862 6 + /* cik_sdma_ring_emit_pipeline_sync */
863 12 + /* cik_sdma_ring_emit_vm_flush */
864 9 + 9 + 9; /* cik_sdma_ring_emit_fence x3 for user fence, vm fence */
865}
866
867static void cik_enable_sdma_mgcg(struct amdgpu_device *adev, 851static void cik_enable_sdma_mgcg(struct amdgpu_device *adev,
868 bool enable) 852 bool enable)
869{ 853{
@@ -1228,6 +1212,13 @@ static const struct amdgpu_ring_funcs cik_sdma_ring_funcs = {
1228 .get_rptr = cik_sdma_ring_get_rptr, 1212 .get_rptr = cik_sdma_ring_get_rptr,
1229 .get_wptr = cik_sdma_ring_get_wptr, 1213 .get_wptr = cik_sdma_ring_get_wptr,
1230 .set_wptr = cik_sdma_ring_set_wptr, 1214 .set_wptr = cik_sdma_ring_set_wptr,
1215 .emit_frame_size =
1216 6 + /* cik_sdma_ring_emit_hdp_flush */
1217 3 + /* cik_sdma_ring_emit_hdp_invalidate */
1218 6 + /* cik_sdma_ring_emit_pipeline_sync */
1219 12 + /* cik_sdma_ring_emit_vm_flush */
1220 9 + 9 + 9, /* cik_sdma_ring_emit_fence x3 for user fence, vm fence */
1221 .emit_ib_size = 7 + 4, /* cik_sdma_ring_emit_ib */
1231 .emit_ib = cik_sdma_ring_emit_ib, 1222 .emit_ib = cik_sdma_ring_emit_ib,
1232 .emit_fence = cik_sdma_ring_emit_fence, 1223 .emit_fence = cik_sdma_ring_emit_fence,
1233 .emit_pipeline_sync = cik_sdma_ring_emit_pipeline_sync, 1224 .emit_pipeline_sync = cik_sdma_ring_emit_pipeline_sync,
@@ -1238,8 +1229,6 @@ static const struct amdgpu_ring_funcs cik_sdma_ring_funcs = {
1238 .test_ib = cik_sdma_ring_test_ib, 1229 .test_ib = cik_sdma_ring_test_ib,
1239 .insert_nop = cik_sdma_ring_insert_nop, 1230 .insert_nop = cik_sdma_ring_insert_nop,
1240 .pad_ib = cik_sdma_ring_pad_ib, 1231 .pad_ib = cik_sdma_ring_pad_ib,
1241 .get_emit_ib_size = cik_sdma_ring_get_emit_ib_size,
1242 .get_dma_frame_size = cik_sdma_ring_get_dma_frame_size,
1243}; 1232};
1244 1233
1245static void cik_sdma_set_ring_funcs(struct amdgpu_device *adev) 1234static void cik_sdma_set_ring_funcs(struct amdgpu_device *adev)