tests/amdgpu: enable jpeg test based on ip query
authorSathishkumar S <sathishkumar.sundararaju@amd.com>
Thu, 10 Feb 2022 12:20:57 +0000 (17:50 +0530)
committerLeo Liu <leo.liu@amd.com>
Sat, 19 Feb 2022 23:09:53 +0000 (18:09 -0500)
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>
tests/amdgpu/jpeg_tests.c

index 5e50bef..772a4fe 100644 (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;