[PATCH 04/12] drm: Add structures for querying color capabilities

Kausal Malladi Kausal.Malladi at intel.com
Thu Jul 2 20:31:39 PDT 2015


The DRM color management framework is targeting various hardware
platforms and drivers. Different platforms can have different color
correction and enhancement capabilities.

A commom user space application can query these capabilities using the
DRM property interface. Each driver can fill this property with its
platform's color capabilities.

This patch adds new structures in DRM layer for querying color
capabilities. These structures will be used by all user space
agents to configure appropriate color configurations.

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

diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index 3801584..d9562a2 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -829,6 +829,40 @@ struct drm_event_vblank {
 	__u32 reserved;
 };
 
+struct drm_palette_sampling_details {
+	__u32 sample_fract_precision;
+	__u32 last_sample_int_max;
+	__u32 remaining_sample_int_max;
+	__u32 num_samples;
+};
+
+struct drm_palette_caps {
+	__u32 version;
+	__u32 num_supported_types;
+	struct drm_palette_sampling_details palette_sampling_types[4];
+};
+
+struct drm_ctm_caps {
+	__u32 version;
+	__u32 ctm_coeff_fract_precision;
+	__u32 ctm_coeff_int_max;
+	__s32 ctm_coeff_int_min;
+};
+
+struct drm_cge_caps {
+	__u32 version;
+	__u32 cge_max_weight;
+};
+
+struct drm_color_caps {
+	__u32 version;
+	__u32 reserved;
+	struct drm_palette_caps palette_caps_after_ctm;
+	struct drm_palette_caps palette_caps_before_ctm;
+	struct drm_ctm_caps ctm_caps;
+	struct drm_cge_caps cge_caps;
+};
+
 /* typedef area */
 #ifndef __KERNEL__
 typedef struct drm_clip_rect drm_clip_rect_t;
-- 
2.4.5



More information about the dri-devel mailing list