]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Move the TMDS clock division into intel_hdmi_mode_clock_valid()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 11 May 2021 16:05:31 +0000 (19:05 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 May 2021 14:56:30 +0000 (17:56 +0300)
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: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210511160532.21446-6-ville.syrjala@linux.intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
drivers/gpu/drm/i915/display/intel_hdmi.c

index aa8198b3abe2e0bba685abd547dfa26ac125b8e7..94cbe379fe633e71849793804f25c1dac0436e1f 100644 (file)
@@ -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;