diff mbox

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

Message ID 1435894307-5722-5-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
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@intel.com>
Signed-off-by: Kausal Malladi <Kausal.Malladi@intel.com>
---
 include/uapi/drm/drm.h | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
diff mbox

Patch

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;