Commit eb89e83c authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915: Simplify intel_panel_add_edid_alt_fixed_modes()



Since commit a5810f55 ("drm/i915: Allow more varied alternate
fixed modes for panels") intel_panel_add_edid_alt_fixed_modes()
no longer considers vrr vs. drrs separately. So no reason to
pass them as separate parameters either.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220927180615.25476-2-ville.syrjala@linux.intel.com


Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent abf46db3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5293,7 +5293,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
			      encoder->devdata, IS_ERR(edid) ? NULL : edid);

	intel_panel_add_edid_fixed_modes(intel_connector,
					 intel_connector->panel.vbt.drrs_type != DRRS_TYPE_NONE,
					 intel_connector->panel.vbt.drrs_type != DRRS_TYPE_NONE ||
					 intel_vrr_is_capable(intel_connector));

	/* MSO requires information from the EDID */
+1 −2
Original line number Diff line number Diff line
@@ -969,8 +969,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)

	/* Try EDID first */
	intel_panel_add_edid_fixed_modes(intel_connector,
					 intel_connector->panel.vbt.drrs_type != DRRS_TYPE_NONE,
					 false);
					 intel_connector->panel.vbt.drrs_type != DRRS_TYPE_NONE);

	/* Failed to get EDID, what about VBT? */
	if (!intel_panel_preferred_fixed_mode(intel_connector))
+2 −2
Original line number Diff line number Diff line
@@ -254,10 +254,10 @@ static void intel_panel_destroy_probed_modes(struct intel_connector *connector)
}

void intel_panel_add_edid_fixed_modes(struct intel_connector *connector,
				      bool has_drrs, bool has_vrr)
				      bool use_alt_fixed_modes)
{
	intel_panel_add_edid_preferred_mode(connector);
	if (intel_panel_preferred_fixed_mode(connector) && (has_drrs || has_vrr))
	if (intel_panel_preferred_fixed_mode(connector) && use_alt_fixed_modes)
		intel_panel_add_edid_alt_fixed_modes(connector);
	intel_panel_destroy_probed_modes(connector);
}
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ int intel_panel_fitting(struct intel_crtc_state *crtc_state,
int intel_panel_compute_config(struct intel_connector *connector,
			       struct drm_display_mode *adjusted_mode);
void intel_panel_add_edid_fixed_modes(struct intel_connector *connector,
				      bool has_drrs, bool has_vrr);
				      bool use_alt_fixed_modes);
void intel_panel_add_vbt_lfp_fixed_mode(struct intel_connector *connector);
void intel_panel_add_vbt_sdvo_fixed_mode(struct intel_connector *connector);
void intel_panel_add_encoder_fixed_mode(struct intel_connector *connector,
+1 −1
Original line number Diff line number Diff line
@@ -2910,7 +2910,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)

	if (!intel_panel_preferred_fixed_mode(intel_connector)) {
		intel_ddc_get_modes(connector, &intel_sdvo->ddc);
		intel_panel_add_edid_fixed_modes(intel_connector, false, false);
		intel_panel_add_edid_fixed_modes(intel_connector, false);
	}

	intel_panel_init(intel_connector);