[RFC 09/33] drm: Add color information to plane state
Uma Shankar
uma.shankar at intel.com
Tue Aug 29 16:03:58 UTC 2023
Add a new structure drm_plane_color to plane state. It consists
of blobs with data needed for respective color HW blocks.
Currently defining below blobs
pre-csc: can be used to linearize the input frame buffer data.
csc: used for color space conversion.
post-csc: can be used non-linearize frame buffer data or
to perform Tone mapping for HDR use-cases
private: can be used for vendor specific fixed function operations
This can be extended to include other color operations as well.
Co-developed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah at intel.com>
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah at intel.com>
Signed-off-by: Uma Shankar <uma.shankar at intel.com>
---
include/drm/drm_plane.h | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index fcd589cb38f2..601b01e47a93 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -245,6 +245,47 @@ struct drm_plane_state {
*/
struct drm_property_blob *set_color_pipeline_data;
+ /**
+ * @drm_plane_color:
+ *
+ * Encapsulates all color states.
+ */
+ struct drm_plane_color {
+ /**
+ * @pre_csc_lut:
+ *
+ * Lookup table for converting framebuffer pixel data before apply the
+ * color conversion matrix @ctm. See drm_plane_enable_color_mgmt(). The
+ * blob (if not NULL) is an array of &struct drm_color_lut_ext.
+ */
+ struct drm_property_blob *pre_csc_lut;
+
+ /**
+ * @ctm:
+ *
+ * Color transformation matrix. See drm_plane_enable_color_mgmt(). The
+ * blob (if not NULL) is a &struct drm_color_ctm.
+ */
+ struct drm_property_blob *ctm;
+
+ /**
+ * @post_csc_lut:
+ *
+ * Lookup table for converting framebuffer pixel data after applying the
+ * color conversion matrix @ctm. See drm_plane_enable_color_mgmt(). The
+ * blob (if not NULL) is an array of &struct drm_color_lut_ext.
+ */
+ struct drm_property_blob *post_csc_lut;
+
+ /**
+ * @private_color_op_data:
+ *
+ * This blob is intended for drivers to implement driver private color operations.
+ * For example: Parameterized/non-parameterized fixed function operations
+ */
+ struct drm_property_blob *private_color_op_data;
+ } color;
+
/**
* @color_mgmt_changed: Plane color pipeline state has changed
* Used by the atomic helpers and
--
2.38.1
More information about the wayland-devel
mailing list