drm/i915: Drop redundant has_hdmi_sink check
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 11 May 2021 16:05:32 +0000 (19:05 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 May 2021 14:56:39 +0000 (17:56 +0300)
intel_hdmi_bpc_possible() will check has_hdmi_sink for us, so no
need to check it in intel_hdmi_mode_clock_valid() anymore.

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-7-ville.syrjala@linux.intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
drivers/gpu/drm/i915/display/intel_hdmi.c

index 94cbe379fe633e71849793804f25c1dac0436e1f..7e51c98c475e9a10ac5c6854fa36a81f36de7bce 100644 (file)
@@ -1917,19 +1917,17 @@ intel_hdmi_mode_clock_valid(struct drm_connector *connector, int clock,
        status = hdmi_port_clock_valid(hdmi, intel_hdmi_port_clock(clock, 8),
                                       true, has_hdmi_sink);
 
-       if (has_hdmi_sink) {
-               /* if we can't do 8bpc we may still be able to do 12bpc */
-               if (status != MODE_OK &&
-                   intel_hdmi_bpc_possible(connector, 12, has_hdmi_sink, ycbcr420_output))
-                       status = hdmi_port_clock_valid(hdmi, intel_hdmi_port_clock(clock, 12),
-                                                      true, has_hdmi_sink);
-
-               /* if we can't do 8,12bpc we may still be able to do 10bpc */
-               if (status != MODE_OK &&
-                   intel_hdmi_bpc_possible(connector, 10, has_hdmi_sink, ycbcr420_output))
-                       status = hdmi_port_clock_valid(hdmi, intel_hdmi_port_clock(clock, 10),
-                                                      true, has_hdmi_sink);
-       }
+       /* if we can't do 8bpc we may still be able to do 12bpc */
+       if (status != MODE_OK &&
+           intel_hdmi_bpc_possible(connector, 12, has_hdmi_sink, ycbcr420_output))
+               status = hdmi_port_clock_valid(hdmi, intel_hdmi_port_clock(clock, 12),
+                                              true, has_hdmi_sink);
+
+       /* if we can't do 8,12bpc we may still be able to do 10bpc */
+       if (status != MODE_OK &&
+           intel_hdmi_bpc_possible(connector, 10, has_hdmi_sink, ycbcr420_output))
+               status = hdmi_port_clock_valid(hdmi, intel_hdmi_port_clock(clock, 10),
+                                              true, has_hdmi_sink);
 
        return status;
 }