]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/display: convert W/As in intel_cursor.c to new framework
authorLuca Coelho <luciano.coelho@intel.com>
Thu, 5 Mar 2026 09:59:08 +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-6-luciano.coelho@intel.com
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/gpu/drm/i915/display/intel_cursor.c
drivers/gpu/drm/i915/display/intel_display_wa.c
drivers/gpu/drm/i915/display/intel_display_wa.h

index 2c5d917fbd7e98111508b06d3074afae478b8f86..18d1014de3613ae6d06ff49bf35a24f371c4e203 100644 (file)
@@ -19,6 +19,7 @@
 #include "intel_display.h"
 #include "intel_display_types.h"
 #include "intel_display_utils.h"
+#include "intel_display_wa.h"
 #include "intel_fb.h"
 #include "intel_fb_pin.h"
 #include "intel_frontbuffer.h"
@@ -424,7 +425,7 @@ static u32 i9xx_cursor_ctl(const struct intel_plane_state *plane_state)
                cntl |= MCURSOR_ROTATE_180;
 
        /* Wa_22012358565:adl-p */
-       if (DISPLAY_VER(display) == 13)
+       if (intel_display_wa(display, INTEL_DISPLAY_WA_22012358565))
                cntl |= MCURSOR_ARB_SLOTS(1);
 
        return cntl;
index aef6eca511190f0f6fe840ff349b9f7153f4dca0..207129a167139220ab2678d848999d75ad34b4bd 100644 (file)
@@ -85,6 +85,7 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
                        INTEL_PCH_TYPE(display) < PCH_DG1;
        case INTEL_DISPLAY_WA_14011503030:
        case INTEL_DISPLAY_WA_14011503117:
+       case INTEL_DISPLAY_WA_22012358565:
                return DISPLAY_VER(display) == 13;
        case INTEL_DISPLAY_WA_14011508470:
                return (IS_DISPLAY_VERx100(display, 1200, 1300));
index aa96d111111c066ebea148170a60bb0a467d9a97..dff205b6492fda0b519cc29e269ac0a2ac313498 100644 (file)
@@ -42,6 +42,7 @@ enum intel_display_wa {
        INTEL_DISPLAY_WA_16025573575,
        INTEL_DISPLAY_WA_22010178259,
        INTEL_DISPLAY_WA_22011320316,
+       INTEL_DISPLAY_WA_22012358565,
        INTEL_DISPLAY_WA_22014263786,
        INTEL_DISPLAY_WA_22021048059,
 };