[PATCH v2 08/10] drm: Add CSC correction structure

Damien Lespiau damien.lespiau at intel.com
Tue Jun 9 04:53:41 PDT 2015


On Thu, Jun 04, 2015 at 07:12:39PM +0530, Kausal Malladi wrote:
> From: Kausal Malladi <Kausal.Malladi at intel.com>
> 
> This patch adds a new structure in DRM layer for CSC color correction.
> This structure will be used by all user space agents to configure
> appropriate CSC format and CSC level.
> 
> /* Color Management structure for CSC */
> struct drm_intel_csc {
> 	__u32 csc_level;
> 	(The csc_level indicates whether the CSC to be applied at
> 	pipe/plane level)

Same as before, I don't believe we need this.

> 	__u32 csc_format;
> 	(The csc_format indicates the supported correction value \
> 	formats by underlying hardware)

Well, as with this whole series, leaking hw specific details in generic
interfaces.

> 	__u32 reserved;
> 	__s32 csc_matrix[9];
> 	(Raw CSC correction matrix)

Well, here again, hw specific, how about going for 16.16 fixed point?

> };

> Signed-off-by: Shashank Sharma <shashank.sharma at intel.com>
> Signed-off-by: Kausal Malladi <Kausal.Malladi at intel.com>
> ---
>  include/drm/drm_crtc.h | 1 +
>  include/uapi/drm/drm.h | 8 ++++++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 31b52cb..bcba1e7 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -486,6 +486,7 @@ struct drm_crtc {
>  
>  	/* Color Management Blob IDs */
>  	u32 gamma_blob_id;
> +	u32 csc_blob_id;
>  };
>  
>  /**
> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
> index fc2661c..2458b6c 100644
> --- a/include/uapi/drm/drm.h
> +++ b/include/uapi/drm/drm.h
> @@ -839,6 +839,14 @@ struct drm_gamma {
>  	__u16 values[0];
>  };
>  
> +/* Color Management structure for CSC */
> +struct drm_csc {
> +	__u32 csc_level;
> +	__u32 csc_format;
> +	__u32 reserved;
> +	__s32 csc_matrix[9];
> +};
> +
>  /* typedef area */
>  #ifndef __KERNEL__
>  typedef struct drm_clip_rect drm_clip_rect_t;
> -- 
> 2.4.2
> 


More information about the dri-devel mailing list