[PATCH 2/2] tests/amdgpu/gang_cs: skip test for some chips

Zhang, Jesse(Jie) Jesse.Zhang at amd.com
Mon Jun 24 01:57:33 UTC 2024


[AMD Official Use Only - AMD Internal Distribution Only]

This patch looks good to me.

Reviewed-by: Jesse Zhang <Jesse.Zhang at amd.com>

-----Original Message-----
From: vitaly.prosyak at amd.com <vitaly.prosyak at amd.com>
Sent: Sunday, June 23, 2024 6:52 AM
To: igt-dev at lists.freedesktop.org
Cc: Prosyak, Vitaly <Vitaly.Prosyak at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Koenig, Christian <Christian.Koenig at amd.com>; Kamil Konieczny <kamil.konieczny at linux.intel.com>; Zhang, Jesse(Jie) <Jesse.Zhang at amd.com>
Subject: [PATCH 2/2] tests/amdgpu/gang_cs: skip test for some chips

From: Vitaly Prosyak <vitaly.prosyak at amd.com>

Check if gang tests are enabled based on GPU information.
Gang tests are supported starting with Vega10, but are broken on Navi10 and Navi14. This function mirrors the logic in amdgpu.

Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: Christian Koenig <christian.koenig at amd.com>
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Cc: Jesse Zhang <Jesse.Zhang at amd.com>
Suggested-by: Christian Koenig <christian.koenig at amd.com>
Signed-off-by: Vitaly Prosyak <vitaly.prosyak at amd.com>
---
 tests/amdgpu/amd_gang_cs.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/tests/amdgpu/amd_gang_cs.c b/tests/amdgpu/amd_gang_cs.c index 722c376ee..699862670 100644
--- a/tests/amdgpu/amd_gang_cs.c
+++ b/tests/amdgpu/amd_gang_cs.c
@@ -9,10 +9,38 @@
 #include "lib/amdgpu/amd_ip_blocks.h"
 #include "lib/amdgpu/amd_memory.h"
 #include "lib/amdgpu/amd_cs_radv.h"
+#include "lib/amdgpu/amd_family.h"

 #define IB_SIZE        4096

+/**
+ * Check if gang tests are enabled based on GPU information.
+ *
+ * Gang tests are supported starting with Vega10 but are broken on Navi10 and Navi14.
+ * This function mirrors the logic in the following amdgpu code:
+ *
+ * void amdgpu_vm_manager_init(struct amdgpu_device *adev) {
+ *     adev->vm_manager.concurrent_flush = !(adev->asic_type < CHIP_VEGA10 ||
+ *                                           adev->asic_type == CHIP_NAVI10 ||
+ *                                           adev->asic_type == CHIP_NAVI14);
+ * }
+ *
+ * @param gpu_info: Pointer to the structure containing GPU information.
+ * @return: True if gang tests are enabled, false otherwise.
+ */
+static bool is_gang_tests_enable(const struct chip_info *pChip) {
+       /* Concurrent flushes are supported only on Vega10 and newer,
+        * excluding Navi10 and Navi14 due to known issues.
+        */
+       if (pChip->family < CHIP_VEGA10 ||
+               pChip->family == CHIP_NAVI10 ||
+               pChip->family == CHIP_NAVI14) {
+               return false;
+       }

+       return true;
+}

 static void
 prepare_compute_cp_packet(amdgpu_device_handle device, @@ -233,6 +261,7 @@ igt_main
                igt_assert_eq(r, 0);
                r = setup_amdgpu_ip_blocks(major, minor, &gpu_info, device);
                igt_assert_eq(r, 0);
+               igt_skip_on(!is_gang_tests_enable(g_pChip));
                asic_rings_readness(device, 1, arr_cap);

        }
--
2.25.1



More information about the igt-dev mailing list