Commit ae4d74da authored by Luca Coelho's avatar Luca Coelho
Browse files

drm/i915/display: remove enum macro magic in intel_display_wa()



There's not much use in passing a number to the macro and let it
convert that into the enum and a string.  It just hides the symbols.

Remove the number to enum conversion magic in intel_display_wa().

This has the side-effect of changing the print in the drm_WARN() that
is issued when the number is not implemented, but that is moot anyway
and can be changed later to something cleaner if needed.

Reviewed-by: default avatarSuraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260305100100.332956-2-luciano.coelho@intel.com


Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 88442ba2
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1870,7 +1870,7 @@ static void icl_cdclk_pll_disable(struct intel_display *display)
	 *      after the PLL is enabled (which is already done as part of the
	 *      normal flow of _bxt_set_cdclk()).
	 */
	if (intel_display_wa(display, 13012396614))
	if (intel_display_wa(display, INTEL_DISPLAY_WA_13012396614))
		intel_de_rmw(display, CDCLK_CTL, MDCLK_SOURCE_SEL_MASK, MDCLK_SOURCE_SEL_CD2XCLK);

	intel_de_rmw(display, BXT_DE_PLL_ENABLE,
@@ -2186,7 +2186,8 @@ static u32 bxt_cdclk_ctl(struct intel_display *display,
		 * icl_cdclk_pll_disable().  Here we are just making sure
		 * we keep the expected value.
		 */
		if (intel_display_wa(display, 13012396614) && vco == 0)
		if (intel_display_wa(display, INTEL_DISPLAY_WA_13012396614) &&
		    vco == 0)
			val |= MDCLK_SOURCE_SEL_CD2XCLK;
		else
			val |= xe2lpd_mdclk_source_sel(display);
+1 −1
Original line number Diff line number Diff line
@@ -1070,7 +1070,7 @@ static void intel_post_plane_update(struct intel_atomic_state *state,
	if (audio_enabling(old_crtc_state, new_crtc_state))
		intel_encoders_audio_enable(state, crtc);

	if (intel_display_wa(display, 14011503117)) {
	if (intel_display_wa(display, INTEL_DISPLAY_WA_14011503117)) {
		if (old_crtc_state->pch_pfit.enabled != new_crtc_state->pch_pfit.enabled)
			adl_scaler_ecc_unmask(new_crtc_state);
	}
+2 −2
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ static void hsw_power_well_post_enable(struct intel_display *display,
	if (irq_pipe_mask) {
		gen8_irq_power_well_post_enable(display, irq_pipe_mask);

		if (intel_display_wa(display, 22021048059))
		if (intel_display_wa(display, INTEL_DISPLAY_WA_22021048059))
			dss_pipe_gating_enable_disable(display, irq_pipe_mask, false);
	}
}
@@ -258,7 +258,7 @@ static void hsw_power_well_pre_disable(struct intel_display *display,
				       u8 irq_pipe_mask)
{
	if (irq_pipe_mask) {
		if (intel_display_wa(display, 22021048059))
		if (intel_display_wa(display, INTEL_DISPLAY_WA_22021048059))
			dss_pipe_gating_enable_disable(display, irq_pipe_mask, true);

		gen8_irq_power_well_pre_disable(display, irq_pipe_mask);
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
	case INTEL_DISPLAY_WA_22021048059:
		return IS_DISPLAY_VER(display, 14, 35);
	default:
		drm_WARN(display->drm, 1, "Missing Wa number: %s\n", name);
		drm_WARN(display->drm, 1, "Missing Wa: %s\n", name);
		break;
	}

+1 −1
Original line number Diff line number Diff line
@@ -40,6 +40,6 @@ enum intel_display_wa {
bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa, const char *name);

#define intel_display_wa(__display, __wa) \
	__intel_display_wa((__display), INTEL_DISPLAY_WA_##__wa, __stringify(__wa))
	__intel_display_wa((__display), __wa, __stringify(__wa))

#endif
Loading