On Tue, 2021-05-11 at 19:05 +0300, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > intel_hdmi_bpc_possible() will check has_hdmi_sink for us, so no > need to check it in intel_hdmi_mode_clock_valid() anymore. Reviewed-by: José Roberto de Souza <jose.souza@xxxxxxxxx> > > Cc: Werner Sembach <wse@xxxxxxxxxxxxxxxxxxx> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_hdmi.c | 22 ++++++++++------------ > 1 file changed, 10 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c > index 80e2ae652f6e..7e48897bbac0 100644 > --- a/drivers/gpu/drm/i915/display/intel_hdmi.c > +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c > @@ -1914,19 +1914,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 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 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; > } _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx