[PATCH i-g-t 3/3] tests/amdgpu: Add AQL packet copy test

Jesse.Zhang Jesse.Zhang at amd.com
Fri Apr 25 03:31:14 UTC 2025


Add a new test case `aql-vendor-specific-packet-with-IP-COMPUTE-UMQ`
that verifies:
1. AQL queue creation with the new flag
2. Basic AQL packet submission
3. Memory copy operation using AQL format
4. Proper synchronization between CPU and GPU

The test focuses on vendor-specific AQL packets as a foundation for
future HSA-compatible tests.

Signed-off-by: Jesse.Zhang <Jesse.Zhang at amd.com>
---
 tests/amdgpu/amd_basic.c | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/tests/amdgpu/amd_basic.c b/tests/amdgpu/amd_basic.c
index eb8447220..695b55349 100644
--- a/tests/amdgpu/amd_basic.c
+++ b/tests/amdgpu/amd_basic.c
@@ -86,7 +86,7 @@ static void amdgpu_command_submission_gfx(amdgpu_device_handle device,
 	/* copy data using the CP */
 	amdgpu_command_submission_copy_linear_helper(device,
 						     get_ip_block(device, AMDGPU_HW_IP_GFX),
-						     user_queue);
+						     user_queue, false);
 	if (ce_avails) {
 		/* separate IB buffers for multi-IB submission */
 		amdgpu_command_submission_gfx_separate_ibs(device);
@@ -114,11 +114,26 @@ static void amdgpu_command_submission_compute(amdgpu_device_handle device, bool
 	/* copy data using the CP */
 	amdgpu_command_submission_copy_linear_helper(device,
 						     get_ip_block(device, AMDGPU_HW_IP_COMPUTE),
-						     user_queue);
+						     user_queue, false);
 	/* nop test */
 	amdgpu_command_submission_compute_nop(device, user_queue);
 }
 
+/**
+ * AMDGPU_HW_IP_COMPUTE
+ * @param device
+ * @param user_queue
+ */
+
+static void amdgpu_command_submission_aql(amdgpu_device_handle device, bool user_queue)
+{
+	/* copy data using the CP */
+	amdgpu_command_submission_copy_linear_helper(device,
+						     get_ip_block(device, AMDGPU_HW_IP_COMPUTE),
+						     user_queue, true);
+
+}
+
 /**
  * AMDGPU_HW_IP_DMA
  * @param device
@@ -135,7 +150,7 @@ static void amdgpu_command_submission_sdma(amdgpu_device_handle device, bool use
 
 	amdgpu_command_submission_copy_linear_helper(device,
 						     get_ip_block(device, AMDGPU_HW_IP_DMA),
-						     user_queue);
+						     user_queue, false);
 }
 
 /**
@@ -815,6 +830,14 @@ igt_main
 			amdgpu_sync_dependency_test(device, true);
 		}
 	}
+
+	igt_describe("Check-aql-queue-work-by-filling-copy-operation");
+	igt_subtest_with_dynamic("aql-verdor-specific-packet-with-IP-COMPUTE-UMQ") {
+		if (arr_cap[AMD_IP_GFX]) {
+			igt_dynamic_f("aql-copy-test-with-umq")
+			amdgpu_command_submission_aql(device, true);
+		}
+	}
 #endif
 
 	igt_fixture {
-- 
2.49.0



More information about the igt-dev mailing list