AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yong Zhao <Yong.Zhao@amd.com>
To: amd-gfx@lists.freedesktop.org
Cc: Yong Zhao <Yong.Zhao@amd.com>
Subject: [PATCH 2/3] drm/amdgpu: Use MAX_SDMA_ENGINE_NUM instead of a number
Date: Wed,  5 Feb 2020 21:35:35 -0500	[thread overview]
Message-ID: <20200206023536.4417-2-Yong.Zhao@amd.com> (raw)
In-Reply-To: <20200206023536.4417-1-Yong.Zhao@amd.com>

MAX_SDMA_ENGINE_NUM will be used in more than one place.

Change-Id: I99c84086ee62612b373c547a9d29bc4a69e7c72e
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h    | 2 +-
 drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h
index 3fa18003d4d6..9d41d983a40f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h
@@ -52,7 +52,7 @@ struct amdgpu_doorbell_index {
 	uint32_t userqueue_end;
 	uint32_t gfx_ring0;
 	uint32_t gfx_ring1;
-	uint32_t sdma_engine[8];
+	uint32_t sdma_engine[MAX_SDMA_ENGINE_NUM];
 	uint32_t ih;
 	union {
 		struct {
diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
index 55750890b73f..3709d3603fb0 100644
--- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
@@ -35,6 +35,7 @@
 struct pci_dev;
 
 #define KGD_MAX_QUEUES 128
+#define MAX_SDMA_ENGINE_NUM 8
 
 struct kfd_dev;
 struct kgd_dev;
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-02-06  2:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06  2:35 [PATCH 1/3] drm/amdkfd: Delete excessive printings Yong Zhao
2020-02-06  2:35 ` Yong Zhao [this message]
2020-02-06  2:35 ` [PATCH 3/3] drm/amdkfd: Fix bugs in SDMA queues mapping in HWS mode Yong Zhao

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=20200206023536.4417-2-Yong.Zhao@amd.com \
    --to=yong.zhao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox