[PATCH i-g-t] tests/amdgpu/amd_basic: fix compilation warning
vitaly prosyak
vprosyak at amd.com
Thu Jul 10 18:05:44 UTC 2025
The patch looks great to me — much appreciated for your quick response via email.
Reviewed-by: Vitaly Prosyak vitaly.prosyak at amd.com
Are you planning to merge it yourself, or would you prefer that I take care of it?
Thanks!
On 2025-07-10 08:34, Kamil Konieczny wrote:
> Fix compilation warning:
> [1564/2025] 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)
> | ^~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Jesse Zhang <Jesse.Zhang at amd.com>
> Cc: Vitaly Prosyak <vitaly.prosyak at amd.com>
> Fixes: b195a6c65cdd ("tests/amdgpu: Add test coverage for all user-mode queues across IP blocks")
> Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
> tests/amdgpu/amd_basic.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/tests/amdgpu/amd_basic.c b/tests/amdgpu/amd_basic.c
> index 100a634ce..45cf64251 100644
> --- a/tests/amdgpu/amd_basic.c
> +++ b/tests/amdgpu/amd_basic.c
> @@ -707,8 +707,8 @@ igt_main
> int r;
> bool arr_cap[AMD_IP_MAX] = {0};
> bool userq_arr_cap[AMD_IP_MAX] = {0};
> + bool enable_test = false;
> #ifdef AMDGPU_USERQ_ENABLED
> - bool enable_test;
> const char *env = getenv("AMDGPU_ENABLE_USERQTEST");
>
> enable_test = env && atoi(env);
> @@ -805,11 +805,9 @@ igt_main
> }
> }
>
> -#ifdef AMDGPU_USERQ_ENABLED
> -
> igt_describe("Check-GFX-CS-for-every-available-ring-works-for-write-const-fill-and-copy-operation-using-more-than-one-IB-and-shared-IB");
> igt_subtest_with_dynamic("cs-gfx-with-IP-GFX-UMQ") {
> - if (userq_arr_cap[AMD_IP_GFX]) {
> + if (enable_test && userq_arr_cap[AMD_IP_GFX]) {
> igt_dynamic_f("cs-gfx-with-umq")
> amdgpu_command_submission_gfx(device, info.hw_ip_version_major < 11, true);
> }
> @@ -817,7 +815,7 @@ igt_main
>
> igt_describe("Check-COMPUTE-CS-for-every-available-ring-works-for-write-const-fill-copy-and-nop-operation");
> igt_subtest_with_dynamic("cs-compute-with-IP-COMPUTE-UMQ") {
> - if (userq_arr_cap[AMD_IP_COMPUTE]) {
> + if (enable_test && userq_arr_cap[AMD_IP_COMPUTE]) {
> igt_dynamic_f("cs-compute-with-umq")
> amdgpu_command_submission_compute(device, true);
> }
> @@ -825,7 +823,7 @@ igt_main
>
> igt_describe("Check-sync-dependency-using-GFX-ring");
> igt_subtest_with_dynamic("sync-dependency-test-with-IP-GFX-UMQ") {
> - if (userq_arr_cap[AMD_IP_GFX]) {
> + if (enable_test && userq_arr_cap[AMD_IP_GFX]) {
> igt_dynamic_f("sync-dependency-test-with-umq")
> amdgpu_sync_dependency_test(device, true);
> }
> @@ -848,7 +846,6 @@ igt_main
> amdgpu_test_all_queues(device, true);
> }
> }
> -#endif
>
> igt_fixture {
> amdgpu_device_deinitialize(device);
More information about the igt-dev
mailing list