diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-09-16 11:02:16 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-16 15:53:02 -0400 |
commit | 58fafbaf166673f1a5724b42360d6b35610727aa (patch) | |
tree | 03abcc0dc218641d8590479ba3c5b8e8a2806c39 /drivers/gpu/drm/amd/amdgpu | |
parent | 9d6b7a6447e8f5905c94782d3bd4b88a33846918 (diff) |
drm/amdgpu/vce3: 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/vce_v3_0.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index a55ddc092a9a..a6b4e27bee89 100644 --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | |||
@@ -808,6 +808,27 @@ static void vce_v3_0_emit_pipeline_sync(struct amdgpu_ring *ring) | |||
808 | amdgpu_ring_write(ring, seq); | 808 | amdgpu_ring_write(ring, seq); |
809 | } | 809 | } |
810 | 810 | ||
811 | static unsigned vce_v3_0_ring_get_emit_ib_size(struct amdgpu_ring *ring) | ||
812 | { | ||
813 | return | ||
814 | 5; /* vce_v3_0_ring_emit_ib */ | ||
815 | } | ||
816 | |||
817 | static unsigned vce_v3_0_ring_get_dma_frame_size(struct amdgpu_ring *ring) | ||
818 | { | ||
819 | return | ||
820 | 4 + /* vce_v3_0_emit_pipeline_sync */ | ||
821 | 6; /* amdgpu_vce_ring_emit_fence x1 no user fence */ | ||
822 | } | ||
823 | |||
824 | static unsigned vce_v3_0_ring_get_dma_frame_size_vm(struct amdgpu_ring *ring) | ||
825 | { | ||
826 | return | ||
827 | 6 + /* vce_v3_0_emit_vm_flush */ | ||
828 | 4 + /* vce_v3_0_emit_pipeline_sync */ | ||
829 | 6 + 6; /* amdgpu_vce_ring_emit_fence x2 vm fence */ | ||
830 | } | ||
831 | |||
811 | const struct amd_ip_funcs vce_v3_0_ip_funcs = { | 832 | const struct amd_ip_funcs vce_v3_0_ip_funcs = { |
812 | .name = "vce_v3_0", | 833 | .name = "vce_v3_0", |
813 | .early_init = vce_v3_0_early_init, | 834 | .early_init = vce_v3_0_early_init, |
@@ -841,6 +862,8 @@ static const struct amdgpu_ring_funcs vce_v3_0_ring_phys_funcs = { | |||
841 | .pad_ib = amdgpu_ring_generic_pad_ib, | 862 | .pad_ib = amdgpu_ring_generic_pad_ib, |
842 | .begin_use = amdgpu_vce_ring_begin_use, | 863 | .begin_use = amdgpu_vce_ring_begin_use, |
843 | .end_use = amdgpu_vce_ring_end_use, | 864 | .end_use = amdgpu_vce_ring_end_use, |
865 | .get_emit_ib_size = vce_v3_0_ring_get_emit_ib_size, | ||
866 | .get_dma_frame_size = vce_v3_0_ring_get_dma_frame_size, | ||
844 | }; | 867 | }; |
845 | 868 | ||
846 | static const struct amdgpu_ring_funcs vce_v3_0_ring_vm_funcs = { | 869 | static const struct amdgpu_ring_funcs vce_v3_0_ring_vm_funcs = { |
@@ -858,6 +881,8 @@ static const struct amdgpu_ring_funcs vce_v3_0_ring_vm_funcs = { | |||
858 | .pad_ib = amdgpu_ring_generic_pad_ib, | 881 | .pad_ib = amdgpu_ring_generic_pad_ib, |
859 | .begin_use = amdgpu_vce_ring_begin_use, | 882 | .begin_use = amdgpu_vce_ring_begin_use, |
860 | .end_use = amdgpu_vce_ring_end_use, | 883 | .end_use = amdgpu_vce_ring_end_use, |
884 | .get_emit_ib_size = vce_v3_0_ring_get_emit_ib_size, | ||
885 | .get_dma_frame_size = vce_v3_0_ring_get_dma_frame_size_vm, | ||
861 | }; | 886 | }; |
862 | 887 | ||
863 | static void vce_v3_0_set_ring_funcs(struct amdgpu_device *adev) | 888 | static void vce_v3_0_set_ring_funcs(struct amdgpu_device *adev) |