[Intel-gfx] [PATCH 5/6] drm/i915: Move the TMDS clock division into intel_hdmi_mode_clock_valid()

Ville Syrjala ville.syrjala at linux.intel.com
Tue May 11 16:05:31 UTC 2021


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

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 at tuxedocomputers.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 874fb897005a..80e2ae652f6e 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1907,6 +1907,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);
@@ -1957,8 +1960,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) {
@@ -1967,7 +1968,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;
-- 
2.26.3



More information about the Intel-gfx mailing list