> Subject: [v5 03/24] drm: Add Color ops capability property
> 
> 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.
> 
> v2: Added documentation for hw_caps blob (Dmitry)
> 
> Signed-off-by: Uma Shankar <[email protected]>
> Signed-off-by: Chaitanya Kumar Borah <[email protected]>
> ---
>  drivers/gpu/drm/drm_atomic_uapi.c |  3 +++
>  include/drm/drm_colorop.h         | 17 +++++++++++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_uapi.c
> b/drivers/gpu/drm/drm_atomic_uapi.c
> index 3a9dc98d7653..81a8da09fbfe 100644
> --- a/drivers/gpu/drm/drm_atomic_uapi.c
> +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> @@ -785,6 +785,9 @@ drm_atomic_colorop_get_property(struct
> drm_colorop *colorop,
>               *val = colorop->lut3d_interpolation;
>       } 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
> d5aebe46970f..46099e81bbfa 100644
> --- a/include/drm/drm_colorop.h
> +++ b/include/drm/drm_colorop.h
> @@ -155,6 +155,16 @@ struct drm_colorop_state {
>        */
>       uint64_t multiplier;
> 
> +     /**
> +      * @hw_caps:
> +      *
> +      * This blob will be of type struct drm_color_lut_range which contains
> the
> +      * hardware capabilities of 1D LUT. These include number of LUT
> segments,
> +      * number of LUT samples per segment, start and end point of
> respective
> +      * segments and the precision of the LUT sample along with the
> normalization factor
> +      */
> +     struct drm_property_blob *hw_caps;

>From the comment and description and all the function names given later on
lut_caps seems a more appropriate name.

> +
>       /**
>        * @data:
>        *
> @@ -305,6 +315,13 @@ struct drm_colorop {
>        */
>       struct drm_property *curve_1d_type_property;
> 
> +     /**
> +      * @hw_caps_property:
> +      *
> +      * Property to expose hardware lut capabilities.
> +      */
> +     struct drm_property *hw_caps_property;

Same here lut_caps_property maybe

Regards,
Suraj Kandpal

> +
>       /**
>        * @multiplier_property:
>        *
> --
> 2.42.0

Reply via email to