Skip to contentSkip to conversation

Add Plane Color Properties

RFC Superseded Uma Shankar 4 participants 19 messages Mar 9, 2018 – Jul 16, 2018

Subsystems (4)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v3 cover Add Plane Color Properties

This patch series adds properties for plane color features. It adds properties for degamma used to linearize data, CSC used for gamut conversion, and gamma used to again non-linearize data as per panel supported color space. These can be utilize by user space to convert planes from one format to another, one color space to another etc.

Usersapce can take smart blending decisions and utilize these hardware supported plane color features to get accurate color profile. The same can help in consistent color quality from source to panel taking advantage of advanced color features in hardware.

These patches just add the property interfaces and enable helper functions.

This series adds Intel Gen9 specific plane gamma feature. We can build up and add other platform/hardware specific implementation on top of this series

Note: This is just to get a design feedback whether these interfaces look ok. Based on community feedback on interfaces, we will implement IGT tests to validate plane color features. This is un-tested currently. Also, userspace implementation to use these properties is currently not available.

v2: Dropped legacy gamma table for plane as suggested by Maarten. Added Gen9/BDW plane gamma feature and rebase on tot.

v3: Added a new drm_color_lut_ext structure to accommodate 32 bit precision entries, pointed to by Brian, Starkey for HDR usecases. Addressed Sean,Paul comments and moved plane color properties to drm_plane instead of mode_config. Added property documentation as suggested by Daniel, Vetter. Fixed a rebase fumble which occurred in v2, pointed by Emil Velikov.

Uma Shankar (8):
drm: Add Enhanced Gamma LUT precision structure
drm: Add Plane Degamma properties
drm: Add Plane CTM property
drm: Add Plane Gamma properties
drm: Define helper function for plane color enabling drm/i915: Enable plane color features
drm/i915: Implement Plane Gamma for Bdw and Gen9 platforms drm/i915: Load plane color luts from atomic flip

 Documentation/gpu/drm-kms.rst             |  18 ++++
 drivers/gpu/drm/drm_atomic.c              |  30 +++++++
 drivers/gpu/drm/drm_atomic_helper.c       |  12 +++
 drivers/gpu/drm/drm_plane.c               | 131 ++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_drv.h           |   5 ++
 drivers/gpu/drm/i915/i915_pci.c           |   5 +-
 drivers/gpu/drm/i915/i915_reg.h           |  24 ++++++
 drivers/gpu/drm/i915/intel_atomic_plane.c |   4 +
 drivers/gpu/drm/i915/intel_color.c        |  80 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_device_info.h  |   5 ++
 drivers/gpu/drm/i915/intel_display.c      |   4 +
 drivers/gpu/drm/i915/intel_drv.h          |  10 +++
 drivers/gpu/drm/i915/intel_sprite.c       |   4 +
 include/drm/drm_color_mgmt.h              |   5 ++
 include/drm/drm_plane.h                   |  66 +++++++++++++++
 include/uapi/drm/drm_mode.h               |  15 ++++
 16 files changed, 417 insertions(+), 1 deletion(-)
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

RFC v3 1/8 drm: Add Enhanced Gamma LUT precision structure

Existing LUT precision structure is having only 16 bit precision. This is not enough for upcoming enhanced hardwares and advance usecases like HDR processing. Hence added a new structure with 32 bit precision values. Also added the code, for extracting the same from values passed from userspace.

---
 drivers/gpu/drm/drm_plane.c | 19 +++++++++++++++++++
 include/uapi/drm/drm_mode.h | 15 +++++++++++++++
 2 files changed, 34 insertions(+)
drivers/gpu/drm/drm_plane.c +19 -0
index a5d1fc7..e706da6 100644
@@ -426,6 +426,25 @@ void drm_plane_force_disable(struct drm_plane *plane)
 }
 EXPORT_SYMBOL(drm_plane_force_disable);
 
+/*
+ * Added to accommodate enhanced LUT precision.
+ * Max LUT precision is 32 bits.
+ */
+uint32_t drm_color_lut_extract_ext(uint32_t user_input, uint32_t bit_precision)
+{
+	uint32_t val = user_input;
+	uint32_t max = 0xffffffff >> (32 - bit_precision);
+
+	/* Round only if we're not using full precision. */
+	if (bit_precision < 32) {
+		val += 1UL << (32 - bit_precision - 1);
+		val >>= 32 - bit_precision;
+	}
+
+	return clamp_val(val, 0, max);
+}
+EXPORT_SYMBOL(drm_color_lut_extract_ext);
+
 /**
  * drm_mode_plane_set_obj_prop - set the value of a property
  * @plane: drm plane object to set property value for
include/uapi/drm/drm_mode.h +15 -0
index b5d7d9e..5f3ed88 100644
@@ -615,6 +615,21 @@ struct drm_color_lut {
 	__u16 reserved;
 };
 
+/*
+ * Creating 32 bit palette entries for better data
+ * precision. This will be required for HDR and
+ * similar color processing usecases.
+ */
+struct drm_color_lut_ext {
+	/*
+	 * Data is U0.32 fixed point format.
+	 */
+	__u32 red;
+	__u32 green;
+	__u32 blue;
+	__u32 reserved;
+};
+
 #define DRM_MODE_PAGE_FLIP_EVENT 0x01
 #define DRM_MODE_PAGE_FLIP_ASYNC 0x02
 #define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

RFC v3 2/8 drm: Add Plane Degamma properties

In reply to Uma Shankar

Add Plane Degamma as a blob property and plane degamma size as a range property.

v2: Rebase

v3: Fixed Sean, Paul's review comments. Moved the property from mode_config to drm_plane. Created a helper function to instantiate these properties and removed from drm_mode_create_standard_properties Added property documentation as suggested by Daniel, Vetter.

---
 Documentation/gpu/drm-kms.rst       |  9 +++++++++
 drivers/gpu/drm/drm_atomic.c        | 12 ++++++++++++
 drivers/gpu/drm/drm_atomic_helper.c |  6 ++++++
 drivers/gpu/drm/drm_plane.c         | 35 +++++++++++++++++++++++++++++++++++
 include/drm/drm_plane.h             | 26 ++++++++++++++++++++++++++
 5 files changed, 88 insertions(+)
Documentation/gpu/drm-kms.rst +9 -0
index 56a3780..2c943f6 100644
@@ -532,6 +532,15 @@ Color Management Properties
 .. kernel-doc:: drivers/gpu/drm/drm_color_mgmt.c
    :export:
 
+Plane Color Management Properties
+---------------------------
+
+.. kernel-doc:: drivers/gpu/drm/drm_plane.c
+   :doc: degamma_lut_property
+
+.. kernel-doc:: drivers/gpu/drm/drm_plane.c
+   :doc: degamma_lut_size_property
+
 Tile Group Property
 -------------------
 
drivers/gpu/drm/drm_atomic.c +12 -0
index 34b7d42..409c058 100644
@@ -717,6 +717,8 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 {
 	struct drm_device *dev = plane->dev;
 	struct drm_mode_config *config = &dev->mode_config;
+	bool replaced = false;
+	int ret;
 
 	if (property == config->prop_fb_id) {
 		struct drm_framebuffer *fb = drm_framebuffer_lookup(dev, NULL, val);
@@ -763,6 +765,12 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 		state->color_encoding = val;
 	} else if (property == plane->color_range_property) {
 		state->color_range = val;
+	} else if (property == plane->degamma_lut_property) {
+		ret = drm_atomic_replace_property_blob_from_id(dev,
+					&state->degamma_lut,
+					val, -1, &replaced);
+		state->color_mgmt_changed |= replaced;
+		return ret;
 	} else if (plane->funcs->atomic_set_property) {
 		return plane->funcs->atomic_set_property(plane, state,
 				property, val);
@@ -826,6 +834,9 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 		*val = state->color_encoding;
 	} else if (property == plane->color_range_property) {
 		*val = state->color_range;
+	} else if (property == plane->degamma_lut_property) {
+		*val = (state->degamma_lut) ?
+			state->degamma_lut->base.id : 0;
 	} else if (plane->funcs->atomic_get_property) {
 		return plane->funcs->atomic_get_property(plane, state, property, val);
 	} else {
@@ -958,6 +969,7 @@ static void drm_atomic_plane_print_state(struct drm_printer *p,
 		   drm_get_color_encoding_name(state->color_encoding));
 	drm_printf(p, "\tcolor-range=%s\n",
 		   drm_get_color_range_name(state->color_range));
+	drm_printf(p, "\tcolor_mgmt_changed=%d\n", state->color_mgmt_changed);
 
 	if (plane->funcs->atomic_print_state)
 		plane->funcs->atomic_print_state(p, state);
drivers/gpu/drm/drm_atomic_helper.c +6 -0
index ae3cbfe..d9384fd 100644
@@ -3504,6 +3504,10 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
 
 	state->fence = NULL;
 	state->commit = NULL;
+
+	if (state->degamma_lut)
+		drm_property_reference_blob(state->degamma_lut);
+	state->color_mgmt_changed = false;
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state);
 
@@ -3548,6 +3552,8 @@ void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state)
 
 	if (state->commit)
 		drm_crtc_commit_put(state->commit);
