[v2 07/25] drm: Add 1D LUT multi-segmented color op
Shankar, Uma
uma.shankar at intel.com
Tue Dec 3 09:11:35 UTC 2024
> -----Original Message-----
> From: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> Sent: Saturday, November 30, 2024 3:14 PM
> To: Shankar, Uma <uma.shankar at intel.com>
> Cc: dri-devel at lists.freedesktop.org; intel-gfx at lists.freedesktop.org; intel-
> xe at lists.freedesktop.org; ville.syrjala at linux.intel.com;
> harry.wentland at amd.com; pekka.paalanen at haloniitty.fi;
> sebastian.wick at redhat.com; jadahl at redhat.com; mwen at igalia.com;
> contact at emersion.fr; Kumar, Naveen1 <naveen1.kumar at intel.com>; Borah,
> Chaitanya Kumar <chaitanya.kumar.borah at intel.com>
> Subject: Re: [v2 07/25] drm: Add 1D LUT multi-segmented color op
>
> On Tue, Nov 26, 2024 at 06:57:12PM +0530, Uma Shankar wrote:
> > From: Chaitanya Kumar Borah <chaitanya.kumar.borah at intel.com>
> >
> > Add support for color ops that can be programmed by 1 dimensional
> > multi segmented Look Up Tables.
> >
> > Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah at intel.com>
> > Signed-off-by: Uma Shankar <uma.shankar at intel.com>
> > ---
> > drivers/gpu/drm/drm_atomic.c | 4 ++++
> > drivers/gpu/drm/drm_atomic_uapi.c | 3 +++
> > include/uapi/drm/drm_mode.h | 8 ++++++++
> > 3 files changed, 15 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic.c
> > b/drivers/gpu/drm/drm_atomic.c index 8a75f4a0637a..f344d64d42ce 100644
> > --- a/drivers/gpu/drm/drm_atomic.c
> > +++ b/drivers/gpu/drm/drm_atomic.c
> > @@ -802,6 +802,10 @@ static void drm_atomic_colorop_print_state(struct
> drm_printer *p,
> > drm_printf(p, "\tinterpolation=%s\n",
> drm_get_colorop_lut1d_interpolation_name(colorop->lut1d_interpolation));
> > drm_printf(p, "\tdata blob id=%d\n", state->data ? state->data-
> >base.id : 0);
> > break;
> > + case DRM_COLOROP_1D_LUT_MULTSEG:
> > + drm_printf(p, "\thw cap blob id=%d\n", state->hw_caps ? state-
> >hw_caps->base.id : 0);
> > + drm_printf(p, "\tdata blob id=%d\n", state->data ? state->data-
> >base.id : 0);
> > + break;
> > case DRM_COLOROP_CTM_3X3:
> > drm_printf(p, "\tdata blob id=%d\n", state->data ? state->data-
> >base.id : 0);
> > break;
> > diff --git a/drivers/gpu/drm/drm_atomic_uapi.c
> > b/drivers/gpu/drm/drm_atomic_uapi.c
> > index 46cc7b0df6e8..326159bff91c 100644
> > --- a/drivers/gpu/drm/drm_atomic_uapi.c
> > +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> > @@ -720,6 +720,9 @@ static int drm_atomic_color_set_data_property(struct
> drm_colorop *colorop,
> > size = modes[index].lut_stride[0] * modes[index].lut_stride[1] *
> modes[index].lut_stride[2] *
> > sizeof(struct drm_color_lut);
> > break;
> > + case DRM_COLOROP_1D_LUT_MULTSEG:
> > + elem_size = sizeof(struct drm_color_lut_32);
> > + break;
> > default:
> > /* should never get here */
> > return -EINVAL;
> > diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> > index 9ed8b1b1357a..d126a5410eea 100644
> > --- a/include/uapi/drm/drm_mode.h
> > +++ b/include/uapi/drm/drm_mode.h
> > @@ -923,6 +923,14 @@ enum drm_colorop_type {
> > */
> > DRM_COLOROP_CTM_3X4,
> >
> > + /**
> > + * @DRM_COLOROP_1D_LUT_MULTSEG:
> > + *
> > + * A 3x4 matrix. Its values are specified via the
> > + * &drm_color_ctm_3x4 struct provided via the DATA property.
>
> The comment is incorrect
Thanks Dmitry for spotting, will fix it.
Regards,
Uma Shankar
> > + */
> > + DRM_COLOROP_1D_LUT_MULTSEG,
> > +
> > /**
> > * @DRM_COLOROP_CTM_3X3:
> > *
> > --
> > 2.42.0
> >
>
> --
> With best wishes
> Dmitry
More information about the Intel-gfx
mailing list