[Intel-gfx] [PATCH 5/6] drm/i915: Move the TMDS clock division into intel_hdmi_mode_clock_valid()
Souza, Jose
jose.souza at intel.com
Fri May 14 17:44:25 UTC 2021
On Fri, 2021-05-14 at 20:36 +0300, Ville Syrjälä wrote:
> On Fri, May 14, 2021 at 05:28:40PM +0000, Souza, Jose wrote:
> > On Tue, 2021-05-11 at 19:05 +0300, Ville Syrjala wrote:
> > > 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;
> >
> > The clock intel_hdmi_mode_clock_valid() call will be clock/2 not clock/4 as previous.
>
> It's never clock/4.
Found the "if (ycbcr_420_only ||" that I missed.
Reviewed-by: José Roberto de Souza <jose.souza at intel.com>
>
More information about the Intel-gfx
mailing list