+
+	drm_property_unreference_blob(state->degamma_lut);
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state);
 
drivers/gpu/drm/drm_plane.c +35 -0
index e706da6..543a693 100644
@@ -474,6 +474,41 @@ int drm_mode_plane_set_obj_prop(struct drm_plane *plane,
 }
 EXPORT_SYMBOL(drm_mode_plane_set_obj_prop);
 
+/**
+ * DOC: degamma_lut_property
+ *
+ * degamma_lut_property:
+ *	Blob property which allows a userspace to provide LUT values
+ *	to apply degamma curve using the h/w plane degamma processing
+ *	engine, thereby making the content as linear for further color
+ *	processing.
+ *
+ * degamma_lut_size_property:
+ *	Range Property to indicate size of the plane degamma LUT.
+ */
+int drm_plane_color_create_prop(struct drm_device *dev,
+				struct drm_plane *plane)
+{
+	struct drm_property *prop;
+
+	prop = drm_property_create(dev,
+			DRM_MODE_PROP_BLOB,
+			"PLANE_DEGAMMA_LUT", 0);
+	if (!prop)
+		return -ENOMEM;
+	plane->degamma_lut_property = prop;
+
+	prop = drm_property_create_range(dev,
+			DRM_MODE_PROP_IMMUTABLE,
+			"PLANE_DEGAMMA_LUT_SIZE", 0, UINT_MAX);
+	if (!prop)
+		return -ENOMEM;
+	plane->degamma_lut_size_property = prop;
+
+	return 0;
+}
+EXPORT_SYMBOL(drm_plane_color_create_prop);
+
 int drm_mode_getplane_res(struct drm_device *dev, void *data,
 			  struct drm_file *file_priv)
 {
include/drm/drm_plane.h +26 -0
index f7bf4a4..03291b1 100644
@@ -138,6 +138,14 @@ struct drm_plane_state {
 	 */
 	bool visible;
 
+	/* @degamma_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 *degamma_lut;
+
 	/**
 	 * @commit: Tracks the pending commit to prevent use-after-free conditions,
 	 * and for async plane updates.
@@ -147,6 +155,8 @@ struct drm_plane_state {
 	struct drm_crtc_commit *commit;
 
 	struct drm_atomic_state *state;
+
+	bool color_mgmt_changed : 1;
 };
 
 static inline struct drm_rect
@@ -499,6 +509,8 @@ enum drm_plane_type {
  * @zpos_property: zpos property for this plane
  * @rotation_property: rotation property for this plane
  * @helper_private: mid-layer private data
+ * @degamma_lut_property: Property for plane degamma LUT
+ * @degamma_lut_size_property: Property for size of plane degamma LUT
  */
 struct drm_plane {
 	struct drm_device *dev;
@@ -590,6 +602,18 @@ struct drm_plane {
 	 * See drm_plane_create_color_properties().
 	 */
 	struct drm_property *color_range_property;
+
+	/**
+	 * @degamma_lut_property: Optional Plane property to set the LUT
+	 * used to convert the framebuffer's colors to linear gamma.
+	 */
+	struct drm_property *degamma_lut_property;
+
+	/**
+	 * @degamma_lut_size_property: Optional Plane property for the
+	 * size of the degamma LUT as supported by the driver (read-only).
+	 */
+	struct drm_property *degamma_lut_size_property;
 };
 
 #define obj_to_plane(x) container_of(x, struct drm_plane, base)
@@ -629,6 +653,8 @@ static inline unsigned int drm_plane_index(struct drm_plane *plane)
 int drm_mode_plane_set_obj_prop(struct drm_plane *plane,
 				       struct drm_property *property,
 				       uint64_t value);
+int drm_plane_color_create_prop(struct drm_device *dev,
+				struct drm_plane *plane);
 
 /**
  * drm_plane_find - find a &drm_plane
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

RFC v3 3/8 drm: Add Plane CTM property

In reply to Uma Shankar

Add a blob property for plane CSC usage.

v2: Rebase

v3: Fixed Sean, Paul's review comments. Moved the property from mode_config to drm_plane. Created a helper function to instantiate these properties and removed from drm_mode_create_standard_properties Added property documentation as suggested by Daniel, Vetter.

---
 Documentation/gpu/drm-kms.rst       |  3 +++
 drivers/gpu/drm/drm_atomic.c        | 10 ++++++++++
 drivers/gpu/drm/drm_atomic_helper.c |  3 +++
 drivers/gpu/drm/drm_plane.c         | 12 ++++++++++++
 include/drm/drm_plane.h             | 16 ++++++++++++++++
 5 files changed, 44 insertions(+)
Documentation/gpu/drm-kms.rst +3 -0
index 2c943f6..69b0b56 100644
@@ -541,6 +541,9 @@ Plane Color Management Properties
 .. kernel-doc:: drivers/gpu/drm/drm_plane.c
    :doc: degamma_lut_size_property
 
+.. kernel-doc:: drivers/gpu/drm/drm_plane.c
+   :doc: ctm_property
+
 Tile Group Property
 -------------------
 
drivers/gpu/drm/drm_atomic.c +10 -0
index 409c058..f86384fa 100644
@@ -771,6 +771,14 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 					val, -1, &replaced);
 		state->color_mgmt_changed |= replaced;
 		return ret;
+	} else if (property == plane->ctm_property) {
+		ret = drm_atomic_replace_property_blob_from_id(dev,
+					&state->ctm,
+					val,
+					sizeof(struct drm_color_ctm),
+					&replaced);
+		state->color_mgmt_changed |= replaced;
+		return ret;
 	} else if (plane->funcs->atomic_set_property) {
 		return plane->funcs->atomic_set_property(plane, state,
 				property, val);
@@ -837,6 +845,8 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 	} else if (property == plane->degamma_lut_property) {
 		*val = (state->degamma_lut) ?
 			state->degamma_lut->base.id : 0;
+	} else if (property == plane->ctm_property) {
+		*val = (state->ctm) ? state->ctm->base.id : 0;
 	} else if (plane->funcs->atomic_get_property) {
 		return plane->funcs->atomic_get_property(plane, state, property, val);
 	} else {
drivers/gpu/drm/drm_atomic_helper.c +3 -0
index d9384fd..76b4b41 100644
@@ -3507,6 +3507,8 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
 
 	if (state->degamma_lut)
 		drm_property_reference_blob(state->degamma_lut);
+	if (state->ctm)
+		drm_property_reference_blob(state->ctm);
 	state->color_mgmt_changed = false;
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state);
@@ -3554,6 +3556,7 @@ void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state)
 		drm_crtc_commit_put(state->commit);
 
 	drm_property_unreference_blob(state->degamma_lut);
+	drm_property_unreference_blob(state->ctm);
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state);
 
drivers/gpu/drm/drm_plane.c +12 -0
index 543a693..e635b63 100644
@@ -485,6 +485,11 @@ int drm_mode_plane_set_obj_prop(struct drm_plane *plane,
  *
  * degamma_lut_size_property:
  *	Range Property to indicate size of the plane degamma LUT.
+ *
+ * ctm_property:
+ *	Blob property which allows a userspace to provide CTM coefficients
+ *	to do color space conversion or any other enhancement by doing a
+ *	matrix multiplication using the h/w CTM processing engine
  */
 int drm_plane_color_create_prop(struct drm_device *dev,
 				struct drm_plane *plane)
@@ -505,6 +510,13 @@ int drm_plane_color_create_prop(struct drm_device *dev,
 		return -ENOMEM;
 	plane->degamma_lut_size_property = prop;
 
+	prop = drm_property_create(dev,
+			DRM_MODE_PROP_BLOB,
+			"PLANE_CTM", 0);
+	if (!prop)
+		return -ENOMEM;
+	plane->ctm_property = prop;
+
 	return 0;
 }
 EXPORT_SYMBOL(drm_plane_color_create_prop);
include/drm/drm_plane.h +16 -0
index 03291b1..35535c5 100644
@@ -147,6 +147,14 @@ struct drm_plane_state {
 	struct drm_property_blob *degamma_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;
+
+	/**
 	 * @commit: Tracks the pending commit to prevent use-after-free conditions,
 	 * and for async plane updates.
 	 *
@@ -511,6 +519,7 @@ enum drm_plane_type {
  * @helper_private: mid-layer private data
  * @degamma_lut_property: Property for plane degamma LUT
  * @degamma_lut_size_property: Property for size of plane degamma LUT
+ * @ctm_property: Property for plane CTM matrix
  */
 struct drm_plane {
 	struct drm_device *dev;
@@ -614,6 +623,13 @@ struct drm_plane {
 	 * size of the degamma LUT as supported by the driver (read-only).
 	 */
 	struct drm_property *degamma_lut_size_property;
+
+	/**
+	 * @plane_ctm_property: Optional Plane property to set the
+	 * matrix used to convert colors after the lookup in the
+	 * degamma LUT.
+	 */
+	struct drm_property *ctm_property;
 };
 
 #define obj_to_plane(x) container_of(x, struct drm_plane, base)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

RFC v3 4/8 drm: Add Plane Gamma properties

In reply to Uma Shankar

Add plane gamma as blob property and size as a
range property.

v2: Rebase

v3: Fixed Sean, Paul's review comments. Moved the property from mode_config to drm_plane. Created a helper function to instantiate these properties and removed from drm_mode_create_standard_properties Added property documentation as suggested by Daniel, Vetter.

---
 Documentation/gpu/drm-kms.rst       |  6 ++++++
 drivers/gpu/drm/drm_atomic.c        |  8 ++++++++
 drivers/gpu/drm/drm_atomic_helper.c |  3 +++
 drivers/gpu/drm/drm_plane.c         | 23 +++++++++++++++++++++++
 include/drm/drm_plane.h             | 24 ++++++++++++++++++++++++
 5 files changed, 64 insertions(+)
Documentation/gpu/drm-kms.rst +6 -0
index 69b0b56..3561deb 100644
@@ -544,6 +544,12 @@ Plane Color Management Properties
 .. kernel-doc:: drivers/gpu/drm/drm_plane.c
    :doc: ctm_property
 
+.. kernel-doc:: drivers/gpu/drm/drm_plane.c
+   :doc: gamma_lut_property
+
+.. kernel-doc:: drivers/gpu/drm/drm_plane.c
+   :doc: gamma_lut_size_property
+
 Tile Group Property
 -------------------
 
drivers/gpu/drm/drm_atomic.c +8 -0
index f86384fa..d636a81 100644
@@ -779,6 +779,12 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 					&replaced);
 		state->color_mgmt_changed |= replaced;
 		return ret;
+	} else if (property == plane->gamma_lut_property) {
+		ret = drm_atomic_replace_property_blob_from_id(dev,
+					&state->gamma_lut,
+					val, -1, &replaced);
+		state->color_mgmt_changed |= replaced;
+		return ret;
 	} else if (plane->funcs->atomic_set_property) {
 		return plane->funcs->atomic_set_property(plane, state,
 				property, val);
@@ -847,6 +853,8 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 			state->degamma_lut->base.id : 0;
 	} else if (property == plane->ctm_property) {
 		*val = (state->ctm) ? state->ctm->base.id : 0;
+	} else if (property == plane->gamma_lut_property) {
+		*val = (state->gamma_lut) ? state->gamma_lut->base.id : 0;
 	} else if (plane->funcs->atomic_get_property) {
 		return plane->funcs->atomic_get_property(plane, state, property, val);
 	} else {
drivers/gpu/drm/drm_atomic_helper.c +3 -0
index 76b4b41..3337e04 100644
@@ -3509,6 +3509,8 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
 		drm_property_reference_blob(state->degamma_lut);
 	if (state->ctm)
 		drm_property_reference_blob(state->ctm);
+	if (state->gamma_lut)
+		drm_property_reference_blob(state->gamma_lut);
 	state->color_mgmt_changed = false;
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state);
@@ -3557,6 +3559,7 @@ void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state)
 
 	drm_property_unreference_blob(state->degamma_lut);
 	drm_property_unreference_blob(state->ctm);
+	drm_property_unreference_blob(state->gamma_lut);
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state);
 
drivers/gpu/drm/drm_plane.c +23 -0
index e635b63..b837020 100644
@@ -490,6 +490,15 @@ int drm_mode_plane_set_obj_prop(struct drm_plane *plane,
  *	Blob property which allows a userspace to provide CTM coefficients
  *	to do color space conversion or any other enhancement by doing a
  *	matrix multiplication using the h/w CTM processing engine
+ *
+ * gamma_lut_property:
+ *	Blob property which allows a userspace to provide LUT values
+ *	to apply gamma/tone-mapping curve using the h/w plane gamma
+ *	processing engine, thereby making the content as non-linear
+ *	or to perform any tone mapping operation for HDR usecases.
+ *
+ * gamma_lut_size_property:
+ *	Range Property to indicate size of the plane gamma LUT.
  */
 int drm_plane_color_create_prop(struct drm_device *dev,
 				struct drm_plane *plane)
@@ -517,6 +526,20 @@ int drm_plane_color_create_prop(struct drm_device *dev,
 		return -ENOMEM;
 	plane->ctm_property = prop;
 
+	prop = drm_property_create(dev,
+			DRM_MODE_PROP_BLOB,
+			"PLANE_GAMMA_LUT", 0);
+	if (!prop)
+		return -ENOMEM;
+	plane->gamma_lut_property = prop;
+
+	prop = drm_property_create_range(dev,
+			DRM_MODE_PROP_IMMUTABLE,
+			"PLANE_GAMMA_LUT_SIZE", 0, UINT_MAX);
+	if (!prop)
+		return -ENOMEM;
+	plane->gamma_lut_size_property = prop;
+
 	return 0;
 }
 EXPORT_SYMBOL(drm_plane_color_create_prop);
include/drm/drm_plane.h +24 -0
index 35535c5..9a420fe 100644
@@ -155,6 +155,15 @@ struct drm_plane_state {
 	struct drm_property_blob *ctm;
 
 	/**
+	 * @gamma_lut:
+	 *
+	 * Lookup table for converting pixel data after 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 *gamma_lut;
+
+	/**
 	 * @commit: Tracks the pending commit to prevent use-after-free conditions,
 	 * and for async plane updates.
 	 *
@@ -520,6 +529,8 @@ enum drm_plane_type {
  * @degamma_lut_property: Property for plane degamma LUT
  * @degamma_lut_size_property: Property for size of plane degamma LUT
  * @ctm_property: Property for plane CTM matrix
+ * @gamma_lut_property: Property for plane gamma LUT
+ * @gamma_lut_size_property: Property for size of plane gamma LUT
  */
 struct drm_plane {
 	struct drm_device *dev;
@@ -630,6 +641,19 @@ struct drm_plane {
 	 * degamma LUT.
 	 */
 	struct drm_property *ctm_property;
+
+	/**
+	 * @plane_gamma_lut_property: Optional Plane property to set the LUT
+	 * used to convert the colors, after the CTM matrix, to the common
+	 * gamma space chosen for blending.
+	 */
+	struct drm_property *gamma_lut_property;
+
+	/**
+	 * @plane_gamma_lut_size_property: Optional Plane property for the size
+	 * of the gamma LUT as supported by the driver (read-only).
+	 */
+	struct drm_property *gamma_lut_size_property;
 };
 
 #define obj_to_plane(x) container_of(x, struct drm_plane, base)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

RFC v3 5/8 drm: Define helper function for plane color enabling

In reply to Uma Shankar

Define helper function to enable Plane color features to attach plane color properties to plane structure.

v2: Rebase

v3: Modiefied the function to use updated property names.

---
 drivers/gpu/drm/drm_plane.c  | 42 ++++++++++++++++++++++++++++++++++++++++++
 include/drm/drm_color_mgmt.h |  5 +++++
 2 files changed, 47 insertions(+)
drivers/gpu/drm/drm_plane.c +42 -0
index b837020..bbf55c5 100644
@@ -144,6 +144,48 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
 }
 
 /**
+ * drm_plane_enable_color_mgmt - enable color management properties
+ * @plane: DRM Plane
+ * @plane_degamma_lut_size: the size of the degamma lut (before CSC)
+ * @plane_has_ctm: whether to attach ctm_property for CSC matrix
+ * @plane_gamma_lut_size: the size of the gamma lut (after CSC)
+ *
+ * This function lets the driver enable the color correction
+ * properties on a plane. This includes 3 degamma, csc and gamma
+ * properties that userspace can set and 2 size properties to inform
+ * the userspace of the lut sizes. Each of the properties are
+ * optional. The gamma and degamma properties are only attached if
+ * their size is not 0 and ctm_property is only attached if has_ctm is
+ * true.
+ */
+void drm_plane_enable_color_mgmt(struct drm_plane *plane,
+				uint plane_degamma_lut_size,
+				bool plane_has_ctm,
+				uint plane_gamma_lut_size)
+{
+	if (plane_degamma_lut_size) {
+		drm_object_attach_property(&plane->base,
+				plane->degamma_lut_property, 0);
+		drm_object_attach_property(&plane->base,
+				plane->degamma_lut_size_property,
+				plane_degamma_lut_size);
+	}
+
+	if (plane_has_ctm)
+		drm_object_attach_property(&plane->base,
+				plane->ctm_property, 0);
+
+	if (plane_gamma_lut_size) {
+		drm_object_attach_property(&plane->base,
+				plane->gamma_lut_property, 0);
+		drm_object_attach_property(&plane->base,
+				plane->gamma_lut_size_property,
+				plane_gamma_lut_size);
+	}
+}
+EXPORT_SYMBOL(drm_plane_enable_color_mgmt);
+
+/**
  * drm_universal_plane_init - Initialize a new universal plane object
  * @dev: DRM device
  * @plane: plane object to init
include/drm/drm_color_mgmt.h +5 -0
index b3b6d30..e220019 100644
@@ -56,4 +56,9 @@ int drm_plane_create_color_properties(struct drm_plane *plane,
 				      u32 supported_ranges,
 				      enum drm_color_encoding default_encoding,
 				      enum drm_color_range default_range);
+
+void drm_plane_enable_color_mgmt(struct drm_plane *plane,
+				 uint plane_degamma_lut_size,
+				 bool plane_has_ctm,
+				 uint plane_gamma_lut_size);
 #endif
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

RFC v3 6/8 drm/i915: Enable plane color features

In reply to Uma Shankar

Enable and initialize plane color features.

v2: Rebase and some cleanup

v3: Updated intel_plane_color_init to call
drm_plane_color_create_prop function, which will
in turn create plane color properties.

---
 drivers/gpu/drm/i915/i915_drv.h          |  5 +++++
 drivers/gpu/drm/i915/intel_color.c       | 14 ++++++++++++++
 drivers/gpu/drm/i915/intel_device_info.h |  5 +++++
 drivers/gpu/drm/i915/intel_drv.h         |  9 +++++++++
 4 files changed, 33 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +5 -0
index 7eec99d7..cfbb0e0 100644
@@ -434,6 +434,11 @@ struct drm_i915_display_funcs {
 
 	void (*load_csc_matrix)(struct drm_crtc_state *crtc_state);
 	void (*load_luts)(struct drm_crtc_state *crtc_state);
+	/* Add Plane Color callbacks */
+	void (*load_plane_csc_matrix)(const struct drm_plane_state
+				      *plane_state);
+	void (*load_plane_luts)(const struct drm_plane_state
+				*plane_state);
 };
 
 #define CSR_VERSION(major, minor)	((major) << 16 | (minor))
drivers/gpu/drm/i915/intel_color.c +14 -0
index 89ab0f7..2d38ab8 100644
@@ -648,6 +648,20 @@ int intel_color_check(struct drm_crtc *crtc,
 	return -EINVAL;
 }
 
+void intel_plane_color_init(struct drm_plane *plane)
+{
+	struct drm_i915_private *dev_priv = to_i915(plane->dev);
+
+	drm_plane_color_create_prop(plane->dev, plane);
+
+	/* Enable color management support when we have degamma & gamma LUTs. */
+	if (INTEL_INFO(dev_priv)->plane_color.plane_degamma_lut_size != 0 &&
+	    INTEL_INFO(dev_priv)->plane_color.plane_gamma_lut_size != 0)
+		drm_plane_enable_color_mgmt(plane,
+		INTEL_INFO(dev_priv)->plane_color.plane_degamma_lut_size,
+		true, INTEL_INFO(dev_priv)->plane_color.plane_gamma_lut_size);
+}
+
 void intel_color_init(struct drm_crtc *crtc)
 {
 	struct drm_i915_private *dev_priv = to_i915(crtc->dev);
drivers/gpu/drm/i915/intel_device_info.h +5 -0
index ab5bfd3..d277926 100644
@@ -167,6 +167,11 @@ struct intel_device_info {
 		u16 degamma_lut_size;
 		u16 gamma_lut_size;
 	} color;
+
+	struct plane_color_luts {
+		u16 plane_degamma_lut_size;
+		u16 plane_gamma_lut_size;
+	} plane_color;
 };
 
 struct intel_driver_caps {
drivers/gpu/drm/i915/intel_drv.h +9 -0
index 1a7c5ad..0a58fce 100644
@@ -529,6 +529,14 @@ struct intel_plane_state {
 	 */
 	int scaler_id;
 
+	/*
+	 * Use reduced/limited/broadcast rbg range, compressing from the full
+	 * range fed into the crtcs.
+	 */
+	bool limited_color_range;
+	/* Gamma mode programmed on the plane */
+	uint32_t gamma_mode;
+
 	struct drm_intel_sprite_colorkey ckey;
 };
 
@@ -2123,6 +2131,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
 int intel_color_check(struct drm_crtc *crtc, struct drm_crtc_state *state);
 void intel_color_set_csc(struct drm_crtc_state *crtc_state);
 void intel_color_load_luts(struct drm_crtc_state *crtc_state);
+void intel_plane_color_init(struct drm_plane *plane);
 
 /* intel_lspcon.c */
 bool lspcon_init(struct intel_digital_port *intel_dig_port);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw

RFC v3 7/8 drm/i915: Implement Plane Gamma for Bdw and Gen9 platforms

In reply to Uma Shankar

Implement Plane Gamma feature for BDW and Gen9 platforms.

v2: Used newly added drm_color_lut_ext structure for enhanced precision for Gamma LUT entries.

---
 drivers/gpu/drm/i915/i915_pci.c      |  5 +++-
 drivers/gpu/drm/i915/i915_reg.h      | 24 +++++++++++++++
 drivers/gpu/drm/i915/intel_color.c   | 58 ++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_display.c |  4 +++
 drivers/gpu/drm/i915/intel_sprite.c  |  4 +++
 5 files changed, 94 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_pci.c +4 -1
index 26e8f5c..c14b8f3 100644
@@ -54,7 +54,10 @@
 	.cursor_offsets = { CURSOR_A_OFFSET, IVB_CURSOR_B_OFFSET, IVB_CURSOR_C_OFFSET }
 
 #define BDW_COLORS \
-	.color = { .degamma_lut_size = 512, .gamma_lut_size = 512 }
+	.color = { .degamma_lut_size = 512, .gamma_lut_size = 512 }, \
+	.plane_color = { .plane_degamma_lut_size = 0, \
+			 .plane_gamma_lut_size = 16 }
+
 #define CHV_COLORS \
 	.color = { .degamma_lut_size = 65, .gamma_lut_size = 257 }
 #define GLK_COLORS \
drivers/gpu/drm/i915/i915_reg.h +24 -0
index 258e86e..385c3fc 100644
@@ -159,6 +159,9 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
 #define _PHY3(phy, ...) _PICK(phy, __VA_ARGS__)
 #define _MMIO_PHY3(phy, a, b, c) _MMIO(_PHY3(phy, a, b, c))
 
+#define _MMIO_PLANE_GAMC(plane, i, a, b)  _MMIO(_PIPE(plane, a, b) + (i) * 4)
+#define _MMIO_PLANE_GAMC16(plane, i, a, b)  _MMIO(_PIPE(plane, a, b) + (i) * 4)
+
 #define _MASKED_FIELD(mask, value) ({					   \
 	if (__builtin_constant_p(mask))					   \
 		BUILD_BUG_ON_MSG(((mask) & 0xffff0000), "Incorrect mask"); \
@@ -9142,6 +9145,27 @@ enum skl_power_gate {
 #define PRE_CSC_GAMC_INDEX(pipe)	_MMIO_PIPE(pipe, _PRE_CSC_GAMC_INDEX_A, _PRE_CSC_GAMC_INDEX_B)
 #define PRE_CSC_GAMC_DATA(pipe)		_MMIO_PIPE(pipe, _PRE_CSC_GAMC_DATA_A, _PRE_CSC_GAMC_DATA_B)
 
+/* Plane Gamma in Gen9+ */
+#define _PLANE_GAMC_1_A	0x701d0
+#define _PLANE_GAMC_1_B	0x711d0
+#define _PLANE_GAMC_2_A	0x702d0
+#define _PLANE_GAMC_2_B	0x712d0
+#define _PLANE_GAMC_1(pipe)	_PIPE(pipe, _PLANE_GAMC_1_A, _PLANE_GAMC_1_B)
+#define _PLANE_GAMC_2(pipe)	_PIPE(pipe, _PLANE_GAMC_2_A, _PLANE_GAMC_2_B)
+#define PLANE_GAMC(pipe, plane, i)	\
+	_MMIO_PLANE_GAMC(plane, i, _PLANE_GAMC_1(pipe), _PLANE_GAMC_2(pipe))
+
+#define _PLANE_GAMC16_1_A	0x70210
+#define _PLANE_GAMC16_1_B	0x71210
+#define _PLANE_GAMC16_2_A	0x70310
+#define _PLANE_GAMC16_2_B	0x71310
+#define _PLANE_GAMC16_1(pipe)	_PIPE(pipe, _PLANE_GAMC16_1_A, \
+				     _PLANE_GAMC16_1_B)
+#define _PLANE_GAMC16_2(pipe)	_PIPE(pipe, _PLANE_GAMC16_2_A, \
+				     _PLANE_GAMC16_2_B)
+#define PLANE_GAMC16(pipe, plane, i) _MMIO_PLANE_GAMC16(plane, i, \
+				_PLANE_GAMC16_1(pipe), _PLANE_GAMC16_2(pipe))
+
 /* pipe CSC & degamma/gamma LUTs on CHV */
 #define _CGM_PIPE_A_CSC_COEFF01	(VLV_DISPLAY_BASE + 0x67900)
 #define _CGM_PIPE_A_CSC_COEFF23	(VLV_DISPLAY_BASE + 0x67904)
drivers/gpu/drm/i915/intel_color.c +58 -0

70 lines not on this page · raw message

drivers/gpu/drm/i915/intel_display.c +4 -0
index fb08590..43c8936 100644
@@ -13404,6 +13404,10 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv,
 						  DRM_COLOR_YCBCR_BT709,
 						  DRM_COLOR_YCBCR_LIMITED_RANGE);
 
