[v2 05/25] drm: Add Color ops capability property

Shankar, Uma uma.shankar at intel.com
Tue Dec 3 09:09:43 UTC 2024



> -----Original Message-----
> From: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> Sent: Saturday, November 30, 2024 3:13 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>
> Subject: Re: [v2 05/25] drm: Add Color ops capability property
> 
> On Tue, Nov 26, 2024 at 06:57:10PM +0530, Uma Shankar wrote:
> > Add capability property which a colorop can expose it's hardware's
> > abilities. It's a blob property that can be filled with respective
> > data structures depending on the colorop. The user space is expected
> > to read this property and program the colorop accordingly.
> 
> If it's a blob, where is its contents documented? Also please point out the non-IGT
> userspace implementation that uses the property.

We tried to describe it in the docs (last patch in the series:
https://patchwork.freedesktop.org/patch/626179/?series=129811&rev=2

Will add more details in the patch here as well to be clear.
Currently for userspace, plan is that weston will implement the color management protocol and
related KMS changes. Pekka and Sebastian are driving the implementation in Weston.

Regards,
Uma Shankar

> >
> > Signed-off-by: Uma Shankar <uma.shankar at intel.com>
> > Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah at intel.com>
> > ---
> >  drivers/gpu/drm/drm_atomic_uapi.c |  3 +++
> >  include/drm/drm_colorop.h         | 12 ++++++++++++
> >  2 files changed, 15 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic_uapi.c
> > b/drivers/gpu/drm/drm_atomic_uapi.c
> > index ba68358c0ffe..46cc7b0df6e8 100644
> > --- a/drivers/gpu/drm/drm_atomic_uapi.c
> > +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> > @@ -780,6 +780,9 @@ drm_atomic_colorop_get_property(struct drm_colorop
> *colorop,
> >  		*val = state->size;
> >  	} else if (property == colorop->data_property) {
> >  		*val = (state->data) ? state->data->base.id : 0;
> > +	} else if (property == colorop->hw_caps_property) {
> > +		*val = state->hw_caps ?
> > +			state->hw_caps->base.id : 0;
> >  	} else {
> >  		return -EINVAL;
> >  	}
> > diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h
> > index 56b51fafebdf..58e5b87c6d56 100644
> > --- a/include/drm/drm_colorop.h
> > +++ b/include/drm/drm_colorop.h
> > @@ -146,6 +146,11 @@ struct drm_colorop_state {
> >  	 * Number of entries of the custom LUT. This should be read-only.
> >  	 */
> >  	uint32_t size;
> > +	/**
> > +	 * @hw_caps:
> > +	 *
> > +	 */
> > +	struct drm_property_blob *hw_caps;
> >
> >  	/**
> >  	 * @lut_3d_modes:
> > @@ -297,6 +302,13 @@ struct drm_colorop {
> >  	 */
> >  	struct drm_property *curve_1d_type_property;
> >
> > +	/**
> > +	 * @hwlut_caps_property:
> > +	 *
> > +	 * Property to expose hardware lut capbilities.
> > +	 */
> > +	struct drm_property *hw_caps_property;
> > +
> >  	/**
> >  	 * @multiplier_property:
> >  	 *
> > --
> > 2.42.0
> >
> 
> --
> With best wishes
> Dmitry


More information about the Intel-gfx mailing list