All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joseph Greathouse <Joseph.Greathouse@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Joseph Greathouse <Joseph.Greathouse@amd.com>
Subject: [PATCH 2/3] drm/amdgpu: Use SDMA1 for buffer movement on Aldebaran
Date: Fri, 20 Aug 2021 00:32:44 -0500	[thread overview]
Message-ID: <20210820053245.340945-2-Joseph.Greathouse@amd.com> (raw)
In-Reply-To: <20210820053245.340945-1-Joseph.Greathouse@amd.com>

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@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


  reply	other threads:[~2021-08-20  5:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20  5:32 [PATCH 1/3] drm/amdkfd: Allocate SDMA engines more fairly Joseph Greathouse
2021-08-20  5:32 ` Joseph Greathouse [this message]
2021-08-20  6:59   ` [PATCH 2/3] drm/amdgpu: Use SDMA1 for buffer movement on Aldebaran Christian König
2021-08-20 23:27     ` Greathouse, Joseph
2021-08-20  5:32 ` [PATCH 3/3] drm/amdkfd: Spread out XGMI SDMA allocations Joseph Greathouse
2021-08-20 22:03 ` [PATCH 1/3] drm/amdkfd: Allocate SDMA engines more fairly Felix Kuehling
2021-08-23  7:08 ` Lazar, Lijo
2021-08-23 17:04   ` Felix Kuehling
2021-08-24  4:37     ` Lazar, Lijo
2021-08-24  6:49       ` Greathouse, Joseph
2021-08-24  7:23         ` Lazar, Lijo
2021-08-24  7:56           ` Greathouse, Joseph
2021-08-24 12:33             ` Lazar, Lijo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210820053245.340945-2-Joseph.Greathouse@amd.com \
    --to=joseph.greathouse@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.