]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/display: convert W/As in intel_cdclk.c to new framework
authorLuca Coelho <luciano.coelho@intel.com>
Thu, 5 Mar 2026 09:59:07 +0000 (11:59 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 9 Mar 2026 10:32:46 +0000 (12:32 +0200)
Convert the low-hanging fruits of workaround checks to the workaround
framework.  Instead of having display structure checks for the
workarounds all over, concentrate the checks in intel_display_wa.c.

Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260305100100.332956-5-luciano.coelho@intel.com
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/gpu/drm/i915/display/intel_cdclk.c
drivers/gpu/drm/i915/display/intel_display_wa.c
drivers/gpu/drm/i915/display/intel_display_wa.h

index 7767f8c198da684bb80d2aa505e0b6017e974d71..121a12c5b8ac2be615c83a6cbddf46eb4ec36242 100644 (file)
@@ -4007,7 +4007,7 @@ void intel_init_cdclk_hooks(struct intel_display *display)
                display->cdclk.table = dg2_cdclk_table;
        } else if (display->platform.alderlake_p) {
                /* Wa_22011320316:adl-p[a0] */
-               if (display->platform.alderlake_p && IS_DISPLAY_STEP(display, STEP_A0, STEP_B0)) {
+               if (intel_display_wa(display, INTEL_DISPLAY_WA_22011320316)) {
                        display->cdclk.table = adlp_a_step_cdclk_table;
                        display->funcs.cdclk = &tgl_cdclk_funcs;
                } else if (display->platform.alderlake_p_raptorlake_u) {
index 011749b680e8c95f638c61c0bee47910ecbb289b..aef6eca511190f0f6fe840ff349b9f7153f4dca0 100644 (file)
@@ -104,6 +104,9 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
                return intel_display_needs_wa_16025573575(display);
        case INTEL_DISPLAY_WA_22010178259:
                return DISPLAY_VER(display) == 12;
+       case INTEL_DISPLAY_WA_22011320316:
+               return display->platform.alderlake_p &&
+                       IS_DISPLAY_STEP(display, STEP_A0, STEP_B0);
        case INTEL_DISPLAY_WA_22014263786:
                return IS_DISPLAY_VERx100(display, 1100, 1400);
        case INTEL_DISPLAY_WA_22021048059:
index 380cb64cf7749f2c06c68262a831042570d6af61..aa96d111111c066ebea148170a60bb0a467d9a97 100644 (file)
@@ -41,6 +41,7 @@ enum intel_display_wa {
        INTEL_DISPLAY_WA_16023588340,
        INTEL_DISPLAY_WA_16025573575,
        INTEL_DISPLAY_WA_22010178259,
+       INTEL_DISPLAY_WA_22011320316,
        INTEL_DISPLAY_WA_22014263786,
        INTEL_DISPLAY_WA_22021048059,
 };