From: "Jesse.zhang@amd.com" <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@amd.com" <jesse.zhang@amd.com>,
Jesse Zhang <Jesse.Zhang@amd.com>
Subject: [PATCH i-g-t] lib/amdgpu: change sdma limit check
Date: Mon, 14 Oct 2024 13:05:58 +0800 [thread overview]
Message-ID: <20241014050558.1163562-1-jesse.zhang@amd.com> (raw)
This sdma limit is only for mi100.
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
---
lib/amdgpu/amd_ip_blocks.c | 11 +++++++----
lib/amdgpu/amd_ip_blocks.h | 2 ++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/lib/amdgpu/amd_ip_blocks.c b/lib/amdgpu/amd_ip_blocks.c
index f22a322e5..df603618b 100644
--- a/lib/amdgpu/amd_ip_blocks.c
+++ b/lib/amdgpu/amd_ip_blocks.c
@@ -190,8 +190,9 @@ sdma_ring_copy_linear(const struct amdgpu_ip_funcs *func,
SDMA_COPY_SUB_OPCODE_LINEAR,
context->secure ? 0x4 : 0);
if (func->family_id >= AMDGPU_FAMILY_AI) {
- /* For FAMILY AI, the maximum copy range supported by sdma is 4MB */
- if (func->family_id >= AMDGPU_FAMILY_AI && context->write_length > 0x3fffff) {
+ /* For mi100, the maximum copy range supported by sdma is 4MB */
+ if (func->family_id == AMDGPU_FAMILY_AI && func->chip_external_rev == 0x33
+ && context->write_length > 0x3fffff) {
context->pm4[i++] = 0x3fffff;
igt_warn("sdma copy count exceeds the maximum limit of 4MB\n");
} else {
@@ -855,9 +856,11 @@ int setup_amdgpu_ip_blocks(uint32_t major, uint32_t minor, struct amdgpu_gpu_inf
* TO DO: move family id as a parameter into IP functions and
* remove it as a field
*/
- for (int i = 0; i < amdgpu_ips.num_ip_blocks; i++)
+ for (int i = 0; i < amdgpu_ips.num_ip_blocks; i++) {
amdgpu_ips.ip_blocks[i]->funcs->family_id = amdinfo->family_id;
-
+ amdgpu_ips.ip_blocks[i]->funcs->chip_external_rev = amdinfo->chip_external_rev;
+ amdgpu_ips.ip_blocks[i]->funcs->chip_rev = amdinfo->chip_rev;
+ }
/* extra precaution if re-factor again */
igt_assert_eq(gfx_v8_x_ip_block.major, 8);
igt_assert_eq(compute_v8_x_ip_block.major, 8);
diff --git a/lib/amdgpu/amd_ip_blocks.h b/lib/amdgpu/amd_ip_blocks.h
index 679e2ea46..109d36602 100644
--- a/lib/amdgpu/amd_ip_blocks.h
+++ b/lib/amdgpu/amd_ip_blocks.h
@@ -133,6 +133,8 @@ struct amdgpu_ring_context {
struct amdgpu_ip_funcs {
uint32_t family_id;
+ uint32_t chip_external_rev;
+ uint32_t chip_rev;
uint32_t align_mask;
uint32_t nop;
uint32_t deadbeaf;
--
2.25.1
next reply other threads:[~2024-10-14 5:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 5:05 Jesse.zhang@amd.com [this message]
2024-10-14 5:38 ` ✓ CI.xeBAT: success for lib/amdgpu: change sdma limit check Patchwork
2024-10-14 5:46 ` ✓ Fi.CI.BAT: " Patchwork
2024-10-14 6:33 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-14 6:50 ` ✗ Fi.CI.IGT: " Patchwork
2024-10-16 2:06 ` [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=20241014050558.1163562-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