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

index 15edf609fff4034f66d2bed7af4dce7ccb09bb28..b18ce0c36a6497d0e4a271ad6077a1508a98d42d 100644 (file)
@@ -453,7 +453,7 @@ void intel_enable_transcoder(const struct intel_crtc_state *new_crtc_state)
        }
 
        /* Wa_22012358565:adl-p */
-       if (DISPLAY_VER(display) == 13)
+       if (intel_display_wa(display, INTEL_DISPLAY_WA_22012358565))
                intel_de_rmw(display, PIPE_ARB_CTL(display, pipe),
                             0, PIPE_ARB_USE_PROG_SLOTS);
 
@@ -707,7 +707,7 @@ static void icl_set_pipe_chicken(const struct intel_crtc_state *crtc_state)
                tmp |= UNDERRUN_RECOVERY_DISABLE_ADLP;
 
        /* Wa_14010547955:dg2 */
-       if (display->platform.dg2)
+       if (intel_display_wa(display, INTEL_DISPLAY_WA_14010547955))
                tmp |= DG2_RENDER_CCSTAG_4_3_EN;
 
        intel_de_write(display, PIPE_CHICKEN(pipe), tmp);
index e7243e4dba4f8a4480e4ebebe2c5e7e3d7617d0f..f51e5a86164b9711e6c8c96add5244273b1571ee 100644 (file)
@@ -77,6 +77,8 @@ 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_14010547955:
+               return display->platform.dg2;
        case INTEL_DISPLAY_WA_14010685332:
                return INTEL_PCH_TYPE(display) >= PCH_CNP &&
                        INTEL_PCH_TYPE(display) < PCH_DG1;
index de0ed7698c613b422c17235547542b588228cc59..a9346e7631128ea873118cf1a5e4e92b015ebd36 100644 (file)
@@ -29,6 +29,7 @@ bool intel_display_needs_wa_16023588340(struct intel_display *display);
 enum intel_display_wa {
        INTEL_DISPLAY_WA_1409767108,
        INTEL_DISPLAY_WA_13012396614,
+       INTEL_DISPLAY_WA_14010547955,
        INTEL_DISPLAY_WA_14010685332,
        INTEL_DISPLAY_WA_14011294188,
        INTEL_DISPLAY_WA_14011503030,