aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-01-31 06:20:55 -0500
committerAlex Deucher <alexander.deucher@amd.com>2016-02-10 14:17:20 -0500
commit9e5d53094c5366a9a14e0694e45e794902cc2c04 (patch)
treeaa539c677510e73aaa8aa55a6e34c8a4d928f7f5 /drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
parent4c0b242cf27094b666df6604420417e201260af9 (diff)
drm/amdgpu: make pad_ib a ring function v3
The padding depends on the firmware version and we need that for BO moves as well, not only for VM updates. v2: new approach of making pad_ib a ring function v3: fix typo in macro name Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index 7af4b57ad3d4..999a169299f0 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -999,14 +999,14 @@ static void sdma_v3_0_vm_set_pte_pde(struct amdgpu_ib *ib,
999} 999}
1000 1000
1001/** 1001/**
1002 * sdma_v3_0_vm_pad_ib - pad the IB to the required number of dw 1002 * sdma_v3_0_ring_pad_ib - pad the IB to the required number of dw
1003 * 1003 *
1004 * @ib: indirect buffer to fill with padding 1004 * @ib: indirect buffer to fill with padding
1005 * 1005 *
1006 */ 1006 */
1007static void sdma_v3_0_vm_pad_ib(struct amdgpu_ib *ib) 1007static void sdma_v3_0_ring_pad_ib(struct amdgpu_ring *ring, struct amdgpu_ib *ib)
1008{ 1008{
1009 struct amdgpu_sdma_instance *sdma = amdgpu_get_sdma_instance(ib->ring); 1009 struct amdgpu_sdma_instance *sdma = amdgpu_get_sdma_instance(ring);
1010 u32 pad_count; 1010 u32 pad_count;
1011 int i; 1011 int i;
1012 1012
@@ -1542,6 +1542,7 @@ static const struct amdgpu_ring_funcs sdma_v3_0_ring_funcs = {
1542 .test_ring = sdma_v3_0_ring_test_ring, 1542 .test_ring = sdma_v3_0_ring_test_ring,
1543 .test_ib = sdma_v3_0_ring_test_ib, 1543 .test_ib = sdma_v3_0_ring_test_ib,
1544 .insert_nop = sdma_v3_0_ring_insert_nop, 1544 .insert_nop = sdma_v3_0_ring_insert_nop,
1545 .pad_ib = sdma_v3_0_ring_pad_ib,
1545}; 1546};
1546 1547
1547static void sdma_v3_0_set_ring_funcs(struct amdgpu_device *adev) 1548static void sdma_v3_0_set_ring_funcs(struct amdgpu_device *adev)
@@ -1639,7 +1640,6 @@ static const struct amdgpu_vm_pte_funcs sdma_v3_0_vm_pte_funcs = {
1639 .copy_pte = sdma_v3_0_vm_copy_pte, 1640 .copy_pte = sdma_v3_0_vm_copy_pte,
1640 .write_pte = sdma_v3_0_vm_write_pte, 1641 .write_pte = sdma_v3_0_vm_write_pte,
1641 .set_pte_pde = sdma_v3_0_vm_set_pte_pde, 1642 .set_pte_pde = sdma_v3_0_vm_set_pte_pde,
1642 .pad_ib = sdma_v3_0_vm_pad_ib,
1643}; 1643};
1644 1644
1645static void sdma_v3_0_set_vm_pte_funcs(struct amdgpu_device *adev) 1645static void sdma_v3_0_set_vm_pte_funcs(struct amdgpu_device *adev)