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

index 0f449ea8e1bb78106086c3dd910be4a40c44aa4c..81be1e875c07c91e0f6bd37813a4b8ce69ee5f00 100644 (file)
@@ -117,6 +117,10 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
                return intel_display_needs_wa_16023588340(display);
        case INTEL_DISPLAY_WA_16025573575:
                return intel_display_needs_wa_16025573575(display);
+       case INTEL_DISPLAY_WA_18034343758:
+               return DISPLAY_VER(display) == 20 ||
+                       (display->platform.pantherlake &&
+                        IS_DISPLAY_STEP(display, STEP_A0, STEP_B0));
        case INTEL_DISPLAY_WA_22010178259:
                return DISPLAY_VER(display) == 12;
        case INTEL_DISPLAY_WA_22011320316:
index 373cbbb93873d2391b13cebf9119fca6eb3a4129..68d67b9b0263e1911909917c7487ed46154015ce 100644 (file)
@@ -46,6 +46,7 @@ enum intel_display_wa {
        INTEL_DISPLAY_WA_16011863758,
        INTEL_DISPLAY_WA_16023588340,
        INTEL_DISPLAY_WA_16025573575,
+       INTEL_DISPLAY_WA_18034343758,
        INTEL_DISPLAY_WA_22010178259,
        INTEL_DISPLAY_WA_22011320316,
        INTEL_DISPLAY_WA_22012358565,
index 1e9550cb66a3acf102c7472b833a4cadb074fdfb..253dc2e96d2d65da12b3fb8f1e8bb7673265d468 100644 (file)
@@ -12,6 +12,7 @@
 #include "intel_display_core.h"
 #include "intel_display_types.h"
 #include "intel_display_utils.h"
+#include "intel_display_wa.h"
 #include "intel_dmc.h"
 #include "intel_dmc_regs.h"
 #include "intel_dsb.h"
@@ -447,19 +448,11 @@ void intel_flipq_add(struct intel_crtc *crtc,
        intel_flipq_sw_dmc_wake(crtc);
 }
 
-/* Wa_18034343758 */
-static bool need_dmc_halt_wa(struct intel_display *display)
-{
-       return DISPLAY_VER(display) == 20 ||
-               (display->platform.pantherlake &&
-                IS_DISPLAY_STEP(display, STEP_A0, STEP_B0));
-}
-
 void intel_flipq_wait_dmc_halt(struct intel_dsb *dsb, struct intel_crtc *crtc)
 {
        struct intel_display *display = to_intel_display(crtc);
 
-       if (need_dmc_halt_wa(display))
+       if (intel_display_wa(display, INTEL_DISPLAY_WA_18034343758))
                intel_dsb_wait_usec(dsb, 2);
 }
 
@@ -467,6 +460,6 @@ void intel_flipq_unhalt_dmc(struct intel_dsb *dsb, struct intel_crtc *crtc)
 {
        struct intel_display *display = to_intel_display(crtc);
 
-       if (need_dmc_halt_wa(display))
+       if (intel_display_wa(display, INTEL_DISPLAY_WA_18034343758))
                intel_dsb_reg_write(dsb, PIPEDMC_CTL(crtc->pipe), 0);
 }