tests/amdgpu: enable jpeg test based on ip query

enable jpeg test if ip query is successful and avoid family_id
based checks, instead use ip major/minor version

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
main
Sathishkumar S 2022-02-10 17:50:57 +05:30 committed by Leo Liu
parent 56f81e6776
commit 1d92f32741
1 changed files with 3 additions and 6 deletions

View File

@ -179,12 +179,9 @@ CU_BOOL suite_jpeg_tests_enable(void)
return CU_FALSE;
}
if (family_id == AMDGPU_FAMILY_RV) {
if (chip_id >= (chip_rev + 0x91))
jpeg_direct_reg = true;
else
jpeg_direct_reg = false;
} else if (family_id == AMDGPU_FAMILY_NV)
if (info.hw_ip_version_major == 1)
jpeg_direct_reg = false;
else if (info.hw_ip_version_major > 1 && info.hw_ip_version_major <= 3)
jpeg_direct_reg = true;
else
return CU_FALSE;