diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-09-16 10:59:31 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-16 15:52:59 -0400 |
commit | 928d467448596228af2d4fe3f13251e4fa8de656 (patch) | |
tree | 267a203eff67fd7686e35622db817626ba8033cd | |
parent | fe7c0f26daa615e3cc4b817f657e86d6e75c261d (diff) |
drm/amdgpu/sdma3: 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_v3_0.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c index cabb9fe08739..62e2f4ccbfe4 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | |||
@@ -1108,6 +1108,22 @@ static void sdma_v3_0_ring_emit_vm_flush(struct amdgpu_ring *ring, | |||
1108 | SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10)); /* retry count, poll interval */ | 1108 | SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10)); /* retry count, poll interval */ |
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | static unsigned sdma_v3_0_ring_get_emit_ib_size(struct amdgpu_ring *ring) | ||
1112 | { | ||
1113 | return | ||
1114 | 7 + 6; /* sdma_v3_0_ring_emit_ib */ | ||
1115 | } | ||
1116 | |||
1117 | static unsigned sdma_v3_0_ring_get_dma_frame_size(struct amdgpu_ring *ring) | ||
1118 | { | ||
1119 | return | ||
1120 | 6 + /* sdma_v3_0_ring_emit_hdp_flush */ | ||
1121 | 3 + /* sdma_v3_0_ring_emit_hdp_invalidate */ | ||
1122 | 6 + /* sdma_v3_0_ring_emit_pipeline_sync */ | ||
1123 | 12 + /* sdma_v3_0_ring_emit_vm_flush */ | ||
1124 | 10 + 10 + 10; /* sdma_v3_0_ring_emit_fence x3 for user fence, vm fence */ | ||
1125 | } | ||
1126 | |||
1111 | static int sdma_v3_0_early_init(void *handle) | 1127 | static int sdma_v3_0_early_init(void *handle) |
1112 | { | 1128 | { |
1113 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 1129 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
@@ -1569,6 +1585,8 @@ static const struct amdgpu_ring_funcs sdma_v3_0_ring_funcs = { | |||
1569 | .test_ib = sdma_v3_0_ring_test_ib, | 1585 | .test_ib = sdma_v3_0_ring_test_ib, |
1570 | .insert_nop = sdma_v3_0_ring_insert_nop, | 1586 | .insert_nop = sdma_v3_0_ring_insert_nop, |
1571 | .pad_ib = sdma_v3_0_ring_pad_ib, | 1587 | .pad_ib = sdma_v3_0_ring_pad_ib, |
1588 | .get_emit_ib_size = sdma_v3_0_ring_get_emit_ib_size, | ||
1589 | .get_dma_frame_size = sdma_v3_0_ring_get_dma_frame_size, | ||
1572 | }; | 1590 | }; |
1573 | 1591 | ||
1574 | static void sdma_v3_0_set_ring_funcs(struct amdgpu_device *adev) | 1592 | static void sdma_v3_0_set_ring_funcs(struct amdgpu_device *adev) |