diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-09-16 10:58:52 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-16 15:52:58 -0400 |
commit | 77b52a5bc66916c34a443563f070e65449feb683 (patch) | |
tree | 2cef3b1049b71206e2bef08b833270b9c5f7953c /drivers/gpu/drm/amd/amdgpu | |
parent | 229e2d46da4f5ec7ca7845ccbbdf04bf445c048e (diff) |
drm/amdgpu/cik_sdma: 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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c index e71cd12104b3..e6d7bf9520a0 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c | |||
@@ -847,6 +847,22 @@ static void cik_sdma_ring_emit_vm_flush(struct amdgpu_ring *ring, | |||
847 | amdgpu_ring_write(ring, (0xfff << 16) | 10); /* retry count, poll interval */ | 847 | amdgpu_ring_write(ring, (0xfff << 16) | 10); /* retry count, poll interval */ |
848 | } | 848 | } |
849 | 849 | ||
850 | static unsigned cik_sdma_ring_get_emit_ib_size(struct amdgpu_ring *ring) | ||
851 | { | ||
852 | return | ||
853 | 7 + 4; /* cik_sdma_ring_emit_ib */ | ||
854 | } | ||
855 | |||
856 | static unsigned cik_sdma_ring_get_dma_frame_size(struct amdgpu_ring *ring) | ||
857 | { | ||
858 | return | ||
859 | 6 + /* cik_sdma_ring_emit_hdp_flush */ | ||
860 | 3 + /* cik_sdma_ring_emit_hdp_invalidate */ | ||
861 | 6 + /* cik_sdma_ring_emit_pipeline_sync */ | ||
862 | 12 + /* cik_sdma_ring_emit_vm_flush */ | ||
863 | 9 + 9 + 9; /* cik_sdma_ring_emit_fence x3 for user fence, vm fence */ | ||
864 | } | ||
865 | |||
850 | static void cik_enable_sdma_mgcg(struct amdgpu_device *adev, | 866 | static void cik_enable_sdma_mgcg(struct amdgpu_device *adev, |
851 | bool enable) | 867 | bool enable) |
852 | { | 868 | { |
@@ -1220,6 +1236,8 @@ static const struct amdgpu_ring_funcs cik_sdma_ring_funcs = { | |||
1220 | .test_ib = cik_sdma_ring_test_ib, | 1236 | .test_ib = cik_sdma_ring_test_ib, |
1221 | .insert_nop = cik_sdma_ring_insert_nop, | 1237 | .insert_nop = cik_sdma_ring_insert_nop, |
1222 | .pad_ib = cik_sdma_ring_pad_ib, | 1238 | .pad_ib = cik_sdma_ring_pad_ib, |
1239 | .get_emit_ib_size = cik_sdma_ring_get_emit_ib_size, | ||
1240 | .get_dma_frame_size = cik_sdma_ring_get_dma_frame_size, | ||
1223 | }; | 1241 | }; |
1224 | 1242 | ||
1225 | static void cik_sdma_set_ring_funcs(struct amdgpu_device *adev) | 1243 | static void cik_sdma_set_ring_funcs(struct amdgpu_device *adev) |