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

drm/i915: Nuke lspcon_ycbcr420_config()



Remove the lspcon special case from intel_dp_compute_config() and
just treat it like any other DFP than can do 4:4:4->4:2:0 conversion.

The only difference between the two codepaths was that the lspcon
code tried to already halve port_clock. That was just total nonsense
as we hadn't even computed the base port_clock at that time.
All that stuff happens intel_dp_compute_link_config*() and it
already takes care of the 4:2:0 clock reduction.

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


Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
parent 06fa3284
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -2694,7 +2694,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
	struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
	struct intel_lspcon *lspcon = enc_to_intel_lspcon(encoder);
	enum port port = encoder->port;
	struct intel_connector *intel_connector = intel_dp->attached_connector;
	struct intel_digital_connector_state *intel_conn_state =
@@ -2708,9 +2707,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,

	pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;

	if (lspcon->active)
		lspcon_ycbcr420_config(&intel_connector->base, pipe_config);
	else
	ret = intel_dp_ycbcr420_config(pipe_config, conn_state);
	if (ret)
		return ret;
@@ -6414,7 +6410,9 @@ intel_dp_update_420(struct intel_dp *intel_dp)
	ycbcr_420_passthrough =
		drm_dp_downstream_420_passthrough(intel_dp->dpcd,
						  intel_dp->downstream_ports);
	/* on-board LSPCON always assumed to support 4:4:4->4:2:0 conversion */
	ycbcr_444_to_420 =
		dp_to_dig_port(intel_dp)->lspcon.active ||
		drm_dp_downstream_444_to_420_conversion(intel_dp->dpcd,
							intel_dp->downstream_ports);

+0 −14
Original line number Diff line number Diff line
@@ -184,20 +184,6 @@ static bool lspcon_wake_native_aux_ch(struct intel_lspcon *lspcon)
	return true;
}

void lspcon_ycbcr420_config(struct drm_connector *connector,
			    struct intel_crtc_state *crtc_state)
{
	const struct drm_display_info *info = &connector->display_info;
	const struct drm_display_mode *adjusted_mode =
					&crtc_state->hw.adjusted_mode;

	if (drm_mode_is_420_only(info, adjusted_mode) &&
	    connector->ycbcr_420_allowed) {
		crtc_state->port_clock /= 2;
		crtc_state->output_format = INTEL_OUTPUT_FORMAT_YCBCR444;
	}
}

static bool lspcon_probe(struct intel_lspcon *lspcon)
{
	int retry;
+0 −2
Original line number Diff line number Diff line
@@ -31,7 +31,5 @@ void lspcon_set_infoframes(struct intel_encoder *encoder,
			   const struct drm_connector_state *conn_state);
u32 lspcon_infoframes_enabled(struct intel_encoder *encoder,
			      const struct intel_crtc_state *pipe_config);
void lspcon_ycbcr420_config(struct drm_connector *connector,
			    struct intel_crtc_state *crtc_state);

#endif /* __INTEL_LSPCON_H__ */