On Fri, Sep 12, 2025 at 09:39:09PM +0300, Marius Vlad wrote:
> On Fri, Sep 12, 2025 at 05:17:56PM +0200, Maxime Ripard wrote:
> > Hi,
> Hi Maxime,
> > 
> > On Thu, Sep 11, 2025 at 04:07:33PM +0300, Marius Vlad wrote:
> > > diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
> > > index 45b42f14a750..74fe925c69a2 100644
> > > --- a/drivers/video/hdmi.c
> > > +++ b/drivers/video/hdmi.c
> > > @@ -1031,8 +1031,8 @@ static const char *hdmi_colorspace_get_name(enum 
> > > hdmi_colorspace colorspace)
> > >           return "YCbCr 4:4:4";
> > >   case HDMI_COLORSPACE_YUV420:
> > >           return "YCbCr 4:2:0";
> > > - case HDMI_COLORSPACE_RESERVED4:
> > > -         return "Reserved (4)";
> > > + case HDMI_COLORSPACE_AUTO:
> > > +         return "Auto";
> > >   case HDMI_COLORSPACE_RESERVED5:
> > >           return "Reserved (5)";
> > >   case HDMI_COLORSPACE_RESERVED6:
> > > diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
> > > index 96bda41d9148..045402033763 100644
> > > --- a/include/linux/hdmi.h
> > > +++ b/include/linux/hdmi.h
> > > @@ -82,7 +82,7 @@ enum hdmi_colorspace {
> > >   HDMI_COLORSPACE_YUV422,
> > >   HDMI_COLORSPACE_YUV444,
> > >   HDMI_COLORSPACE_YUV420,
> > > - HDMI_COLORSPACE_RESERVED4,
> > > + HDMI_COLORSPACE_AUTO,
> > >   HDMI_COLORSPACE_RESERVED5,
> > >   HDMI_COLORSPACE_RESERVED6,
> > >   HDMI_COLORSPACE_IDO_DEFINED,
> > 
> > I'm not sure we can use hdmi_colorspace as is. This is the enum that
> > represents the colorspace encoded in the AVI infoframe, so we can't
> > change it, really.
>
> I see. Was hoping I can re-use these as is when defining the color
> format enum.

You probably shouldn't, but it's not a big deal either. The values of
the property don't have to match anything.

> Should I just de-couple the color format entirely from the enum hdmi
> colorspace? With the enum color format in it feels they sort of overlap,
> with some drivers explicitly using the hdmi colorspace enum others the
> color format enum. Feels a bit inconsistent but maybe that's just me
> and folks do not see this as an issue.
> 
> Perhaps just handle 'Auto' distinctly but still re-use the hdmi
> colorspace enum? 
> 
> Any (strong) preference?

I think you can just create an enum for that property. We will use it to
fill drm_connector_hdmi_state.output_format anyway, and it will always
be something !auto in there so it would work just fine.

Maxime

Attachment: signature.asc
Description: PGP signature

Reply via email to