diff options
author | Vitaly Prosyak <vitaly.prosyak@amd.com> | 2024-06-22 18:31:30 -0400 |
---|---|---|
committer | Vitaly Prosyak <vitaly.prosyak@amd.com> | 2024-06-24 10:29:26 -0400 |
commit | a2600953b16d6628855b89ac40f477b58933b37b (patch) | |
tree | 9350a537c04f9edc855c175d95b3fe0bef96a5f5 /tests | |
parent | 35f93af8fbeca28f457de350fec44bf272c705ff (diff) |
tests/amdgpu/gang_cs: skip test for some chips
Check if gang tests are enabled based on GPU information.
For generations Navi10 and Navi14, gang submit + reserved VMID doesn't work.
This function mirrors the logic in amdgpu.
v2 : Improve commit message to match amdgpu (Christian)
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Christian Koenig <christian.koenig@amd.com>
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: Jesse Zhang <Jesse.Zhang@amd.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/amdgpu/amd_gang_cs.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/amdgpu/amd_gang_cs.c b/tests/amdgpu/amd_gang_cs.c index 722c376ee..cd36f08ad 100644 --- a/tests/amdgpu/amd_gang_cs.c +++ b/tests/amdgpu/amd_gang_cs.c @@ -9,10 +9,39 @@ #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. + * For generations Navi10 and Navi14, gang submit + reserved VMID doesn't work. + * 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 +262,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); } |