]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/display: convert W/As in intel_ddi.c to new framework
authorLuca Coelho <luciano.coelho@intel.com>
Thu, 5 Mar 2026 09:59:09 +0000 (11:59 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 9 Mar 2026 10:32:47 +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-7-luciano.coelho@intel.com
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_display_wa.c
drivers/gpu/drm/i915/display/intel_display_wa.h

index 94ae583e907fea4929096e39aecc473673546ee6..7f1576bfe4b09f409fab6fe16449f0195e65c17a 100644 (file)
@@ -52,6 +52,7 @@
 #include "intel_display_regs.h"
 #include "intel_display_types.h"
 #include "intel_display_utils.h"
+#include "intel_display_wa.h"
 #include "intel_dkl_phy.h"
 #include "intel_dkl_phy_regs.h"
 #include "intel_dp.h"
@@ -1401,8 +1402,7 @@ static void tgl_dkl_phy_set_signal_levels(struct intel_encoder *encoder,
                int level;
 
                /* Wa_16011342517:adl-p */
-               if (display->platform.alderlake_p &&
-                   IS_DISPLAY_STEP(display, STEP_A0, STEP_D0)) {
+               if (intel_display_wa(display, INTEL_DISPLAY_WA_16011342517)) {
                        if ((intel_encoder_is_hdmi(encoder) &&
                             crtc_state->port_clock == 594000) ||
                             (intel_encoder_is_dp(encoder) &&
index 207129a167139220ab2678d848999d75ad34b4bd..e7243e4dba4f8a4480e4ebebe2c5e7e3d7617d0f 100644 (file)
@@ -99,6 +99,9 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
                return DISPLAY_VER(display) == 20;
        case INTEL_DISPLAY_WA_15018326506:
                return display->platform.battlemage;
+       case INTEL_DISPLAY_WA_16011342517:
+               return display->platform.alderlake_p &&
+                       IS_DISPLAY_STEP(display, STEP_A0, STEP_D0);
        case INTEL_DISPLAY_WA_16023588340:
                return intel_display_needs_wa_16023588340(display);
        case INTEL_DISPLAY_WA_16025573575:
index dff205b6492fda0b519cc29e269ac0a2ac313498..de0ed7698c613b422c17235547542b588228cc59 100644 (file)
@@ -38,6 +38,7 @@ enum intel_display_wa {
        INTEL_DISPLAY_WA_14025769978,
        INTEL_DISPLAY_WA_15013987218,
        INTEL_DISPLAY_WA_15018326506,
+       INTEL_DISPLAY_WA_16011342517,
        INTEL_DISPLAY_WA_16023588340,
        INTEL_DISPLAY_WA_16025573575,
        INTEL_DISPLAY_WA_22010178259,