Module: Mesa
Branch: main
Commit: 2833d1ade1421cce52351fd5f2d6908cc4bc14e9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2833d1ade1421cce52351fd5f2d6908cc4bc14e9

Author: Tapani Pälli <tapani.pa...@intel.com>
Date:   Fri Oct 27 08:44:40 2023 +0300

intel/dev: fix intel_device_info_is_adln check

We cannot compare pointer, patch adds is_adl_n to devinfo for detection.

Fixes: 3cf71ddfac6 ("intel/dev: provide intel_device_info_is_adln helper")
Signed-off-by: Tapani Pälli <tapani.pa...@intel.com>
Reviewed-by: Rohan Garg <rohan.g...@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25934>

---

 src/intel/dev/intel_device_info.c | 7 +------
 src/intel/dev/intel_device_info.h | 9 +++++++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/intel/dev/intel_device_info.c 
b/src/intel/dev/intel_device_info.c
index 7eadc84d6d1..ea102a90a0a 100644
--- a/src/intel/dev/intel_device_info.c
+++ b/src/intel/dev/intel_device_info.c
@@ -1009,6 +1009,7 @@ static const struct intel_device_info 
intel_device_info_adl_n = {
    GFX12_GT_FEATURES(1),
    .platform = INTEL_PLATFORM_ADL,
    .display_ver = 13,
+   .is_adl_n = true,
 };
 
 static const struct intel_device_info intel_device_info_adl_gt2 = {
@@ -1151,12 +1152,6 @@ static const struct intel_device_info 
intel_device_info_mtl_p = {
    .platform = INTEL_PLATFORM_MTL_P,
 };
 
-bool
-intel_device_info_is_adln(const struct intel_device_info *devinfo)
-{
-   return devinfo == &intel_device_info_adl_n;
-}
-
 void
 intel_device_info_topology_reset_masks(struct intel_device_info *devinfo)
 {
diff --git a/src/intel/dev/intel_device_info.h 
b/src/intel/dev/intel_device_info.h
index 4e934d18297..19f220a2a9e 100644
--- a/src/intel/dev/intel_device_info.h
+++ b/src/intel/dev/intel_device_info.h
@@ -101,8 +101,8 @@ enum intel_platform {
 #define intel_device_info_is_mtl(devinfo) \
    intel_platform_in_range((devinfo)->platform, MTL)
 
-bool
-intel_device_info_is_adln(const struct intel_device_info *devinfo);
+#define intel_device_info_is_adln(devinfo) \
+   (devinfo->is_adl_n == true)
 
 struct intel_memory_class_instance {
    /* Kernel backend specific class value, no translation needed yet */
@@ -204,6 +204,11 @@ struct intel_device_info
     * fragment shader instructions.
     */
    bool needs_unlit_centroid_workaround;
+
+   /**
+    * We need this for ADL-N specific Wa_14014966230.
+    */
+   bool is_adl_n;
    /** @} */
 
    /**

Reply via email to