> -----Original Message----- > From: Sebastian Wick <sebastian.wick@xxxxxxxxxx> > Sent: Tuesday, February 13, 2024 5:34 PM > To: Shankar, Uma <uma.shankar@xxxxxxxxx> > Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx; > ville.syrjala@xxxxxxxxxxxxxxx; pekka.paalanen@xxxxxxxxxxxxx; > contact@xxxxxxxxxxx; harry.wentland@xxxxxxx; mwen@xxxxxxxxxx; > jadahl@xxxxxxxxxx; shashank.sharma@xxxxxxx; agoins@xxxxxxxxxx; > joshua@xxxxxxxxx; mdaenzer@xxxxxxxxxx; aleixpol@xxxxxxx; > xaver.hugl@xxxxxxxxx; victoria@xxxxxxxxxxxx; daniel@xxxxxxxx; > quic_naseer@xxxxxxxxxxx; quic_cbraga@xxxxxxxxxxx; > quic_abhinavk@xxxxxxxxxxx; arthurgrillo@xxxxxxxxxx; marcan@xxxxxxxxx; > Liviu.Dudau@xxxxxxx; sashamcintosh@xxxxxxxxxx; sean@xxxxxxxxxx > Subject: Re: [PATCH 08/28] drm: Add Color lut range attributes > > On Tue, Feb 13, 2024 at 12:18:15PM +0530, Uma Shankar wrote: > > This defines a new structure to define color lut ranges, along with > > related macro definitions and enums. This will help describe segmented > > lut ranges/PWL LUTs in the hardware. > > > > Signed-off-by: Uma Shankar <uma.shankar@xxxxxxxxx> > > Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@xxxxxxxxx> > > --- > > include/uapi/drm/drm_mode.h | 58 > > +++++++++++++++++++++++++++++++++++++ > > 1 file changed, 58 insertions(+) > > > > diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h > > index af67f32e0087..376498715d0e 100644 > > --- a/include/uapi/drm/drm_mode.h > > +++ b/include/uapi/drm/drm_mode.h > > @@ -1014,6 +1014,64 @@ struct hdr_output_metadata { > > DRM_MODE_PAGE_FLIP_ASYNC | \ > > DRM_MODE_PAGE_FLIP_TARGET) > > > > All of this uses DRM_MODE_LUT namespace but it seems specifically for the drm > colorop of type DRM_COLOROP_1D_LUT. Let's be consistent with the naming. Yeah Sebastian, we will update this and get it aligned. Thanks for pointing out. Regards, Uma Shankar > > +/** > > + * DRM_MODE_LUT_INTERPOLATE > > + * > > + * linearly interpolate between the points */ #define > > +DRM_MODE_LUT_INTERPOLATE BIT(0) > > + > > +/** > > + * DRM_MODE_LUT_REUSE_LAST > > + * > > + * the last value of the previous range is the > > + * first value of the current range. > > + */ > > +#define DRM_MODE_LUT_REUSE_LAST BIT(1) > > + > > +/** > > + * DRM_MODE_LUT_NON_DECREASING > > + * > > + * the curve must be non-decreasing > > + */ > > +#define DRM_MODE_LUT_NON_DECREASING BIT(2) > > + > > +/** > > + * DRM_MODE_LUT_REFLECT_NEGATIVE > > + * > > + * the curve is reflected across origin for negative inputs */ > > +#define DRM_MODE_LUT_REFLECT_NEGATIVE BIT(3) > > + > > +/** > > + * DRM_MODE_LUT_SINGLE_CHANNEL > > + * > > + * the same curve (red) is used for blue and green channels as well > > +*/ #define DRM_MODE_LUT_SINGLE_CHANNEL BIT(4) > > + > > +/** > > + * struct drm_color_lut_range > > + * > > + * structure to advertise capability of a color hardware > > + * block that accepts LUT values. It can represent LUTs with > > + * varied number of entries and distributions > > + * (Multi segmented, Logarithmic etc). > > + */ > > + > > +struct drm_color_lut_range { > > + /* DRM_MODE_LUT_* */ > > + __u32 flags; > > + /* number of points on the curve */ > > + __u16 count; > > + /* input/output bits per component */ > > + __u8 input_bpc, output_bpc; > > + /* input start/end values */ > > + __s32 start, end; > > + /* output min/max values */ > > + __s32 min, max; > > +}; > > + > > /* > > * Request a page flip on the specified crtc. > > * > > -- > > 2.42.0 > >