diff mbox

[07/12] drm: Add structures to set/get a palette color property

Message ID 1435894307-5722-8-git-send-email-Kausal.Malladi@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kausal Malladi July 3, 2015, 3:31 a.m. UTC
This patch adds new structures in DRM layer for Palette color correction.
These structures will be used by user space agents to configure
appropriate number of samples and Palette LUT for a platform.

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Kausal Malladi <Kausal.Malladi@intel.com>
---
 include/uapi/drm/drm.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Emil Velikov July 7, 2015, 6:01 p.m. UTC | #1
Hi Kausal,

On 03/07/15 04:31, Kausal Malladi wrote:
> This patch adds new structures in DRM layer for Palette color correction.
> These structures will be used by user space agents to configure
> appropriate number of samples and Palette LUT for a platform.
> 
> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> Signed-off-by: Kausal Malladi <Kausal.Malladi@intel.com>
> ---
>  include/uapi/drm/drm.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
> index d9562a2..04a8f2a 100644
> --- a/include/uapi/drm/drm.h
> +++ b/include/uapi/drm/drm.h
> @@ -863,6 +863,18 @@ struct drm_color_caps {
>  	struct drm_cge_caps cge_caps;
>  };
>  
> +struct drm_r32g32b32 {
> +	__u32 r32;
> +	__u32 g32;
> +	__u32 b32;
> +};
> +
I don't think this will work on a 64bit kernel with 32 bit userspace...
although I'm low on caffeine I could be imagining.


> +struct drm_palette {
> +	__u32 version;
> +	__u32 palette_num_samples;
> +	struct drm_r32g32b32 palette_lut[0];
If memory serves me right, I've mentioned earlier that using zero sized
arrays might not be so good considering portability and using non GCC
compilers.

I believe your consern was about that using a pointer is inefficient.
Can you provide some references/hints how is that so ?

Thanks
Emil
diff mbox

Patch

diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index d9562a2..04a8f2a 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -863,6 +863,18 @@  struct drm_color_caps {
 	struct drm_cge_caps cge_caps;
 };
 
+struct drm_r32g32b32 {
+	__u32 r32;
+	__u32 g32;
+	__u32 b32;
+};
+
+struct drm_palette {
+	__u32 version;
+	__u32 palette_num_samples;
+	struct drm_r32g32b32 palette_lut[0];
+};
+
 /* typedef area */
 #ifndef __KERNEL__
 typedef struct drm_clip_rect drm_clip_rect_t;