[PATCH 2/3] drm/amdgpu: Use SDMA1 for buffer movement on Aldebaran

Joseph Greathouse Joseph.Greathouse at amd.com
Fri Aug 20 05:32:44 UTC 2021


Aldebaran should not use SDMA0 for buffer funcs such as page migration.
Instead, we move over to SDMA1 for these features. Leave SDMA0 in
charge for all other existing chips to avoid any possibility of
regressions.

Signed-off-by: Joseph Greathouse <Joseph.Greathouse at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index 8931000dcd41..771630d7bb3f 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -2689,11 +2689,15 @@ static const struct amdgpu_buffer_funcs sdma_v4_0_buffer_funcs = {
 
 static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev)
 {
+	int engine = 0;
+
+	if (adev->asic_type == CHIP_ALDEBARAN)
+		engine = 1;
 	adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;
 	if (adev->sdma.has_page_queue)
-		adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].page;
+		adev->mman.buffer_funcs_ring = &adev->sdma.instance[engine].page;
 	else
-		adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring;
+		adev->mman.buffer_funcs_ring = &adev->sdma.instance[engine].ring;
 }
 
 static const struct amdgpu_vm_pte_funcs sdma_v4_0_vm_pte_funcs = {
-- 
2.20.1



More information about the amd-gfx mailing list