From 1d92f327411308dbc98502b8e64a5f3f3bc42f2a Mon Sep 17 00:00:00 2001 From: Sathishkumar S Date: Thu, 10 Feb 2022 17:50:57 +0530 Subject: [PATCH] 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 Reviewed-by: Veerabadhran Gopalakrishnan Reviewed-by: Leo Liu --- tests/amdgpu/jpeg_tests.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/amdgpu/jpeg_tests.c b/tests/amdgpu/jpeg_tests.c index 5e50bef..772a4fe 100644 --- a/tests/amdgpu/jpeg_tests.c +++ b/tests/amdgpu/jpeg_tests.c @@ -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; -- 2.7.4