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

drm/i915: Move the TMDS clock division into intel_hdmi_mode_clock_valid()



Now that we have to tell intel_hdmi_mode_clock_valid() whether
we're asking about 4:4:4 or 4:2:0 output it can take care of
the dotclock->TMDS clock conversion.

Cc: Werner Sembach <wse@tuxedocomputers.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210511160532.21446-6-ville.syrjala@linux.intel.com


Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
parent d21d7a9d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1910,6 +1910,9 @@ intel_hdmi_mode_clock_valid(struct drm_connector *connector, int clock,
	struct intel_hdmi *hdmi = intel_attached_hdmi(to_intel_connector(connector));
	enum drm_mode_status status;

	if (ycbcr420_output)
		clock /= 2;

	/* check if we can do 8bpc */
	status = hdmi_port_clock_valid(hdmi, intel_hdmi_port_clock(clock, 8),
				       true, has_hdmi_sink);
@@ -1960,8 +1963,6 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
	}

	ycbcr_420_only = drm_mode_is_420_only(&connector->display_info, mode);
	if (ycbcr_420_only)
		clock /= 2;

	status = intel_hdmi_mode_clock_valid(connector, clock, has_hdmi_sink, ycbcr_420_only);
	if (status != MODE_OK) {
@@ -1970,7 +1971,6 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
		    !drm_mode_is_420_also(&connector->display_info, mode))
			return status;

		clock /= 2;
		status = intel_hdmi_mode_clock_valid(connector, clock, has_hdmi_sink, true);
		if (status != MODE_OK)
			return status;