Commit 7850730c authored by Luca Coelho's avatar Luca Coelho
Browse files

drm/i915/display: convert W/As in intel_display.c to new framework



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: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarSuraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260305100100.332956-8-luciano.coelho@intel.com


Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent cc81de74
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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,