]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/display: convert W/As in skl_universal_plane.c to new framework
authorLuca Coelho <luciano.coelho@intel.com>
Thu, 5 Mar 2026 09:59:18 +0000 (11:59 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 9 Mar 2026 10:32:49 +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-16-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/skl_universal_plane.c

index 73c7b87d5ecd31775d1851c1ebd236f3ff93cf39..f05d96b4b35f92c2a8f6c606335504569e80125e 100644 (file)
@@ -79,6 +79,10 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
        case INTEL_DISPLAY_WA_13012396614:
                return DISPLAY_VERx100(display) == 3000 ||
                        DISPLAY_VERx100(display) == 3500;
+       case INTEL_DISPLAY_WA_14010477008:
+               return display->platform.dg1 || display->platform.rocketlake ||
+                       (display->platform.tigerlake &&
+                        IS_DISPLAY_STEP(display, STEP_A0, STEP_D0));
        case INTEL_DISPLAY_WA_14010480278:
                return (IS_DISPLAY_VER(display, 10, 12));
        case INTEL_DISPLAY_WA_14010547955:
index 0e9959760b9f1655a192b9f0539926da8cf401c6..1f664366847df0105cc1c51b4760aec15c814d73 100644 (file)
@@ -30,6 +30,7 @@ enum intel_display_wa {
        INTEL_DISPLAY_WA_1409120013,
        INTEL_DISPLAY_WA_1409767108,
        INTEL_DISPLAY_WA_13012396614,
+       INTEL_DISPLAY_WA_14010477008,
        INTEL_DISPLAY_WA_14010480278,
        INTEL_DISPLAY_WA_14010547955,
        INTEL_DISPLAY_WA_14010685332,
index 677f1339b7f8aebdf61ed16c08c25f1eb27cd62b..11ba42c67e3eda61cfee7603606422ac517241eb 100644 (file)
@@ -17,6 +17,7 @@
 #include "intel_display_regs.h"
 #include "intel_display_types.h"
 #include "intel_display_utils.h"
+#include "intel_display_wa.h"
 #include "intel_fb.h"
 #include "intel_fbc.h"
 #include "intel_frontbuffer.h"
@@ -1216,7 +1217,7 @@ static u32 skl_plane_ctl(const struct intel_plane_state *plane_state)
                plane_ctl |= PLANE_CTL_KEY_ENABLE_SOURCE;
 
        /* Wa_22012358565:adl-p */
-       if (DISPLAY_VER(display) == 13)
+       if (intel_display_wa(display, INTEL_DISPLAY_WA_22012358565))
                plane_ctl |= adlp_plane_ctl_arb_slots(plane_state);
 
        return plane_ctl;
@@ -2792,8 +2793,7 @@ static bool tgl_plane_has_mc_ccs(struct intel_display *display,
                                 enum plane_id plane_id)
 {
        /* Wa_14010477008 */
-       if (display->platform.dg1 || display->platform.rocketlake ||
-           (display->platform.tigerlake && IS_DISPLAY_STEP(display, STEP_A0, STEP_D0)))
+       if (intel_display_wa(display, INTEL_DISPLAY_WA_14010477008))
                return false;
 
        return plane_id < PLANE_6;