intel/dev: provide helper to check if devinfo is ATS-M
authorTapani Pälli <tapani.palli@intel.com>
Wed, 22 Feb 2023 07:53:43 +0000 (09:53 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 24 May 2023 04:42:59 +0000 (04:42 +0000)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20784>

include/pci_ids/iris_pci_ids.h
src/intel/dev/intel_device_info.c
src/intel/dev/intel_device_info.h

index 7b95cd8..6b778ad 100644 (file)
@@ -241,8 +241,8 @@ CHIPSET(0x56b0, dg2_g11, "DG2", "Intel(R) Arc(tm) Pro A30M Graphics")
 CHIPSET(0x56b1, dg2_g11, "DG2", "Intel(R) Arc(tm) Pro A40/A50 Graphics")
 CHIPSET(0x56b2, dg2_g12, "DG2", "Intel(R) Graphics")
 CHIPSET(0x56b3, dg2_g12, "DG2", "Intel(R) Graphics")
-CHIPSET(0x56c0, dg2_g10, "ATS-M", "Intel(R) Data Center GPU Flex Series 170 Graphics")
-CHIPSET(0x56c1, dg2_g11, "ATS-M", "Intel(R) Data Center GPU Flex Series 140 Graphics")
+CHIPSET(0x56c0, atsm_g10, "ATS-M", "Intel(R) Data Center GPU Flex Series 170 Graphics")
+CHIPSET(0x56c1, atsm_g11, "ATS-M", "Intel(R) Data Center GPU Flex Series 140 Graphics")
 
 CHIPSET(0x7d40, mtl_m, "MTL", "Intel(R) Graphics")
 CHIPSET(0x7d45, mtl_p, "MTL", "Intel(R) Graphics")
index 9954ba8..ec0d173 100644 (file)
@@ -1113,6 +1113,16 @@ static const struct intel_device_info intel_device_info_dg2_g12 = {
    .platform = INTEL_PLATFORM_DG2_G12,
 };
 
+static const struct intel_device_info intel_device_info_atsm_g10 = {
+   DG2_FEATURES,
+   .platform = INTEL_PLATFORM_ATSM_G10,
+};
+
+static const struct intel_device_info intel_device_info_atsm_g11 = {
+   DG2_FEATURES,
+   .platform = INTEL_PLATFORM_ATSM_G11,
+};
+
 #define MTL_FEATURES                                            \
    /* (Sub)slice info comes from the kernel topology info */    \
    XEHP_FEATURES(0, 1, 0),                                      \
index bf7be9a..e9969f0 100644 (file)
@@ -77,6 +77,8 @@ enum intel_platform {
    INTEL_PLATFORM_GROUP_START(DG2, INTEL_PLATFORM_DG2_G10),
    INTEL_PLATFORM_DG2_G11,
    INTEL_PLATFORM_GROUP_END(DG2, INTEL_PLATFORM_DG2_G12),
+   INTEL_PLATFORM_GROUP_START(ATSM, INTEL_PLATFORM_ATSM_G10),
+   INTEL_PLATFORM_GROUP_END(ATSM, INTEL_PLATFORM_ATSM_G11),
    INTEL_PLATFORM_GROUP_START(MTL, INTEL_PLATFORM_MTL_M),
    INTEL_PLATFORM_GROUP_END(MTL, INTEL_PLATFORM_MTL_P),
 };
@@ -88,8 +90,12 @@ enum intel_platform {
    (((platform) >= INTEL_PLATFORM_ ## platform_range ## _START) && \
     ((platform) <= INTEL_PLATFORM_ ## platform_range ## _END))
 
+#define intel_device_info_is_atsm(devinfo) \
+   intel_platform_in_range((devinfo)->platform, ATSM)
+
 #define intel_device_info_is_dg2(devinfo) \
-   intel_platform_in_range((devinfo)->platform, DG2)
+   (intel_platform_in_range((devinfo)->platform, DG2) || \
+    intel_platform_in_range((devinfo)->platform, ATSM))
 
 #define intel_device_info_is_mtl(devinfo) \
    intel_platform_in_range((devinfo)->platform, MTL)