aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-09-16 10:59:12 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-09-16 15:52:58 -0400
commitfe7c0f26daa615e3cc4b817f657e86d6e75c261d (patch)
tree3e0ac0f287e8c83cda383ead5978ae2a99a0fc8d
parent77b52a5bc66916c34a443563f070e65449feb683 (diff)
drm/amdgpu/sdma2.4: add ring callbacks for ib and dma frame size
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
index e82229686783..82c731befacb 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
@@ -906,6 +906,22 @@ static void sdma_v2_4_ring_emit_vm_flush(struct amdgpu_ring *ring,
906 SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10)); /* retry count, poll interval */ 906 SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10)); /* retry count, poll interval */
907} 907}
908 908
909static unsigned sdma_v2_4_ring_get_emit_ib_size(struct amdgpu_ring *ring)
910{
911 return
912 7 + 6; /* sdma_v2_4_ring_emit_ib */
913}
914
915static unsigned sdma_v2_4_ring_get_dma_frame_size(struct amdgpu_ring *ring)
916{
917 return
918 6 + /* sdma_v2_4_ring_emit_hdp_flush */
919 3 + /* sdma_v2_4_ring_emit_hdp_invalidate */
920 6 + /* sdma_v2_4_ring_emit_pipeline_sync */
921 12 + /* sdma_v2_4_ring_emit_vm_flush */
922 10 + 10 + 10; /* sdma_v2_4_ring_emit_fence x3 for user fence, vm fence */
923}
924
909static int sdma_v2_4_early_init(void *handle) 925static int sdma_v2_4_early_init(void *handle)
910{ 926{
911 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 927 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
@@ -1224,6 +1240,8 @@ static const struct amdgpu_ring_funcs sdma_v2_4_ring_funcs = {
1224 .test_ib = sdma_v2_4_ring_test_ib, 1240 .test_ib = sdma_v2_4_ring_test_ib,
1225 .insert_nop = sdma_v2_4_ring_insert_nop, 1241 .insert_nop = sdma_v2_4_ring_insert_nop,
1226 .pad_ib = sdma_v2_4_ring_pad_ib, 1242 .pad_ib = sdma_v2_4_ring_pad_ib,
1243 .get_emit_ib_size = sdma_v2_4_ring_get_emit_ib_size,
1244 .get_dma_frame_size = sdma_v2_4_ring_get_dma_frame_size,
1227}; 1245};
1228 1246
1229static void sdma_v2_4_set_ring_funcs(struct amdgpu_device *adev) 1247static void sdma_v2_4_set_ring_funcs(struct amdgpu_device *adev)