[igt-dev] [PATCH i-g-t 1/2] lib/intel_chipset: Add IS_PONTEVECCHIO() macro

Niranjana Vishwanathapura niranjana.vishwanathapura at intel.com
Wed Mar 29 04:58:54 UTC 2023


Add IS_PONTEVECCHIO() macro based on version check.

Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>
---
 lib/intel_chipset.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h
index c2c8998dd..21ddb0169 100644
--- a/lib/intel_chipset.h
+++ b/lib/intel_chipset.h
@@ -203,6 +203,7 @@ void intel_check_pch(void);
 #define IS_METEORLAKE(devid)	(intel_get_device_info(devid)->is_meteorlake)
 
 #define IS_GEN(devid, x)	(intel_get_device_info(devid)->graphics_ver == x)
+#define IS_GEN_VER(devid, x, y)	(intel_graphics_ver(devid) == IP_VER(x, y))
 #define AT_LEAST_GEN(devid, x)	(intel_get_device_info(devid)->graphics_ver >= x)
 
 #define IS_GEN2(devid)		IS_GEN(devid, 2)
@@ -217,6 +218,8 @@ void intel_check_pch(void);
 #define IS_GEN11(devid)		IS_GEN(devid, 11)
 #define IS_GEN12(devid)		IS_GEN(devid, 12)
 
+#define IS_PONTEVECCHIO(devid)	IS_GEN_VER(devid, 12, 60)
+
 #define IS_MOBILE(devid)	(intel_get_device_info(devid)->is_mobile)
 #define IS_965(devid)		AT_LEAST_GEN(devid, 4)
 
-- 
2.21.0.rc0.32.g243a4c7e27



More information about the igt-dev mailing list