+	/* Add Plane Color properties */
+	if (IS_BROADWELL(dev_priv) || INTEL_GEN(dev_priv) >= 9)
+		intel_plane_color_init(&primary->base);
+
 	drm_plane_helper_add(&primary->base, &intel_plane_helper_funcs);
 
 	return primary;
drivers/gpu/drm/i915/intel_sprite.c +4 -0
index dbdcf85..814b8bb 100644
@@ -1543,6 +1543,10 @@ struct intel_plane *
 					  DRM_COLOR_YCBCR_BT709,
 					  DRM_COLOR_YCBCR_LIMITED_RANGE);
 
+	/* Add Plane Color properties */
+	if (IS_BROADWELL(dev_priv) || INTEL_GEN(dev_priv) >= 9)
+		intel_plane_color_init(&intel_plane->base);
+
 	drm_plane_helper_add(&intel_plane->base, &intel_plane_helper_funcs);
 
 	return intel_plane;
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#8 lore raw

RFC v3 8/8 drm/i915: Load plane color luts from atomic flip

In reply to Uma Shankar

Load plane color luts as part of atomic plane updates. This will be done only if the plane color luts are changed.

---
 drivers/gpu/drm/i915/intel_atomic_plane.c | 4 ++++
 drivers/gpu/drm/i915/intel_color.c        | 8 ++++++++
 drivers/gpu/drm/i915/intel_drv.h          | 1 +
 3 files changed, 13 insertions(+)
