Module: Mesa Branch: main Commit: abcef5a47691bea0a6a517302ac6441a1cae358b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=abcef5a47691bea0a6a517302ac6441a1cae358b
Author: Tapani Pälli <[email protected]> Date: Wed Feb 22 09:53:43 2023 +0200 intel/dev: provide helper to check if devinfo is ATS-M Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20784> --- include/pci_ids/iris_pci_ids.h | 4 ++-- src/intel/dev/intel_device_info.c | 10 ++++++++++ src/intel/dev/intel_device_info.h | 8 +++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/include/pci_ids/iris_pci_ids.h b/include/pci_ids/iris_pci_ids.h index 7b95cd87da3..6b778ad19da 100644 --- a/include/pci_ids/iris_pci_ids.h +++ b/include/pci_ids/iris_pci_ids.h @@ -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") diff --git a/src/intel/dev/intel_device_info.c b/src/intel/dev/intel_device_info.c index 9954ba81ec6..ec0d1731d93 100644 --- a/src/intel/dev/intel_device_info.c +++ b/src/intel/dev/intel_device_info.c @@ -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), \ diff --git a/src/intel/dev/intel_device_info.h b/src/intel/dev/intel_device_info.h index bf7be9a1ea2..e9969f09ede 100644 --- a/src/intel/dev/intel_device_info.h +++ b/src/intel/dev/intel_device_info.h @@ -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)
