Hi Thomas, On Mon, Apr 12, 2021 at 11:44:05AM +0200, Thomas Zimmermann wrote: > > > Am 17.03.21 um 16:43 schrieb Maxime Ripard: > > We're going to need to tell whether we want to run with a full or > > limited range RGB output in multiple places in the code, so let's create > > a helper that will return whether we need with full range or not. > > > > Signed-off-by: Maxime Ripard > > Acked-by: Thomas Zimmermann > > although with a comments > > > --- > > drivers/gpu/drm/vc4/vc4_hdmi.c | 12 ++++++++++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c > > index eee9751009c2..fc545072b173 100644 > > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > > @@ -95,6 +95,15 @@ > > #define HDMI_14_MAX_TMDS_CLK (340 * 1000 * 1000) > > +static bool vc4_hdmi_is_full_range_rgb(struct vc4_hdmi *vc4_hdmi, > > + const struct drm_display_mode *mode) > > +{ > > + struct vc4_hdmi_encoder *vc4_encoder = &vc4_hdmi->encoder; > > + > > + return !vc4_encoder->hdmi_monitor || > > Is this ever being called from non-HDMI code? If not, I'd put an > drm_WARN_ONCE around this check. I'm not sure we need to worry about this, it's a static function in the HDMI controller driver so it can't be called from anywhere else Maxime