[igt-dev] [PATCH i-g-t 2/2] lib/intel_chipset: Add flatccs flag for DG2

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Mon Feb 14 12:33:38 UTC 2022


FlatCCS is discrete DG2+ feature and is worth to add the flag which
enables it. Add HAS_FLATCCS() macro which should make conditional code
simpler and compact.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
---
 lib/intel_chipset.h     | 3 +++
 lib/intel_device_info.c | 1 +
 2 files changed, 4 insertions(+)

diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h
index 1396f105b..e27b9aab1 100644
--- a/lib/intel_chipset.h
+++ b/lib/intel_chipset.h
@@ -40,6 +40,7 @@ struct intel_device_info {
 	unsigned graphics_ver;
 	unsigned display_ver;
 	unsigned gt; /* 0 if unknown */
+	bool has_flatccs;
 	bool is_mobile : 1;
 	bool is_whitney : 1;
 	bool is_almador : 1;
@@ -215,4 +216,6 @@ void intel_check_pch(void);
 				   IS_CHERRYVIEW(devid) || \
 				   IS_BROXTON(devid)))
 
+#define HAS_FLATCCS(devid)	(intel_get_device_info(devid)->has_flatccs)
+
 #endif /* _INTEL_CHIPSET_H */
diff --git a/lib/intel_device_info.c b/lib/intel_device_info.c
index 4aabdafe0..9f1913679 100644
--- a/lib/intel_device_info.c
+++ b/lib/intel_device_info.c
@@ -395,6 +395,7 @@ static const struct intel_device_info intel_dg2_info = {
 	.display_ver = 13,
 	.is_dg2 = true,
 	.codename = "dg2",
+	.has_flatccs = true,
 };
 
 static const struct intel_device_info intel_alderlake_s_info = {
-- 
2.32.0



More information about the igt-dev mailing list