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

Christian König christian.koenig at amd.com
Mon Jun 24 09:44:35 UTC 2024


Am 23.06.24 um 00:52 schrieb vitaly.prosyak at amd.com:
> 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.

It's not the whole gang submit feature that's broken, only gang submit + 
reserved VMID doesn't work on those hw generations.

Not sure if that makes much difference.

Regards,
Christian.

>
> 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);
>   
>   	}



More information about the igt-dev mailing list