Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/amdgpu: change sdma limit check
@ 2024-10-14  5:05 Jesse.zhang@amd.com
  2024-10-14  5:38 ` ✓ CI.xeBAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jesse.zhang@amd.com @ 2024-10-14  5:05 UTC (permalink / raw)
  To: igt-dev
  Cc: Vitaly Prosyak, Alex Deucher, Christian Koenig,
	Jesse.zhang@amd.com, Jesse Zhang

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-16  2:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14  5:05 [PATCH i-g-t] lib/amdgpu: change sdma limit check Jesse.zhang@amd.com
2024-10-14  5:38 ` ✓ CI.xeBAT: success for " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox