tests/amdgpu: disable VCN test if no VCN ring available(v2)
If KMD has no VCN support, remove the VCN test. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Tianci.Yin <tianci.yin@amd.com>main
parent
3ec26b03ee
commit
3e9f211303
|
@ -94,6 +94,8 @@ CU_TestInfo vcn_tests[] = {
|
||||||
|
|
||||||
CU_BOOL suite_vcn_tests_enable(void)
|
CU_BOOL suite_vcn_tests_enable(void)
|
||||||
{
|
{
|
||||||
|
struct drm_amdgpu_info_hw_ip info;
|
||||||
|
int r;
|
||||||
|
|
||||||
if (amdgpu_device_initialize(drm_amdgpu[0], &major_version,
|
if (amdgpu_device_initialize(drm_amdgpu[0], &major_version,
|
||||||
&minor_version, &device_handle))
|
&minor_version, &device_handle))
|
||||||
|
@ -106,13 +108,15 @@ CU_BOOL suite_vcn_tests_enable(void)
|
||||||
chip_rev = device_handle->info.chip_rev;
|
chip_rev = device_handle->info.chip_rev;
|
||||||
chip_id = device_handle->info.chip_external_rev;
|
chip_id = device_handle->info.chip_external_rev;
|
||||||
|
|
||||||
|
r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_VCN_DEC, 0, &info);
|
||||||
|
|
||||||
if (amdgpu_device_deinitialize(device_handle))
|
if (amdgpu_device_deinitialize(device_handle))
|
||||||
return CU_FALSE;
|
return CU_FALSE;
|
||||||
|
|
||||||
|
if (r != 0 || !info.available_rings ||
|
||||||
if (family_id < AMDGPU_FAMILY_RV &&
|
(family_id < AMDGPU_FAMILY_RV &&
|
||||||
(family_id == AMDGPU_FAMILY_AI &&
|
(family_id == AMDGPU_FAMILY_AI &&
|
||||||
chip_id != (chip_rev + 0x32))) { /* Arcturus */
|
chip_id != (chip_rev + 0x32)))) { /* Arcturus */
|
||||||
printf("\n\nThe ASIC NOT support VCN, suite disabled\n");
|
printf("\n\nThe ASIC NOT support VCN, suite disabled\n");
|
||||||
return CU_FALSE;
|
return CU_FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue