amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Keely, Sean" <Sean.Keely@amd.com>
To: "Huang, Ray" <Ray.Huang@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Yu, Lang" <Lang.Yu@amd.com>, "Gong, Curry" <Curry.Gong@amd.com>,
	"Huang, Ray" <Ray.Huang@amd.com>
Subject: Re: [PATCH 1/2] drm/amdgpu: fix to use real compute unit number for shader array mask
Date: Thu, 23 Sep 2021 05:47:57 +0000	[thread overview]
Message-ID: <DM6PR12MB33555F49DF56C6721E9F692994A39@DM6PR12MB3355.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210923054201.1433036-1-ray.huang@amd.com>

[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]

[AMD Official Use Only]

That is not how the register works.  The *16 has nothing to do with cu counts.  This is to address the upper and lower 16 bits in the register as each half of the register programs a separate SH.



________________________________
From: Huang, Ray <Ray.Huang@amd.com>
Sent: Thursday, September 23, 2021, 12:42 AM
To: amd-gfx@lists.freedesktop.org
Cc: Kuehling, Felix; Keely, Sean; Deucher, Alexander; Yu, Lang; Gong, Curry; Huang, Ray
Subject: [PATCH 1/2] drm/amdgpu: fix to use real compute unit number for shader array mask

We should use the real compute unit number for shader array mask. Some
asic doesn't have 16 compute units per shader array.

Signed-off-by: Huang Rui <ray.huang@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
index c021519af810..0891c937f4da 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
@@ -159,12 +159,12 @@ void mqd_symmetrically_map_cu_mask(struct mqd_manager *mm,
                 se_mask[i] = 0;

         i = 0;
-       for (cu = 0; cu < 16; cu++) {
+       for (cu = 0; cu < cu_info.num_cu_per_sh; cu++) {
                 for (sh = 0; sh < cu_info.num_shader_arrays_per_engine; sh++) {
                         for (se = 0; se < cu_info.num_shader_engines; se++) {
                                 if (cu_per_sh[se][sh] > cu) {
                                         if (cu_mask[i / 32] & (1 << (i % 32)))
-                                               se_mask[se] |= 1 << (cu + sh * 16);
+                                               se_mask[se] |= 1 << (cu + sh * cu_info.num_cu_per_sh);
                                         i++;
                                         if (i == cu_mask_count)
                                                 return;
--
2.25.1



[-- Attachment #2: Type: text/html, Size: 5106 bytes --]

      parent reply	other threads:[~2021-09-23  5:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23  5:42 [PATCH 1/2] drm/amdgpu: fix to use real compute unit number for shader array mask Huang Rui
2021-09-23  5:42 ` [PATCH 2/2] drm/amdgpu: update shader array golden setting for cyan_skillfish Huang Rui
2021-09-23  5:47 ` Keely, Sean [this message]

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=DM6PR12MB33555F49DF56C6721E9F692994A39@DM6PR12MB3355.namprd12.prod.outlook.com \
    --to=sean.keely@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Curry.Gong@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Lang.Yu@amd.com \
    --cc=Ray.Huang@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;
as well as URLs for NNTP newsgroup(s).