Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Zhang <jesse.zhang@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Christian Koenig <christian.koenig@amd.com>,
	Jesse Zhang <jesse.zhang@amd.com>,
	Jesse Zhang <Jesse.Zhang@amd.com>
Subject: [PATCH i-g-t] lib/amdgpu: fix amd dispatch  issue
Date: Tue, 9 Jul 2024 16:23:22 +0800	[thread overview]
Message-ID: <20240709082322.1873739-1-jesse.zhang@amd.com> (raw)

1. Fixed failure of querying ip info on gfx
   when only compute ring is enabled
2. Set different invalid addresses for multiple rings

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
---
 lib/amdgpu/amd_dispatch.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/amdgpu/amd_dispatch.c b/lib/amdgpu/amd_dispatch.c
index 12ef7874c..8b97ca269 100644
--- a/lib/amdgpu/amd_dispatch.c
+++ b/lib/amdgpu/amd_dispatch.c
@@ -233,7 +233,7 @@ amdgpu_memcpy_dispatch_test(amdgpu_device_handle device_handle,
 	base_cmd->emit(base_cmd, PACKET3_COMPUTE(PKT3_SET_SH_REG, 4));
 	base_cmd->emit(base_cmd, 0x240);
 	if (hang == BACKEND_SE_GC_SHADER_INVALID_USER_DATA) {
-		base_cmd->emit(base_cmd, mc_address_src);
+		base_cmd->emit(base_cmd, mc_address_src + ring * 0x1000);
 		base_cmd->emit(base_cmd, 0);
 	} else {
 		base_cmd->emit(base_cmd, mc_address_src);
@@ -254,11 +254,11 @@ amdgpu_memcpy_dispatch_test(amdgpu_device_handle device_handle,
 	base_cmd->emit(base_cmd, PACKET3_COMPUTE(PKT3_SET_SH_REG, 4));
 	base_cmd->emit(base_cmd, 0x244);
 	if (hang == BACKEND_SE_GC_SHADER_INVALID_USER_DATA) {
-		base_cmd->emit(base_cmd, mc_address_src);
+		base_cmd->emit(base_cmd, mc_address_dst + ring * 0x1000);
 		base_cmd->emit(base_cmd, 0);
 	} else {
-		base_cmd->emit(base_cmd, mc_address_src);
-		base_cmd->emit(base_cmd, (mc_address_src >> 32) | 0x100000);
+		base_cmd->emit(base_cmd, mc_address_dst);
+		base_cmd->emit(base_cmd, (mc_address_dst >> 32) | 0x100000);
 	}
 	base_cmd->emit(base_cmd, 0x400);
 	if (version == 9)
@@ -553,7 +553,7 @@ void amdgpu_gfx_dispatch_test(amdgpu_device_handle device_handle, uint32_t ip_ty
 	struct drm_amdgpu_info_hw_ip info;
 	uint32_t ring_id, version;
 
-	r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_GFX, 0, &info);
+	r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &info);
 	igt_assert_eq(r, 0);
 	if (!info.available_rings)
 		igt_info("SKIP ... as there's no graphics ring\n");
-- 
2.25.1


             reply	other threads:[~2024-07-09  8:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09  8:23 Jesse Zhang [this message]
2024-07-09  9:18 ` ✓ CI.xeBAT: success for lib/amdgpu: fix amd dispatch issue Patchwork
2024-07-09  9:36 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-09 10:46 ` ✓ CI.xeFULL: " Patchwork
2024-07-10  0:38 ` [PATCH i-g-t] " vitaly prosyak

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=20240709082322.1873739-1-jesse.zhang@amd.com \
    --to=jesse.zhang@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=vitaly.prosyak@amd.com \
    /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