[RFC 09/33] drm: Add color information to plane state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@xxxxxxxxx>
Signed-off-by: Uma Shankar <uma.shankar@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux