[PATCH i-g-t 3/4] tests/amdgpu: Add test coverage for all user-mode queues across IP blocks

vitaly prosyak vprosyak at amd.com
Thu Jul 10 19:17:15 UTC 2025


On 2025-07-10 12:17, Kamil Konieczny wrote:
> Hi Vitaly,
> On 2025-07-10 at 07:23:52 -0400, vitaly prosyak wrote:
>> On 2025-07-10 01:58, Dixit, Ashutosh wrote:
>>> On Tue, 08 Jul 2025 00:47:49 -0700, Jesse.Zhang wrote:
>>>> Introduced a new test function, amdgpu_test_all_queues(), to validate
>>>> write-linear command submission across all available IP blocks (GFX, Compute, SDMA)
>>>> with user-mode queues (UMQ).
>>>>
>>>> - Adds a dynamic subtest "all-queues-test-with-UMQ" under amdgpu_basic to ensure
>>>>   all supported IP queues are exercised individually and in combination.
>>>> - Uses the newly added helper amdgpu_command_submission_write_linear_helper2() to
>>>>   manage setup, execution, and teardown across multiple IP types.
>>>>
>>>> This improves test coverage for command submission paths involving user queues
>>>> and multi-IP coordination.
>>>>
>>>> Signed-off-by: Jesse Zhang <Jesse.Zhang at amd.com>
>>>> ---
>>>>  tests/amdgpu/amd_basic.c | 18 ++++++++++++++++++
>>>>  1 file changed, 18 insertions(+)
>>>>
>>>> diff --git a/tests/amdgpu/amd_basic.c b/tests/amdgpu/amd_basic.c
>>>> index 8c6b466ce..100a634ce 100644
>>>> --- a/tests/amdgpu/amd_basic.c
>>>> +++ b/tests/amdgpu/amd_basic.c
>>>> @@ -139,6 +139,14 @@ static void amdgpu_command_submission_sdma(amdgpu_device_handle device, bool use
>>>> 	amdgpu_command_submission_nop(device, AMDGPU_HW_IP_DMA, user_queue);
>>>>  }
>>>>
>>>> +static void amdgpu_test_all_queues(amdgpu_device_handle device, bool user_queue)
>>>> +{
>>>> +	amdgpu_command_submission_write_linear_helper2(device, AMDGPU_HW_IP_GFX, false, user_queue);
>>>> +	amdgpu_command_submission_write_linear_helper2(device, AMDGPU_HW_IP_COMPUTE, false, user_queue);
>>>> +	amdgpu_command_submission_write_linear_helper2(device, AMDGPU_HW_IP_DMA, false, user_queue);
>>>> +	amdgpu_command_submission_write_linear_helper2(device, AMDGPU_HW_IP_GFX |AMDGPU_HW_IP_COMPUTE |
>>>> +							AMDGPU_HW_IP_DMA, false, user_queue);
>>>> +}
>>>>  /**
>>>>   * SEMAPHORE
>>>>   * @param device
>>>> @@ -830,6 +838,16 @@ igt_main
>>>> 			amdgpu_command_submission_sdma(device, true);
>>>> 		}
>>>> 	}
>>>> +
>>>> +	igt_describe("Check-all-user-queues-for-write-operation");
>>>> +	igt_subtest_with_dynamic("all-queues-test-with-UMQ") {
>>>> +		if (enable_test && userq_arr_cap[AMD_IP_GFX] &&
>>>> +				userq_arr_cap[AMD_IP_COMPUTE] &&
>>>> +				userq_arr_cap[AMD_IP_DMA]) {
>>>> +			igt_dynamic_f("all-queues-with-umq")
>>>> +			amdgpu_test_all_queues(device, true);
>>> Please clean up this warning without AMDGPU_USERQ_ENABLED:
>>>
>>> 636/1531] Compiling C object tests/amdgpu/amd_basic.p/amd_basic.c.o
>>> ../tests/amdgpu/amd_basic.c:142:13: warning: ‘amdgpu_test_all_queues’ defined but not used [-Wunused-function]
>>>   142 | static void amdgpu_test_all_queues(amdgpu_device_handle device, bool user_queue)
>>>       |             ^~~~~~~~~~~~~~~~~~~~~~
>>> [1526/1529] Generating docs/testplan/intel-ci-tests with a custom command
>> Thank you very much for the email. I’ll proceed with another patch today, as this one has already been merged.
>>
>> Vitaly
> I already proposed one but feel free to do it your way,
> any solution is good.
Hi Kamil

Your solution looks excellent to me—thanks a lot! I've replied to your patch as well

Vitaly

> Regards,
> Kamil
>
>>>
>>>> +		}
>>>> +	}
>>>>  #endif
>>>>
>>>> 	igt_fixture {
>>>> --
>>>> 2.49.0
>>>>


More information about the igt-dev mailing list