]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/display: switch to display detected steppings
authorJani Nikula <jani.nikula@intel.com>
Tue, 20 Aug 2024 19:00:41 +0000 (22:00 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 22 Aug 2024 12:48:13 +0000 (15:48 +0300)
Move the stepping related macros over to display. We can proceed to
remove the compat macros from xe.

Note: Looks like we've failed to actually initialize the display
stepping for GMD ID based platforms in the xe driver. It does get set in
display runtime info, but until now the compat macro used
xe->info.step.display which was not set for GMD ID.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ce8bb94e1a801d3c345f1810837bdd1964c3af75.1724180287.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display_device.c
drivers/gpu/drm/i915/display/intel_display_device.h
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_device_info.c
drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h

index dfa92367249232cb92b60ebee93ddc3bdf9e1f75..1b46ba9855809995d8529f69b0f6f300b9ff5af4 100644 (file)
@@ -1715,6 +1715,8 @@ void intel_display_device_info_print(const struct intel_display_device_info *inf
                drm_printf(p, "display version: %u\n",
                           runtime->ip.ver);
 
+       drm_printf(p, "display stepping: %s\n", intel_step_name(runtime->step));
+
 #define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name, str_yes_no(info->name))
        DEV_INFO_DISPLAY_FOR_EACH_FLAG(PRINT_FLAG);
 #undef PRINT_FLAG
index 4615c3ba60aa81dede255c743f3fcd2d650e99f4..dfb0c8bf5ca25f2f1c33b25153289a2d2423a858 100644 (file)
@@ -194,6 +194,12 @@ enum intel_display_subplatform {
 #define IS_DISPLAY_VER(i915, from, until) \
        (DISPLAY_VER(i915) >= (from) && DISPLAY_VER(i915) <= (until))
 
+#define INTEL_DISPLAY_STEP(__i915) (DISPLAY_RUNTIME_INFO(__i915)->step)
+
+#define IS_DISPLAY_STEP(__i915, since, until) \
+       (drm_WARN_ON(__to_intel_display(__i915)->drm, INTEL_DISPLAY_STEP(__i915) == STEP_NONE), \
+        INTEL_DISPLAY_STEP(__i915) >= (since) && INTEL_DISPLAY_STEP(__i915) < (until))
+
 struct intel_display_runtime_info {
        enum intel_display_platform platform;
        enum intel_display_subplatform subplatform;
index 94f7f6cc444ceb7f38510758f55e4359aef65a22..3b1b16e71cf925f2a0c271f370a1e51cd85297e6 100644 (file)
@@ -408,15 +408,10 @@ static inline struct intel_gt *to_gt(const struct drm_i915_private *i915)
 
 #define INTEL_REVID(i915)      (to_pci_dev((i915)->drm.dev)->revision)
 
-#define INTEL_DISPLAY_STEP(__i915) (RUNTIME_INFO(__i915)->step.display_step)
 #define INTEL_GRAPHICS_STEP(__i915) (RUNTIME_INFO(__i915)->step.graphics_step)
 #define INTEL_MEDIA_STEP(__i915) (RUNTIME_INFO(__i915)->step.media_step)
 #define INTEL_BASEDIE_STEP(__i915) (RUNTIME_INFO(__i915)->step.basedie_step)
 
-#define IS_DISPLAY_STEP(__i915, since, until) \
-       (drm_WARN_ON(&(__i915)->drm, INTEL_DISPLAY_STEP(__i915) == STEP_NONE), \
-        INTEL_DISPLAY_STEP(__i915) >= (since) && INTEL_DISPLAY_STEP(__i915) < (until))
-
 #define IS_GRAPHICS_STEP(__i915, since, until) \
        (drm_WARN_ON(&(__i915)->drm, INTEL_GRAPHICS_STEP(__i915) == STEP_NONE), \
         INTEL_GRAPHICS_STEP(__i915) >= (since) && INTEL_GRAPHICS_STEP(__i915) < (until))
index 91acbf99574c32106f7e6c97a5f46f76bcd06d17..d92b3050ac78bf9a994398e6dc2b9609f093e5a5 100644 (file)
@@ -108,7 +108,6 @@ void intel_device_info_print(const struct intel_device_info *info,
 
        drm_printf(p, "graphics stepping: %s\n", intel_step_name(runtime->step.graphics_step));
        drm_printf(p, "media stepping: %s\n", intel_step_name(runtime->step.media_step));
-       drm_printf(p, "display stepping: %s\n", intel_step_name(runtime->step.display_step));
        drm_printf(p, "base die stepping: %s\n", intel_step_name(runtime->step.basedie_step));
 
        drm_printf(p, "gt: %d\n", info->gt);
index cd2cb9c749812bb7c6bdf9156d2340c50328c96a..b7b12b20e390abd0a69c57a8f5554ec3f9a26f49 100644 (file)
@@ -80,11 +80,6 @@ static inline struct drm_i915_private *kdev_to_i915(struct device *kdev)
 
 #define IS_MOBILE(xe) (xe && 0)
 
-#define INTEL_DISPLAY_STEP(xe) ((xe)->info.step.display)
-
-/* Workarounds not handled yet */
-#define IS_DISPLAY_STEP(xe, first, last) ({u8 __step = (xe)->info.step.display; first <= __step && __step < last; })
-
 #define IS_LP(xe) (0)
 #define IS_GEN9_LP(xe) (0)
 #define IS_GEN9_BC(xe) (0)