drivers/gpu/drm/i915/intel_atomic_plane.c +4 -0
index 7481ce8..e519eab 100644
@@ -231,6 +231,10 @@ static void intel_plane_atomic_update(struct drm_plane *plane,
 		intel_atomic_get_new_plane_state(state, intel_plane);
 	struct drm_crtc *crtc = new_plane_state->base.crtc ?: old_state->crtc;
 
+	if (new_plane_state->base.color_mgmt_changed) {
+		intel_color_load_plane_luts(&new_plane_state->base);
+	}
+
 	if (new_plane_state->base.visible) {
 		const struct intel_crtc_state *new_crtc_state =
 			intel_atomic_get_new_crtc_state(state, to_intel_crtc(crtc));
drivers/gpu/drm/i915/intel_color.c +8 -0
index a40fafa..f67115b 100644
@@ -670,6 +670,14 @@ void intel_color_load_luts(struct drm_crtc_state *crtc_state)
 	dev_priv->display.load_luts(crtc_state);
 }
 
+void intel_color_load_plane_luts(const struct drm_plane_state *plane_state)
+{
+	struct drm_device *dev = plane_state->plane->dev;
+	struct drm_i915_private *dev_priv = to_i915(dev);
+
+	dev_priv->display.load_plane_luts(plane_state);
+}
+
 int intel_color_check(struct drm_crtc *crtc,
 		      struct drm_crtc_state *crtc_state)
 {
drivers/gpu/drm/i915/intel_drv.h +1 -0
index 0a58fce..1da5a35 100644
@@ -2132,6 +2132,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
 void intel_color_set_csc(struct drm_crtc_state *crtc_state);
 void intel_color_load_luts(struct drm_crtc_state *crtc_state);
 void intel_plane_color_init(struct drm_plane *plane);
+void intel_color_load_plane_luts(const struct drm_plane_state *plane_state);
 
 /* intel_lspcon.c */
 bool lspcon_init(struct intel_digital_port *intel_dig_port);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw

✗ Fi.CI.SPARSE: warning for Add Plane Color Properties (rev3)

In reply to Uma Shankar
== Series Details ==

== Series Details ==

Series: Add Plane Color Properties (rev3)
URL : https://patchwork.freedesktop.org/series/30875/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm: Add Enhanced Gamma LUT precision structure
+drivers/gpu/drm/drm_plane.c:433:10: warning: symbol 'drm_color_lut_extract_ext' was not declared. Should it be static?

Commit: drm: Add Plane Degamma properties
Okay!

Commit: drm: Add Plane CTM property
Okay!

Commit: drm: Add Plane Gamma properties
Okay!

Commit: drm: Define helper function for plane color enabling Okay!

Commit: drm/i915: Enable plane color features
Okay!

Commit: drm/i915: Implement Plane Gamma for Bdw and Gen9 platforms Okay!

Commit: drm/i915: Load plane color luts from atomic flip Okay!

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw

✓ Fi.CI.BAT: success for Add Plane Color Properties (rev3)

In reply to Uma Shankar
== Series Details ==

== Series Details ==

Series: Add Plane Color Properties (rev3)
URL : https://patchwork.freedesktop.org/series/30875/
State : success

== Summary ==

Series 30875v3 Add Plane Color Properties
https://patchwork.freedesktop.org/api/1.0/series/30875/revisions/3/mbox/

---- Known issues:

Test kms_frontbuffer_tracking:

        Subgroup basic:
                pass       -> FAIL       (fi-cnl-y3) fdo#103167

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:426s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:427s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:375s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:508s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:279s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:495s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:490s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:484s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:471s
fi-cfl-8700k     total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:407s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:576s
fi-cnl-y3        total:288  pass:261  dwarn:0   dfail:0   fail:1   skip:26  time:582s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:411s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:289s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:520s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:402s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:416s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:458s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:417s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:468s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:465s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:508s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:589s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:431s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:521s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:535s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:505s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:483s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:425s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:433s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:401s
Blacklisted hosts:
fi-cfl-u         total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:506s
fi-cnl-drrs      total:288  pass:257  dwarn:3   dfail:0   fail:0   skip:19  time:515s

2e2ef5a5221a7469ecd72c68ed15dd8b94e2e0c6 drm-tip: 2018y-03m-09d-14h-28m-10s UTC integration manifest f68e8e8bf982 drm/i915: Load plane color luts from atomic flip
c78c5ef1ab64 drm/i915: Implement Plane Gamma for Bdw and Gen9 platforms
d950a92e81f3 drm/i915: Enable plane color features
2ef90e536d90 drm: Define helper function for plane color enabling
25248846877a drm: Add Plane Gamma properties
a3b85657b9c9 drm: Add Plane CTM property
f7fc900392ed drm: Add Plane Degamma properties
09fc571cdbfc drm: Add Enhanced Gamma LUT precision structure

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8297/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#11 lore raw

✗ Fi.CI.IGT: failure for Add Plane Color Properties (rev3)

In reply to Uma Shankar
== Series Details ==

== Series Details ==

Series: Add Plane Color Properties (rev3)
URL : https://patchwork.freedesktop.org/series/30875/
State : failure

== Summary ==

---- Possible new issues:

Test kms_frontbuffer_tracking:

        Subgroup fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
                pass       -> DMESG-FAIL (shard-hsw)

---- Known issues:

Test gem_eio:

        Subgroup in-flight:
                incomplete -> PASS       (shard-apl) fdo#105341 +1
Test kms_flip:
        Subgroup plain-flip-ts-check-interruptible:
                fail       -> PASS       (shard-hsw) fdo#100368 +1
Test kms_sysfs_edid_timing:
                pass       -> WARN       (shard-apl) fdo#100047

fdo#105341 https://bugs.freedesktop.org/show_bug.cgi?id=105341
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047

shard-apl        total:3467 pass:1825 dwarn:1   dfail:0   fail:8   skip:1632 time:12253s
shard-hsw        total:3467 pass:1770 dwarn:1   dfail:1   fail:2   skip:1692 time:11436s
shard-snb        total:3467 pass:1365 dwarn:1   dfail:0   fail:1   skip:2100 time:6926s

Blacklisted hosts:
shard-kbl total:3398 pass:1907 dwarn:7 dfail:1 fail:6 skip:1476 time:8953s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8297/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#12 lore raw
In reply to Uma Shankar

Hi Uma,

Quoted 6 lines · Uma Shankar

Note: This is just to get a design feedback whether these interfaces look ok. Based on community feedback on interfaces, we will implement IGT tests to validate plane color features. This is un-tested currently. Also, userspace implementation to use these properties is currently not available.

A few suggestions as you get to writing the documentation/tests:
- make it clear what the behaviour should be when userspace sets both
plane and crtc degamma/gamma/ctm
- add tests to ensure ^^ holds true

Another small suggestion:
- document color_mgmt_changed, and perhaps split it out out into a
separate patch

That said, things look ok, although others should also take a look. Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
In reply to Uma Shankar

Hi Uma,

Any progress on userspace for this?
I was thinking on working on using this in drm_hwcomposer.

Thank you,
Alex Gheorghe

Quoted 68 lines · Uma Shankar

This patch series adds properties for plane color features. It adds properties for degamma used to linearize data, CSC used for gamut conversion, and gamma used to again non-linearize data as per panel supported color space. These can be utilize by user space to convert planes from one format to another, one color space to another etc.

Usersapce can take smart blending decisions and utilize these hardware supported plane color features to get accurate color profile. The same can help in consistent color quality from source to panel taking advantage of advanced color features in hardware.

These patches just add the property interfaces and enable helper functions.

This series adds Intel Gen9 specific plane gamma feature. We can build up and add other platform/hardware specific implementation on top of this series

Note: This is just to get a design feedback whether these interfaces look ok. Based on community feedback on interfaces, we will implement IGT tests to validate plane color features. This is un-tested currently. Also, userspace implementation to use these properties is currently not available.

v2: Dropped legacy gamma table for plane as suggested by Maarten. Added Gen9/BDW plane gamma feature and rebase on tot.

v3: Added a new drm_color_lut_ext structure to accommodate 32 bit precision entries, pointed to by Brian, Starkey for HDR usecases. Addressed Sean,Paul comments and moved plane color properties to drm_plane instead of mode_config. Added property documentation as suggested by Daniel, Vetter. Fixed a rebase fumble which occurred in v2, pointed by Emil Velikov.

Uma Shankar (8):
drm: Add Enhanced Gamma LUT precision structure
drm: Add Plane Degamma properties
drm: Add Plane CTM property
drm: Add Plane Gamma properties
drm: Define helper function for plane color enabling drm/i915: Enable plane color features
drm/i915: Implement Plane Gamma for Bdw and Gen9 platforms drm/i915: Load plane color luts from atomic flip

 Documentation/gpu/drm-kms.rst             |  18 ++++
 drivers/gpu/drm/drm_atomic.c              |  30 +++++++
 drivers/gpu/drm/drm_atomic_helper.c       |  12 +++
 drivers/gpu/drm/drm_plane.c               | 131 ++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_drv.h           |   5 ++
 drivers/gpu/drm/i915/i915_pci.c           |   5 +-
 drivers/gpu/drm/i915/i915_reg.h           |  24 ++++++
 drivers/gpu/drm/i915/intel_atomic_plane.c |   4 +
 drivers/gpu/drm/i915/intel_color.c        |  80 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_device_info.h  |   5 ++
 drivers/gpu/drm/i915/intel_display.c      |   4 +
 drivers/gpu/drm/i915/intel_drv.h          |  10 +++
 drivers/gpu/drm/i915/intel_sprite.c       |   4 +
 include/drm/drm_color_mgmt.h              |   5 ++
 include/drm/drm_plane.h                   |  66 +++++++++++++++
 include/uapi/drm/drm_mode.h               |  15 ++++
 16 files changed, 417 insertions(+), 1 deletion(-)
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Cheers,
Alex G
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#14 lore raw
Quoted 13 lines

-----Original Message-----
From: dri-devel [mailto:[email protected]] On Behalf Of Alexandru-Cosmin Gheorghe
Sent: Monday, June 11, 2018 3:47 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Syrjala, Ville <[email protected]>; [email protected]; Lankhorst, Maarten <[email protected]>
Subject: Re: [RFC v3 0/8] Add Plane Color Properties

Quoted 5 lines

Hi Uma,

Any progress on userspace for this?
I was thinking on working on using this in drm_hwcomposer.

Hi Alex,
Not much work has been done till now on user space side. You can go ahead and try to enable it in drm_hwcomposer.

Regards,
Uma Shankar

Quoted 75 lines

Thank you,
Alex Gheorghe

Quoted 24 lines · Uma Shankar

This patch series adds properties for plane color features. It adds properties for degamma used to linearize data, CSC used for gamut conversion, and gamma used to again non-linearize data as per panel supported color space. These can be utilize by user space to convert planes from one format to another, one color space to another etc.

Usersapce can take smart blending decisions and utilize these hardware supported plane color features to get accurate color profile. The same can help in consistent color quality from source to panel taking advantage of advanced color features in hardware.

These patches just add the property interfaces and enable helper functions.

This series adds Intel Gen9 specific plane gamma feature. We can build up and add other platform/hardware specific implementation on top of this series

Note: This is just to get a design feedback whether these interfaces look ok. Based on community feedback on interfaces, we will implement IGT tests to validate plane color features. This is un-tested currently. Also, userspace implementation to use these properties is currently not available.

Quoted 7 lines

v2: Dropped legacy gamma table for plane as suggested by Maarten. Added Gen9/BDW plane gamma feature and rebase on tot.

v3: Added a new drm_color_lut_ext structure to accommodate 32 bit precision entries, pointed to by Brian, Starkey for HDR usecases. Addressed Sean,Paul comments and moved plane color properties to drm_plane instead of mode_config. Added property documentation as

suggested by Daniel, Vetter.

Quoted 12 lines

Fixed a rebase fumble which occurred in v2, pointed by Emil Velikov.

Uma Shankar (8):
drm: Add Enhanced Gamma LUT precision structure
drm: Add Plane Degamma properties
drm: Add Plane CTM property
drm: Add Plane Gamma properties
drm: Define helper function for plane color enabling drm/i915: Enable plane color features
drm/i915: Implement Plane Gamma for Bdw and Gen9 platforms drm/i915: Load plane color luts from atomic flip

Quoted 4 lines
 Documentation/gpu/drm-kms.rst             |  18 ++++
 drivers/gpu/drm/drm_atomic.c              |  30 +++++++
 drivers/gpu/drm/drm_atomic_helper.c       |  12 +++
 drivers/gpu/drm/drm_plane.c               | 131

++++++++++++++++++++++++++++++

Quoted 14 lines
 drivers/gpu/drm/i915/i915_drv.h           |   5 ++
 drivers/gpu/drm/i915/i915_pci.c           |   5 +-
 drivers/gpu/drm/i915/i915_reg.h           |  24 ++++++
 drivers/gpu/drm/i915/intel_atomic_plane.c |   4 +
 drivers/gpu/drm/i915/intel_color.c        |  80 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_device_info.h  |   5 ++
 drivers/gpu/drm/i915/intel_display.c      |   4 +
 drivers/gpu/drm/i915/intel_drv.h          |  10 +++
 drivers/gpu/drm/i915/intel_sprite.c       |   4 +
 include/drm/drm_color_mgmt.h              |   5 ++
 include/drm/drm_plane.h                   |  66 +++++++++++++++
 include/uapi/drm/drm_mode.h               |  15 ++++
 16 files changed, 417 insertions(+), 1 deletion(-)
Quoted 7 lines

--
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Quoted 7 lines

--
Cheers,
Alex G
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#15 lore raw
Quoted 15 lines · Uma
Quoted 15 lines

-----Original Message-----
From: dri-devel [mailto:[email protected]] On Behalf Of Alexandru-Cosmin Gheorghe
Sent: Monday, June 11, 2018 3:47 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Syrjala, Ville <[email protected]>; [email protected]; Lankhorst, Maarten <[email protected]>
Subject: Re: [RFC v3 0/8] Add Plane Color Properties

Hi Uma,

Quoted 8 lines
Quoted 3 lines

Any progress on userspace for this?
I was thinking on working on using this in drm_hwcomposer.

Hi Alex,
Not much work has been done till now on user space side. You can go ahead and try to enable it in drm_hwcomposer.

Hi,

I'm missing the hardware/driver that can do all three operations DEGAMMA, CSC, GAMMA for now, any chance you have a setup env with drm_hwcomposer and you would have time to help me with some testing after I would be writing the code ?

Thank you,
Alex Gheorghe

Quoted 85 lines

Regards,
Uma Shankar

Quoted 82 lines

Thank you,
Alex Gheorghe

Quoted 24 lines · Uma Shankar

This patch series adds properties for plane color features. It adds properties for degamma used to linearize data, CSC used for gamut conversion, and gamma used to again non-linearize data as per panel supported color space. These can be utilize by user space to convert planes from one format to another, one color space to another etc.

Usersapce can take smart blending decisions and utilize these hardware supported plane color features to get accurate color profile. The same can help in consistent color quality from source to panel taking advantage of advanced color features in hardware.

These patches just add the property interfaces and enable helper functions.

This series adds Intel Gen9 specific plane gamma feature. We can build up and add other platform/hardware specific implementation on top of this series

Note: This is just to get a design feedback whether these interfaces look ok. Based on community feedback on interfaces, we will implement IGT tests to validate plane color features. This is un-tested currently. Also, userspace implementation to use these properties is currently not available.

Quoted 7 lines

v2: Dropped legacy gamma table for plane as suggested by Maarten. Added Gen9/BDW plane gamma feature and rebase on tot.

v3: Added a new drm_color_lut_ext structure to accommodate 32 bit precision entries, pointed to by Brian, Starkey for HDR usecases. Addressed Sean,Paul comments and moved plane color properties to drm_plane instead of mode_config. Added property documentation as

suggested by Daniel, Vetter.

Quoted 12 lines

Fixed a rebase fumble which occurred in v2, pointed by Emil Velikov.

Uma Shankar (8):
drm: Add Enhanced Gamma LUT precision structure
drm: Add Plane Degamma properties
drm: Add Plane CTM property
drm: Add Plane Gamma properties
drm: Define helper function for plane color enabling drm/i915: Enable plane color features
drm/i915: Implement Plane Gamma for Bdw and Gen9 platforms drm/i915: Load plane color luts from atomic flip

Quoted 4 lines
 Documentation/gpu/drm-kms.rst             |  18 ++++
 drivers/gpu/drm/drm_atomic.c              |  30 +++++++
 drivers/gpu/drm/drm_atomic_helper.c       |  12 +++
 drivers/gpu/drm/drm_plane.c               | 131

++++++++++++++++++++++++++++++

Quoted 14 lines
 drivers/gpu/drm/i915/i915_drv.h           |   5 ++
 drivers/gpu/drm/i915/i915_pci.c           |   5 +-
 drivers/gpu/drm/i915/i915_reg.h           |  24 ++++++
 drivers/gpu/drm/i915/intel_atomic_plane.c |   4 +
 drivers/gpu/drm/i915/intel_color.c        |  80 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_device_info.h  |   5 ++
 drivers/gpu/drm/i915/intel_display.c      |   4 +
 drivers/gpu/drm/i915/intel_drv.h          |  10 +++
 drivers/gpu/drm/i915/intel_sprite.c       |   4 +
 include/drm/drm_color_mgmt.h              |   5 ++
 include/drm/drm_plane.h                   |  66 +++++++++++++++
 include/uapi/drm/drm_mode.h               |  15 ++++
 16 files changed, 417 insertions(+), 1 deletion(-)
Quoted 7 lines

--
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

--
Cheers,
Alex G
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 6 lines
Cheers,
Alex G
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#16 lore raw
Quoted 38 lines

-----Original Message-----
From: Alexandru-Cosmin Gheorghe [mailto:Alexandru- [email protected]]
Sent: Thursday, June 14, 2018 6:21 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Syrjala, Ville <[email protected]>; [email protected]; Lankhorst, Maarten <[email protected]>
Subject: Re: [RFC v3 0/8] Add Plane Color Properties

Quoted 15 lines · Uma
Quoted 15 lines

-----Original Message-----
From: dri-devel [mailto:[email protected]] On Behalf Of Alexandru-Cosmin Gheorghe
Sent: Monday, June 11, 2018 3:47 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Syrjala, Ville <[email protected]>; [email protected]; Lankhorst, Maarten <[email protected]>
Subject: Re: [RFC v3 0/8] Add Plane Color Properties

Hi Uma,

Quoted 8 lines
Quoted 3 lines

Any progress on userspace for this?
I was thinking on working on using this in drm_hwcomposer.

Hi Alex,
Not much work has been done till now on user space side. You can go ahead and try to enable it in drm_hwcomposer.

Quoted 7 lines

Hi,

I'm missing the hardware/driver that can do all three operations DEGAMMA, CSC, GAMMA for now, any chance you have a setup env with drm_hwcomposer and you would have time to help me with some testing after I would be writing the code ?

I can help with testing this out in some of our intel platforms. Will implement the platform hooks for the same.

Let me know once you have the hwc changes ready.

Regards,
Uma Shankar

Quoted 71 lines

Thank you,
Alex Gheorghe

Quoted 16 lines
Quoted 16 lines · Uma Shankar
Quoted 14 lines

This patch series adds properties for plane color features. It adds properties for degamma used to linearize data, CSC used for gamut conversion, and gamma used to again non-linearize data as per panel supported color space. These can be utilize by user space to convert planes from one format to another, one color space to another etc.

Usersapce can take smart blending decisions and utilize these hardware supported plane color features to get accurate color profile. The same can help in consistent color quality from source to panel taking advantage of advanced color features in hardware.

These patches just add the property interfaces and enable helper functions.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

This series adds Intel Gen9 specific plane gamma feature. We can build up and add other platform/hardware specific implementation on top of this series

Note: This is just to get a design feedback whether these interfaces look ok. Based on community feedback on interfaces, we will implement IGT tests to validate plane color features. This is un-tested

currently.

Quoted 44 lines
Quoted 44 lines
Quoted 10 lines

Also, userspace implementation to use these properties is currently not available.

v2: Dropped legacy gamma table for plane as suggested by Maarten. Added Gen9/BDW plane gamma feature and rebase on tot.

v3: Added a new drm_color_lut_ext structure to accommodate 32 bit precision entries, pointed to by Brian, Starkey for HDR usecases. Addressed Sean,Paul comments and moved plane color properties to drm_plane instead of mode_config. Added property documentation as

suggested by Daniel, Vetter.

Quoted 12 lines

Fixed a rebase fumble which occurred in v2, pointed by Emil Velikov.

Uma Shankar (8):
drm: Add Enhanced Gamma LUT precision structure
drm: Add Plane Degamma properties
drm: Add Plane CTM property
drm: Add Plane Gamma properties
drm: Define helper function for plane color enabling drm/i915: Enable plane color features
drm/i915: Implement Plane Gamma for Bdw and Gen9 platforms drm/i915: Load plane color luts from atomic flip

Quoted 4 lines
 Documentation/gpu/drm-kms.rst             |  18 ++++
 drivers/gpu/drm/drm_atomic.c              |  30 +++++++
 drivers/gpu/drm/drm_atomic_helper.c       |  12 +++
 drivers/gpu/drm/drm_plane.c               | 131

++++++++++++++++++++++++++++++

Quoted 16 lines
 drivers/gpu/drm/i915/i915_drv.h           |   5 ++
 drivers/gpu/drm/i915/i915_pci.c           |   5 +-
 drivers/gpu/drm/i915/i915_reg.h           |  24 ++++++
 drivers/gpu/drm/i915/intel_atomic_plane.c |   4 +
 drivers/gpu/drm/i915/intel_color.c        |  80 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_device_info.h  |   5 ++
 drivers/gpu/drm/i915/intel_display.c      |   4 +
 drivers/gpu/drm/i915/intel_drv.h          |  10 +++
 drivers/gpu/drm/i915/intel_sprite.c       |   4 +
 include/drm/drm_color_mgmt.h              |   5 ++
 include/drm/drm_plane.h                   |  66 +++++++++++++++
 include/uapi/drm/drm_mode.h               |  15 ++++
 16 files changed, 417 insertions(+), 1 deletion(-)

--
1.9.1

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

--
Cheers,
Alex G

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw
In reply to Shankar, Uma

Hi Uma,

Quoted 19 lines · Uma
Quoted 13 lines

-----Original Message-----
From: dri-devel [mailto:[email protected]] On Behalf Of Alexandru-Cosmin Gheorghe
Sent: Monday, June 11, 2018 3:47 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Syrjala, Ville <[email protected]>; [email protected]; Lankhorst, Maarten <[email protected]>
Subject: Re: [RFC v3 0/8] Add Plane Color Properties

Quoted 5 lines

Hi Uma,

Any progress on userspace for this?
I was thinking on working on using this in drm_hwcomposer.

Quoted 7 lines

Hi Alex,
Not much work has been done till now on user space side. You can go ahead and try to enable it in drm_hwcomposer.

Regards,
Uma Shankar

I opened a Merge request in drm_hwcomposer, if you have time please have a look and let me know what you think.
[1] https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/merge_requests/25

Quoted 82 lines
Quoted 82 lines

Thank you,
Alex Gheorghe

Quoted 24 lines · Uma Shankar

This patch series adds properties for plane color features. It adds properties for degamma used to linearize data, CSC used for gamut conversion, and gamma used to again non-linearize data as per panel supported color space. These can be utilize by user space to convert planes from one format to another, one color space to another etc.

Usersapce can take smart blending decisions and utilize these hardware supported plane color features to get accurate color profile. The same can help in consistent color quality from source to panel taking advantage of advanced color features in hardware.

These patches just add the property interfaces and enable helper functions.

This series adds Intel Gen9 specific plane gamma feature. We can build up and add other platform/hardware specific implementation on top of this series

Note: This is just to get a design feedback whether these interfaces look ok. Based on community feedback on interfaces, we will implement IGT tests to validate plane color features. This is un-tested currently. Also, userspace implementation to use these properties is currently not available.

Quoted 7 lines

v2: Dropped legacy gamma table for plane as suggested by Maarten. Added Gen9/BDW plane gamma feature and rebase on tot.

v3: Added a new drm_color_lut_ext structure to accommodate 32 bit precision entries, pointed to by Brian, Starkey for HDR usecases. Addressed Sean,Paul comments and moved plane color properties to drm_plane instead of mode_config. Added property documentation as

suggested by Daniel, Vetter.

Quoted 12 lines

Fixed a rebase fumble which occurred in v2, pointed by Emil Velikov.

Uma Shankar (8):
drm: Add Enhanced Gamma LUT precision structure
drm: Add Plane Degamma properties
drm: Add Plane CTM property
drm: Add Plane Gamma properties
drm: Define helper function for plane color enabling drm/i915: Enable plane color features
drm/i915: Implement Plane Gamma for Bdw and Gen9 platforms drm/i915: Load plane color luts from atomic flip

Quoted 4 lines
 Documentation/gpu/drm-kms.rst             |  18 ++++
 drivers/gpu/drm/drm_atomic.c              |  30 +++++++
 drivers/gpu/drm/drm_atomic_helper.c       |  12 +++
 drivers/gpu/drm/drm_plane.c               | 131

++++++++++++++++++++++++++++++

Quoted 14 lines
 drivers/gpu/drm/i915/i915_drv.h           |   5 ++
 drivers/gpu/drm/i915/i915_pci.c           |   5 +-
 drivers/gpu/drm/i915/i915_reg.h           |  24 ++++++
 drivers/gpu/drm/i915/intel_atomic_plane.c |   4 +
 drivers/gpu/drm/i915/intel_color.c        |  80 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_device_info.h  |   5 ++
 drivers/gpu/drm/i915/intel_display.c      |   4 +
 drivers/gpu/drm/i915/intel_drv.h          |  10 +++
 drivers/gpu/drm/i915/intel_sprite.c       |   4 +
 include/drm/drm_color_mgmt.h              |   5 ++
 include/drm/drm_plane.h                   |  66 +++++++++++++++
 include/uapi/drm/drm_mode.h               |  15 ++++
 16 files changed, 417 insertions(+), 1 deletion(-)
Quoted 7 lines

--
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

--
Cheers,
Alex G
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 6 lines
Cheers,
Alex G
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#18 lore raw
Quoted 39 lines

-----Original Message-----
From: Alexandru-Cosmin Gheorghe [mailto:Alexandru- [email protected]]
Sent: Thursday, July 12, 2018 10:02 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Syrjala, Ville <[email protected]>; [email protected]; Lankhorst, Maarten <[email protected]>
Subject: Re: [RFC v3 0/8] Add Plane Color Properties

Hi Uma,

Quoted 23 lines · Uma
Quoted 13 lines

-----Original Message-----
From: dri-devel [mailto:[email protected]] On Behalf Of Alexandru-Cosmin Gheorghe
Sent: Monday, June 11, 2018 3:47 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Syrjala, Ville <[email protected]>; [email protected]; Lankhorst, Maarten <[email protected]>
Subject: Re: [RFC v3 0/8] Add Plane Color Properties

Quoted 5 lines

Hi Uma,

Any progress on userspace for this?
I was thinking on working on using this in drm_hwcomposer.

Hi Alex,
Not much work has been done till now on user space side. You can go ahead and try to enable it in drm_hwcomposer.

Quoted 9 lines
Quoted 3 lines

Regards,
Uma Shankar

I opened a Merge request in drm_hwcomposer, if you have time please have a look and let me know what you think.
[1] https://gitlab.freedesktop.org/drm-hwcomposer/drm-
hwcomposer/merge_requests/25

Hi Alex,
The changes are inline to what these properties are intended for and looks ok to me. However, it would be good if some compositor experts also review the same from design perspective.

Also we need RB for kernel patches. I hope with the current drm hwcomposer changes, we should be good to get them merge.

Regards,
Uma Shankar

Quoted 84 lines
Quoted 18 lines
Quoted 18 lines

Thank you,
Alex Gheorghe

Quoted 14 lines · Uma Shankar

This patch series adds properties for plane color features. It adds properties for degamma used to linearize data, CSC used for gamut conversion, and gamma used to again non-linearize data as per panel supported color space. These can be utilize by user space to convert planes from one format to another, one color space to another etc.

Usersapce can take smart blending decisions and utilize these hardware supported plane color features to get accurate color profile. The same can help in consistent color quality from source to panel taking advantage of advanced color features in hardware.

These patches just add the property interfaces and enable helper functions.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

This series adds Intel Gen9 specific plane gamma feature. We can build up and add other platform/hardware specific implementation on top of this series

Note: This is just to get a design feedback whether these interfaces look ok. Based on community feedback on interfaces, we will implement IGT tests to validate plane color features. This is un-tested

currently.

Quoted 50 lines
Quoted 50 lines
Quoted 10 lines

Also, userspace implementation to use these properties is currently not available.

v2: Dropped legacy gamma table for plane as suggested by Maarten. Added Gen9/BDW plane gamma feature and rebase on tot.

v3: Added a new drm_color_lut_ext structure to accommodate 32 bit precision entries, pointed to by Brian, Starkey for HDR usecases. Addressed Sean,Paul comments and moved plane color properties to drm_plane instead of mode_config. Added property documentation as

suggested by Daniel, Vetter.

Quoted 12 lines

Fixed a rebase fumble which occurred in v2, pointed by Emil Velikov.

Uma Shankar (8):
drm: Add Enhanced Gamma LUT precision structure
drm: Add Plane Degamma properties
drm: Add Plane CTM property
drm: Add Plane Gamma properties
drm: Define helper function for plane color enabling drm/i915: Enable plane color features
drm/i915: Implement Plane Gamma for Bdw and Gen9 platforms drm/i915: Load plane color luts from atomic flip

Quoted 4 lines
 Documentation/gpu/drm-kms.rst             |  18 ++++
 drivers/gpu/drm/drm_atomic.c              |  30 +++++++
 drivers/gpu/drm/drm_atomic_helper.c       |  12 +++
 drivers/gpu/drm/drm_plane.c               | 131

++++++++++++++++++++++++++++++

Quoted 21 lines
 drivers/gpu/drm/i915/i915_drv.h           |   5 ++
 drivers/gpu/drm/i915/i915_pci.c           |   5 +-
 drivers/gpu/drm/i915/i915_reg.h           |  24 ++++++
 drivers/gpu/drm/i915/intel_atomic_plane.c |   4 +
 drivers/gpu/drm/i915/intel_color.c        |  80 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_device_info.h  |   5 ++
 drivers/gpu/drm/i915/intel_display.c      |   4 +
 drivers/gpu/drm/i915/intel_drv.h          |  10 +++
 drivers/gpu/drm/i915/intel_sprite.c       |   4 +
 include/drm/drm_color_mgmt.h              |   5 ++
 include/drm/drm_plane.h                   |  66 +++++++++++++++
 include/uapi/drm/drm_mode.h               |  15 ++++
 16 files changed, 417 insertions(+), 1 deletion(-)

--
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Quoted 7 lines
Quoted 7 lines

--
Cheers,
Alex G
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Quoted 3 lines

--
Cheers,
Alex G

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx