Skip to contentSkip to conversation

drm/i915/color: Enable SDR plane color pipeline

PATCH Superseded Chaitanya Kumar Borah 5 participants 24 messages Apr 8 – May 18

Subsystems (4)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v2 cover drm/i915/color: Enable SDR plane color pipeline

This series adds color pipeline support for SDR planes in i915 and exposes the functionality to userspace through the DRM colorop framework.

In contrast to HDR planes, SDR planes have LUTs with smaller sizes and a fixed function CSC block in contrast to a programmable CTM.

The series first introduces a new DRM colorop type, DRM_COLOROP_FIXED_MATRIX, which represents fixed-function CSC blocks where userspace selects predefined hardware conversion modes instead of programming arbitrary matrices. It also adds the YUV correction HW block. With this the color pipeline can accept both limited range and full range YUV framebuffers.

With that, the SDR plane color pipeline looks like.

[YUV Range Correct] -> [1D LUT] -> [CSC] -> [1D LUT]

The series also fixes an issue in HDR pre-CSC LUT programming where the loop condition prevented the last entries from being programmed.

v2:
- Naming changes [Pekka]
- Adds YUV color range correct block

Chaitanya Kumar Borah (8):
drm/colorop: Add DRM_COLOROP_FIXED_MATRIX drm/i915/color: Add CSC on SDR plane color pipeline drm/i915/color: Program fixed-function CSC on SDR planes drm/i915/color: Add support for 1D LUT in SDR planes drm/i915/color: Add color pipeline support for SDR planes drm/i915/color: Add YCbCr limited-to-full range color block support drm/i915/color: Program plane YUV range correction colorop drm/i915/color: Add YUV range correction to SDR plane pipeline

Pranay Samala (5):
drm/i915/color: Fix HDR pre-CSC LUT programming loop drm/i915/color: Extract HDR pre-CSC LUT programming to helper function drm/i915/color: Program Pre-CSC registers for SDR drm/i915/color: Extract HDR post-CSC LUT programming to helper
function
drm/i915/color: Program Plane Post CSC registers for SDR planes

 drivers/gpu/drm/drm_atomic.c                  |   4 +
 drivers/gpu/drm/drm_atomic_uapi.c             |   4 +
 drivers/gpu/drm/drm_colorop.c                 | 107 +++++++
 drivers/gpu/drm/i915/display/intel_color.c    | 288 +++++++++++++-----
 .../drm/i915/display/intel_color_pipeline.c   |  44 ++-
 .../drm/i915/display/intel_display_limits.h   |   2 +
 .../drm/i915/display/intel_display_types.h    |   3 +
 drivers/gpu/drm/i915/display/intel_plane.c    |  15 +-
 .../drm/i915/display/skl_universal_plane.c    |  33 ++
 include/drm/drm_colorop.h                     |  84 +++++
 include/uapi/drm/drm_mode.h                   |  12 +
 11 files changed, 503 insertions(+), 93 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/13 drm/colorop: Add DRM_COLOROP_FIXED_MATRIX

Introduce DRM_COLOROP_FIXED_MATRIX, a new colorop type representing a hardware that performs a fixed matrix operation.

Unlike CTM-based colorops, this block does not expose programmable coefficients. Instead, userspace selects one of the predefined hardware modes via a new FIXED_MATRIX_TYPE enum property. Supported modes include common YCbCr->RGB and RGB709->RGB2020 conversions.

v2:
- Naming changes (Pekka)

---
 drivers/gpu/drm/drm_atomic.c      |   4 ++
 drivers/gpu/drm/drm_atomic_uapi.c |   4 ++
 drivers/gpu/drm/drm_colorop.c     | 107 ++++++++++++++++++++++++++++++
 include/drm/drm_colorop.h         |  84 +++++++++++++++++++++++
 include/uapi/drm/drm_mode.h       |  12 ++++
 5 files changed, 211 insertions(+)
drivers/gpu/drm/drm_atomic.c +4 -0
index 41c57063f3b4..16a2183b11bf 100644
@@ -845,6 +845,10 @@ static void drm_atomic_colorop_print_state(struct drm_printer *p,
 			   drm_get_colorop_lut3d_interpolation_name(colorop->lut3d_interpolation));
 		drm_printf(p, "\tdata blob id=%d\n", state->data ? state->data->base.id : 0);
 		break;
+	case DRM_COLOROP_FIXED_MATRIX:
+		drm_printf(p, "\tfixed_matrix_type=%s\n",
+			   drm_get_colorop_fixed_matrix_type_name(state->fixed_matrix_type));
+		break;
 	default:
 		break;
 	}
drivers/gpu/drm/drm_atomic_uapi.c +4 -0
index 5bd5bf6661df..d69406b08a0f 100644
@@ -761,6 +761,8 @@ static int drm_atomic_colorop_set_property(struct drm_colorop *colorop,
 	} else if (property == colorop->data_property) {
 		return drm_atomic_color_set_data_property(colorop, state,
 							  property, val);
+	} else if (property == colorop->fixed_matrix_type_property) {
+		state->fixed_matrix_type = val;
 	} else {
 		drm_dbg_atomic(colorop->dev,
 			       "[COLOROP:%d:%d] unknown property [PROP:%d:%s]\n",
@@ -793,6 +795,8 @@ drm_atomic_colorop_get_property(struct drm_colorop *colorop,
 		*val = colorop->lut3d_interpolation;
 	else if (property == colorop->data_property)
 		*val = (state->data) ? state->data->base.id : 0;
+	else if (property == colorop->fixed_matrix_type_property)
+		*val = state->fixed_matrix_type;
 	else
 		return -EINVAL;
 
drivers/gpu/drm/drm_colorop.c +107 -0

143 lines not on this page · raw message

include/drm/drm_colorop.h +84 -0

114 lines not on this page · raw message

include/uapi/drm/drm_mode.h +12 -0
index a4bdc4bd11bc..dc4b8566fec8 100644
@@ -971,6 +971,18 @@ enum drm_colorop_type {
 	 *         color = lut3d[index]
 	 */
 	DRM_COLOROP_3D_LUT,
+
+	/**
+	 * @DRM_COLOROP_FIXED_MATRIX:
+	 *
+	 * enum string "Fixed Matrix"
+	 *
+	 * A Colorop block that performs a pre-defined matrix operation selected
+	 * via the FIXED_MATRIX_TYPE enum property. The driver advertises the supported
+	 * operations through this property.
+	 */
+	DRM_COLOROP_FIXED_MATRIX,
+
 };
 
 /**
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH v2 01/13] drm/colorop: Add DRM_COLOROP_FIXED_MATRIX

Quoted 238 lines · Chaitanya Kumar Borah

Introduce DRM_COLOROP_FIXED_MATRIX, a new colorop type representing a hardware that performs a fixed matrix operation.

Unlike CTM-based colorops, this block does not expose programmable coefficients. Instead, userspace selects one of the predefined hardware modes via a new FIXED_MATRIX_TYPE enum property. Supported modes include common YCbCr->RGB and RGB709->RGB2020 conversions.

v2:
- Naming changes (Pekka)

---
  drivers/gpu/drm/drm_atomic.c      |   4 ++
  drivers/gpu/drm/drm_atomic_uapi.c |   4 ++
  drivers/gpu/drm/drm_colorop.c     | 107 ++++++++++++++++++++++++++++++
  include/drm/drm_colorop.h         |  84 +++++++++++++++++++++++
  include/uapi/drm/drm_mode.h       |  12 ++++
  5 files changed, 211 insertions(+)
drivers/gpu/drm/drm_atomic.c +4 -0
index 41c57063f3b4..16a2183b11bf 100644
@@ -845,6 +845,10 @@ static void drm_atomic_colorop_print_state(struct drm_printer *p,
  			   drm_get_colorop_lut3d_interpolation_name(colorop->lut3d_interpolation));
  		drm_printf(p, "\tdata blob id=%d\n", state->data ? state->data->base.id : 0);
  		break;
+	case DRM_COLOROP_FIXED_MATRIX:
+		drm_printf(p, "\tfixed_matrix_type=%s\n",
+			   drm_get_colorop_fixed_matrix_type_name(state->fixed_matrix_type));
+		break;
  	default:
  		break;
  	}
drivers/gpu/drm/drm_atomic_uapi.c +4 -0
index 5bd5bf6661df..d69406b08a0f 100644
@@ -761,6 +761,8 @@ static int drm_atomic_colorop_set_property(struct drm_colorop *colorop,
  	} else if (property == colorop->data_property) {
  		return drm_atomic_color_set_data_property(colorop, state,
  							  property, val);
+	} else if (property == colorop->fixed_matrix_type_property) {
+		state->fixed_matrix_type = val;
  	} else {
  		drm_dbg_atomic(colorop->dev,
  			       "[COLOROP:%d:%d] unknown property [PROP:%d:%s]\n",
@@ -793,6 +795,8 @@ drm_atomic_colorop_get_property(struct drm_colorop *colorop,
  		*val = colorop->lut3d_interpolation;
  	else if (property == colorop->data_property)
  		*val = (state->data) ? state->data->base.id : 0;
+	else if (property == colorop->fixed_matrix_type_property)
+		*val = state->fixed_matrix_type;
  	else
  		return -EINVAL;
 
drivers/gpu/drm/drm_colorop.c +107 -0
index 566816e3c6f0..dd385e8dacbe 100644
@@ -68,6 +68,7 @@ static const struct drm_prop_enum_list drm_colorop_type_enum_list[] = {
  	{ DRM_COLOROP_CTM_3X4, "3x4 Matrix"},
  	{ DRM_COLOROP_MULTIPLIER, "Multiplier"},
  	{ DRM_COLOROP_3D_LUT, "3D LUT"},
+	{ DRM_COLOROP_FIXED_MATRIX, "Fixed Matrix"},
  };
 
  static const char * const colorop_curve_1d_type_names[] = {
@@ -90,6 +91,14 @@ static const struct drm_prop_enum_list drm_colorop_lut3d_interpolation_list[] =
  	{ DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL, "Tetrahedral" },
  };
 
+static const char * const colorop_fixed_matrix_type_names[] = {
+	[DRM_COLOROP_FM_YCBCR601_FULL_RGB]  = "YCbCr 601 Full to RGB",
+	[DRM_COLOROP_FM_YCBCR709_FULL_RGB]    = "YCbCr 709 Full to RGB",
+	[DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC]  = "YCbCr 2020 Full to RGB NC",
+	[DRM_COLOROP_FM_YCBCR_LIMITED_FULL]  = "YCbCr limited to full",
+	[DRM_COLOROP_FM_RGB709_RGB2020]     = "RGB709 to RGB2020",
+};
+
  /* Init Helpers */
 
  static int drm_plane_colorop_init(struct drm_device *dev, struct drm_colorop *colorop,
@@ -455,6 +464,81 @@ int drm_plane_colorop_3dlut_init(struct drm_device *dev, struct drm_colorop *col
  }
  EXPORT_SYMBOL(drm_plane_colorop_3dlut_init);
 
+/**
+ * drm_plane_colorop_fixed_matrix_init - Initialize a DRM_COLOROP_FIXED_MATRIX
+ *
+ * @dev: DRM device
+ * @colorop: The drm_colorop object to initialize
+ * @plane: The associated drm_plane
+ * @funcs: control functions for the new colorop
+ * @supported_fm: A bitfield of supported drm_colorop_fixed_matrix_type enum values,
+ *               created using BIT(fixed_matrix_type) and combined with the OR '|'
+ *               operator.
+ * @flags: bitmask of misc, see DRM_COLOROP_FLAG_* defines.
+ * @return zero on success, -E value on failure
+ */
+int drm_plane_colorop_fixed_matrix_init(struct drm_device *dev, struct drm_colorop *colorop,
+					struct drm_plane *plane,
+					const struct drm_colorop_funcs *funcs,
+					u64 supported_fm, uint32_t flags)
+{
+	struct drm_prop_enum_list enum_list[DRM_COLOROP_FM_COUNT];
+	int i, len;
+
+	struct drm_property *prop;
+	int ret;
+
+	if (!supported_fm) {
+		drm_err(dev,
+			"No supported FM type op for new Fixed Matrix colorop on [PLANE:%d:%s]\n",
+			plane->base.id, plane->name);
+		return -EINVAL;
+	}
+
+	if ((supported_fm & -BIT(DRM_COLOROP_FM_COUNT)) != 0) {
+		drm_err(dev, "Unknown Fixed Matrix provided on [PLANE:%d:%s]\n",
+			plane->base.id, plane->name);
+		return -EINVAL;
+	}
+
+	ret = drm_plane_colorop_init(dev, colorop, plane, funcs, DRM_COLOROP_FIXED_MATRIX, flags);
+	if (ret)
+		return ret;
+
+	len = 0;
+	for (i = 0; i < DRM_COLOROP_FM_COUNT; i++) {
+		if ((supported_fm & BIT(i)) == 0)
+			continue;
+
+		enum_list[len].type = i;
+		enum_list[len].name = colorop_fixed_matrix_type_names[i];
+		len++;
+	}
+
+	if (WARN_ON(len <= 0))
+		return -EINVAL;
+
+	prop = drm_property_create_enum(dev, DRM_MODE_PROP_ATOMIC, "FIXED_MATRIX_TYPE",
+					enum_list, len);
+
+	if (!prop)
+		return -ENOMEM;
+
+	colorop->fixed_matrix_type_property = prop;
+	/*
+	 * Default to the first supported CSC mode as provided by the driver.
+	 * Intuitively this should be something that keeps the colorop in pixel bypass
+	 * mode but that is already handled via the standard colorop bypass
+	 * property.
+	 */
+	drm_object_attach_property(&colorop->base, colorop->fixed_matrix_type_property,
+				   enum_list[0].type);
+	drm_colorop_reset(colorop);
+
+	return 0;
+}
+EXPORT_SYMBOL(drm_plane_colorop_fixed_matrix_init);
+
  static void __drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop,
  							struct drm_colorop_state *state)
  {
@@ -521,6 +605,13 @@ static void __drm_colorop_state_reset(struct drm_colorop_state *colorop_state,
  						      &val);
  		colorop_state->curve_1d_type = val;
  	}
+
+	if (colorop->fixed_matrix_type_property) {
+		drm_object_property_get_default_value(&colorop->base,
+						      colorop->fixed_matrix_type_property,
+						      &val);
+		colorop_state->fixed_matrix_type = val;
+	}
  }
 
  /**
@@ -561,6 +652,7 @@ static const char * const colorop_type_name[] = {
  	[DRM_COLOROP_CTM_3X4] = "3x4 Matrix",
  	[DRM_COLOROP_MULTIPLIER] = "Multiplier",
  	[DRM_COLOROP_3D_LUT] = "3D LUT",
+	[DRM_COLOROP_FIXED_MATRIX] = "Fixed Matrix",
  };
 
  static const char * const colorop_lu3d_interpolation_name[] = {
@@ -617,6 +709,21 @@ const char *drm_get_colorop_lut3d_interpolation_name(enum drm_colorop_lut3d_inte
  	return colorop_lu3d_interpolation_name[type];
  }
 
+/**
+ * drm_get_colorop_fixed_matrix_type_name: return a string for fixed matrix type
+ * @type: fixed matrix type to compute name of
+ *
+ * In contrast to the other drm_get_*_name functions this one here returns a
+ * const pointer and hence is threadsafe.
+ */
+const char *drm_get_colorop_fixed_matrix_type_name(enum drm_colorop_fixed_matrix_type type)
+{
+	if (WARN_ON(type >= ARRAY_SIZE(colorop_fixed_matrix_type_names)))
+		return "unknown";
+
+	return colorop_fixed_matrix_type_names[type];
+}
+
  /**
   * drm_colorop_set_next_property - sets the next pointer
   * @colorop: drm colorop
include/drm/drm_colorop.h +20 -0
index bd082854ca74..c13b4b045fff 100644
@@ -134,6 +134,71 @@ enum drm_colorop_curve_1d_type {
  	DRM_COLOROP_1D_CURVE_COUNT
  };
 
+/**
+ * enum drm_colorop_fixed_matrix_type - type of Fixed Matrix
+ *
+ * Describes a Fixed Matrix operation to be applied by the DRM_COLOROP_FIXED_MATRIX
+ */
+enum drm_colorop_fixed_matrix_type {
+	/**
+	 * @DRM_COLOROP_FM_YCBCR601_FULL_RGB:
+	 *
+	 * enum string "YCbCr 601 Full to RGB"
+	 *
+	 * This selects the matrix that converts full range YCbCr into RGB
+	 * according to the BT.601 coefficients.
+	 */
+	DRM_COLOROP_FM_YCBCR601_FULL_RGB,
+
+	/**
+	 * @DRM_COLOROP_FM_YCBCR709_FULL_RGB:
+	 *
+	 * enum string "YCbCr 709 Full to RGB"

include/drm/drm_colorop.h enum drm_colorop_curve_1d_type { · line 166

Quoted 10 lines
include/drm/drm_colorop.h +10 -0
+	 *
+	 * This selects the matrix that converts full range YCbCr into RGB
+	 * according to the BT.709 coefficients.
+	 */
+	DRM_COLOROP_FM_YCBCR709_FULL_RGB,
+
+	/**
+	 * @DRM_COLOROP_FM_YCBCR2020_NC_FULL_RGB:
+	 *
+	 * enum string "YCbCr 2020 Full to RGB NC"

Nit: I think you mean "YCbCr 2020 NC Full to RGB"?

include/drm/drm_colorop.h enum drm_colorop_curve_1d_type { · line 171

Quoted 5 lines
include/drm/drm_colorop.h +5 -0
+	 *
+	 * This selects the matrix that converts full range YCbCr into RGB
+	 * according to the BT.2020 non-constant luminance coefficients.
+	 */
+	DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC,

... and here ^ DRM_COLOROP_FM_YCBCR_NC_FULL_RGB

include/drm/drm_colorop.h enum drm_colorop_curve_1d_type { · line 182

Quoted 11 lines
include/drm/drm_colorop.h +11 -0
+
+	/**
+	 * @DRM_COLOROP_FM_YCBCR_LIMITED_FULL:
+	 *
+	 * enum string "YCbCr limited to full"
+	 *
+	 * This selects the matrix that converts limited range YCbCr into
+	 * full range YCbCr. Though not strictly a matrix operation but
+	 * can be represented as one.
+	 */
+	DRM_COLOROP_FM_YCBCR_LIMITED_FULL,

I didn't full understand how this is going to work.
Looks like it's merging two properties (COLOR_ENCODING and COLOR_RANGE) in a single colorop.
But we can only select one enum value. So how to communicate, for example, a "YCbCr 709 Limited to RGB" conversion?
The driver will have to define a coloro pipeline with two fixed matrix colorop in a row, one with only "Limited to Full" and another with "YCbCr Full to RGB" ?

Melissa

Quoted 92 lines
include/drm/drm_colorop.h +38 -0
+
+	/**
+	 * @DRM_COLOROP_FM_RGB709_RGB2020:
+	 *
+	 * enum string "RGB709 to RGB2020"
+	 *
+	 * Selects the fixed-function CSC preset that converts RGB
+	 * (BT.709) colorimetry to RGB (BT.2020).
+	 */
+	DRM_COLOROP_FM_RGB709_RGB2020,
+
+	/**
+	 * @DRM_COLOROP_FM_COUNT:
+	 *
+	 * enum value denoting the size of the enum
+	 */
+	DRM_COLOROP_FM_COUNT
+};
+
  /**
   * struct drm_colorop_state - mutable colorop state
   */
@@ -183,6 +248,13 @@ struct drm_colorop_state {
  	 */
  	struct drm_property_blob *data;
 
+	/**
+	 * @fixed_matrix_type:
+	 *
+	 * Type of Fixed Matrix operation.
+	 */
+	enum drm_colorop_fixed_matrix_type fixed_matrix_type;
+
  	/** @state: backpointer to global drm_atomic_state */
  	struct drm_atomic_state *state;
  };
@@ -368,6 +440,13 @@ struct drm_colorop {
  	 */
  	struct drm_property *data_property;
 
+	/**
+	 * @fixed_matrix_type_property:
+	 *
+	 * Sub-type for DRM_COLOROP_FIXED_MATRIX type.
+	 */
+	struct drm_property *fixed_matrix_type_property;
+
  	/**
  	 * @next_property:
  	 *
@@ -424,6 +503,10 @@ int drm_plane_colorop_3dlut_init(struct drm_device *dev, struct drm_colorop *col
  				 uint32_t lut_size,
  				 enum drm_colorop_lut3d_interpolation_type interpolation,
  				 uint32_t flags);
+int drm_plane_colorop_fixed_matrix_init(struct drm_device *dev, struct drm_colorop *colorop,
+					struct drm_plane *plane,
+					const struct drm_colorop_funcs *funcs,
+					u64 supported_fm, uint32_t flags);
 
  struct drm_colorop_state *
  drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop);
@@ -480,6 +563,7 @@ drm_get_colorop_lut1d_interpolation_name(enum drm_colorop_lut1d_interpolation_ty
 
  const char *
  drm_get_colorop_lut3d_interpolation_name(enum drm_colorop_lut3d_interpolation_type type);
+const char *drm_get_colorop_fixed_matrix_type_name(enum drm_colorop_fixed_matrix_type type);
 
  void drm_colorop_set_next_property(struct drm_colorop *colorop, struct drm_colorop *next);
 
include/uapi/drm/drm_mode.h +12 -0
index a4bdc4bd11bc..dc4b8566fec8 100644
@@ -971,6 +971,18 @@ enum drm_colorop_type {
  	 *         color = lut3d[index]
  	 */
  	DRM_COLOROP_3D_LUT,
+
+	/**
+	 * @DRM_COLOROP_FIXED_MATRIX:
+	 *
+	 * enum string "Fixed Matrix"
+	 *
+	 * A Colorop block that performs a pre-defined matrix operation selected
+	 * via the FIXED_MATRIX_TYPE enum property. The driver advertises the supported
+	 * operations through this property.
+	 */
+	DRM_COLOROP_FIXED_MATRIX,
+
  };
 
  /**
#3 lore raw

Re: [PATCH v2 01/13] drm/colorop: Add DRM_COLOROP_FIXED_MATRIX

Quoted 269 lines · Melissa Wen
Quoted 255 lines · Chaitanya Kumar Borah

Introduce DRM_COLOROP_FIXED_MATRIX, a new colorop type representing a hardware that performs a fixed matrix operation.

Unlike CTM-based colorops, this block does not expose programmable coefficients. Instead, userspace selects one of the predefined hardware modes via a new FIXED_MATRIX_TYPE enum property. Supported modes include common YCbCr->RGB and RGB709->RGB2020 conversions.

v2:
  - Naming changes (Pekka)

---
  drivers/gpu/drm/drm_atomic.c      |   4 ++ drivers/gpu/drm/drm_atomic_uapi.c |   4 ++ drivers/gpu/drm/drm_colorop.c     | 107 ++++++++++++++++++++++++++++++ include/drm/drm_colorop.h         |  84 +++++++++++++++++++++++ include/uapi/drm/drm_mode.h       |  12 ++++

  5 files changed, 211 insertions(+)
drivers/gpu/drm/drm_atomic.c +0 -0
index 41c57063f3b4..16a2183b11bf 100644
@@ -845,6 +845,10 @@ static void drm_atomic_colorop_print_state(struct 
 drm_printer *p,

                 drm_get_colorop_lut3d_interpolation_name(colorop-

Quoted 1 line

lut3d_interpolation));

          drm_printf(p, "\tdata blob id=%d\n", state->data ? state-

Quoted 1 line

data->base.id : 0);

          break;
+    case DRM_COLOROP_FIXED_MATRIX:
+        drm_printf(p, "\tfixed_matrix_type=%s\n", +               drm_get_colorop_fixed_matrix_type_name(state-

Quoted 1 line

fixed_matrix_type));

+        break;
      default:
          break;
      }

drivers/gpu/drm/drm_atomic_uapi.c +2 -0
index 5bd5bf6661df..d69406b08a0f 100644
@@ -761,6 +761,8 @@ static int drm_atomic_colorop_set_property(struct 
 drm_colorop *colorop,
       } else if (property == colorop->data_property) {
           return drm_atomic_color_set_data_property(colorop, state,
                                 property, val);
+    } else if (property == colorop->fixed_matrix_type_property) {
+        state->fixed_matrix_type = val;
       } else {
           drm_dbg_atomic(colorop->dev,

                     "[COLOROP:%d:%d] unknown property [PROP:%d:%s]\n",

drivers/gpu/drm/drm_atomic_uapi.c +2 -0
@@ -793,6 +795,8 @@ drm_atomic_colorop_get_property(struct drm_colorop 
 *colorop,
           *val = colorop->lut3d_interpolation;
       else if (property == colorop->data_property)
           *val = (state->data) ? state->data->base.id : 0;
+    else if (property == colorop->fixed_matrix_type_property)
+        *val = state->fixed_matrix_type;

      else
          return -EINVAL;

drivers/gpu/drm/drm_colorop.c +1 -0
index 566816e3c6f0..dd385e8dacbe 100644
@@ -68,6 +68,7 @@ static const struct drm_prop_enum_list 
 drm_colorop_type_enum_list[] = {
       { DRM_COLOROP_CTM_3X4, "3x4 Matrix"},
       { DRM_COLOROP_MULTIPLIER, "Multiplier"},
       { DRM_COLOROP_3D_LUT, "3D LUT"},
+    { DRM_COLOROP_FIXED_MATRIX, "Fixed Matrix"},
   };
   static const char * const colorop_curve_1d_type_names[] = {
@@ -90,6 +91,14 @@ static const struct drm_prop_enum_list 

drm_colorop_lut3d_interpolation_list[] =
      { DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL, "Tetrahedral" }, };
+static const char * const colorop_fixed_matrix_type_names[] = { +    [DRM_COLOROP_FM_YCBCR601_FULL_RGB]  = "YCbCr 601 Full to RGB", +    [DRM_COLOROP_FM_YCBCR709_FULL_RGB]    = "YCbCr 709 Full to RGB", +    [DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC]  = "YCbCr 2020 Full to RGB NC",
+    [DRM_COLOROP_FM_YCBCR_LIMITED_FULL]  = "YCbCr limited to full", +    [DRM_COLOROP_FM_RGB709_RGB2020]     = "RGB709 to RGB2020",

drivers/gpu/drm/drm_colorop.c +2 -0
+};
+

  /* Init Helpers */
  static int drm_plane_colorop_init(struct drm_device *dev, struct drm_colorop *colorop,

drivers/gpu/drm/drm_colorop.c +0 -0
@@ -455,6 +464,81 @@ int drm_plane_colorop_3dlut_init(struct 

drm_device *dev, struct drm_colorop *col
  }
  EXPORT_SYMBOL(drm_plane_colorop_3dlut_init);
+/**
+ * drm_plane_colorop_fixed_matrix_init - Initialize a DRM_COLOROP_FIXED_MATRIX
+ *
+ * @dev: DRM device
+ * @colorop: The drm_colorop object to initialize
+ * @plane: The associated drm_plane
+ * @funcs: control functions for the new colorop
+ * @supported_fm: A bitfield of supported drm_colorop_fixed_matrix_type enum values,
+ *               created using BIT(fixed_matrix_type) and combined with the OR '|'
+ *               operator.
+ * @flags: bitmask of misc, see DRM_COLOROP_FLAG_* defines.
+ * @return zero on success, -E value on failure
+ */
+int drm_plane_colorop_fixed_matrix_init(struct drm_device *dev, struct drm_colorop *colorop,
+                    struct drm_plane *plane,
+                    const struct drm_colorop_funcs *funcs, +                    u64 supported_fm, uint32_t flags)

drivers/gpu/drm/drm_colorop.c +10 -0
+{
+    struct drm_prop_enum_list enum_list[DRM_COLOROP_FM_COUNT];
+    int i, len;
+
+    struct drm_property *prop;
+    int ret;
+
+    if (!supported_fm) {
+        drm_err(dev,
+            "No supported FM type op for new Fixed Matrix colorop on 

[PLANE:%d:%s]\n",
+            plane->base.id, plane->name);
+        return -EINVAL;
+    }

drivers/gpu/drm/drm_colorop.c +8 -0
+
+    if ((supported_fm & -BIT(DRM_COLOROP_FM_COUNT)) != 0) {
+        drm_err(dev, "Unknown Fixed Matrix provided on [PLANE:%d:%s]\n",
+            plane->base.id, plane->name);
+        return -EINVAL;
+    }
+
+    ret = drm_plane_colorop_init(dev, colorop, plane, funcs, 

DRM_COLOROP_FIXED_MATRIX, flags);
+    if (ret)
+        return ret;

drivers/gpu/drm/drm_colorop.c +15 -0
+
+    len = 0;
+    for (i = 0; i < DRM_COLOROP_FM_COUNT; i++) {
+        if ((supported_fm & BIT(i)) == 0)
+            continue;
+
+        enum_list[len].type = i;
+        enum_list[len].name = colorop_fixed_matrix_type_names[i];
+        len++;
+    }
+
+    if (WARN_ON(len <= 0))
+        return -EINVAL;
+
+    prop = drm_property_create_enum(dev, DRM_MODE_PROP_ATOMIC, 

"FIXED_MATRIX_TYPE",
+                    enum_list, len);

drivers/gpu/drm/drm_colorop.c +7 -0
+
+    if (!prop)
+        return -ENOMEM;
+
+    colorop->fixed_matrix_type_property = prop;
+    /*
+     * Default to the first supported CSC mode as provided by the 

driver.
+     * Intuitively this should be something that keeps the colorop in pixel bypass
+     * mode but that is already handled via the standard colorop bypass +     * property.
+     */
+    drm_object_attach_property(&colorop->base, colorop-

Quoted 1 line

fixed_matrix_type_property,

+                   enum_list[0].type);
+    drm_colorop_reset(colorop);

drivers/gpu/drm/drm_colorop.c +5 -0
+
+    return 0;
+}
+EXPORT_SYMBOL(drm_plane_colorop_fixed_matrix_init);
+

  static void __drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop, struct drm_colorop_state *state)
  {

drivers/gpu/drm/drm_colorop.c +10 -0
@@ -521,6 +605,13 @@ static void __drm_colorop_state_reset(struct 
 drm_colorop_state *colorop_state,
                                 &val);
           colorop_state->curve_1d_type = val;
       }
+
+    if (colorop->fixed_matrix_type_property) {
+        drm_object_property_get_default_value(&colorop->base,
+                              colorop->fixed_matrix_type_property,
+                              &val);
+        colorop_state->fixed_matrix_type = val;
+    }
   }
   /**
@@ -561,6 +652,7 @@ static const char * const colorop_type_name[] = {
       [DRM_COLOROP_CTM_3X4] = "3x4 Matrix",
       [DRM_COLOROP_MULTIPLIER] = "Multiplier",
       [DRM_COLOROP_3D_LUT] = "3D LUT",
+    [DRM_COLOROP_FIXED_MATRIX] = "Fixed Matrix",
   };
   static const char * const colorop_lu3d_interpolation_name[] = {
@@ -617,6 +709,21 @@ const char 
 *drm_get_colorop_lut3d_interpolation_name(enum drm_colorop_lut3d_inte
       return colorop_lu3d_interpolation_name[type];
   }
+/**
+ * drm_get_colorop_fixed_matrix_type_name: return a string for fixed 

matrix type
+ * @type: fixed matrix type to compute name of
+ *
+ * In contrast to the other drm_get_*_name functions this one here returns a
+ * const pointer and hence is threadsafe.
+ */
+const char *drm_get_colorop_fixed_matrix_type_name(enum drm_colorop_fixed_matrix_type type)

drivers/gpu/drm/drm_colorop.c +7 -0
+{
+    if (WARN_ON(type >= ARRAY_SIZE(colorop_fixed_matrix_type_names)))
+        return "unknown";
+
+    return colorop_fixed_matrix_type_names[type];
+}
+

  /**
   * drm_colorop_set_next_property - sets the next pointer
   * @colorop: drm colorop

include/drm/drm_colorop.h +0 -0
index bd082854ca74..c13b4b045fff 100644
@@ -134,6 +134,71 @@ enum drm_colorop_curve_1d_type {

      DRM_COLOROP_1D_CURVE_COUNT
  };
+/**
+ * enum drm_colorop_fixed_matrix_type - type of Fixed Matrix
+ *
+ * Describes a Fixed Matrix operation to be applied by the DRM_COLOROP_FIXED_MATRIX
+ */

include/drm/drm_colorop.h +15 -0
+enum drm_colorop_fixed_matrix_type {
+    /**
+     * @DRM_COLOROP_FM_YCBCR601_FULL_RGB:
+     *
+     * enum string "YCbCr 601 Full to RGB"
+     *
+     * This selects the matrix that converts full range YCbCr into RGB
+     * according to the BT.601 coefficients.
+     */
+    DRM_COLOROP_FM_YCBCR601_FULL_RGB,
+
+    /**
+     * @DRM_COLOROP_FM_YCBCR709_FULL_RGB:
+     *
+     * enum string "YCbCr 709 Full to RGB"

include/drm/drm_colorop.h enum drm_colorop_curve_1d_type { · line 166

Quoted 10 lines
include/drm/drm_colorop.h +10 -0
+     *
+     * This selects the matrix that converts full range YCbCr into RGB
+     * according to the BT.709 coefficients.
+     */
+    DRM_COLOROP_FM_YCBCR709_FULL_RGB,
+
+    /**
+     * @DRM_COLOROP_FM_YCBCR2020_NC_FULL_RGB:
+     *
+     * enum string "YCbCr 2020 Full to RGB NC"

Nit: I think you mean "YCbCr 2020 NC Full to RGB"?

Quoted 6 lines
Quoted 5 lines

+     *
+     * This selects the matrix that converts full range YCbCr into RGB +     * according to the BT.2020 non-constant luminance coefficients. +     */
+    DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC,

... and here ^ DRM_COLOROP_FM_YCBCR_NC_FULL_RGB

Ack.

Quoted 11 lines
Quoted 11 lines

+
+    /**
+     * @DRM_COLOROP_FM_YCBCR_LIMITED_FULL:
+     *
+     * enum string "YCbCr limited to full"
+     *
+     * This selects the matrix that converts limited range YCbCr into +     * full range YCbCr. Though not strictly a matrix operation but +     * can be represented as one.
+     */
+    DRM_COLOROP_FM_YCBCR_LIMITED_FULL,

Quoted 5 lines

I didn't full understand how this is going to work.
Looks like it's merging two properties (COLOR_ENCODING and COLOR_RANGE) in a single colorop.
But we can only select one enum value. So how to communicate, for example, a "YCbCr 709 Limited to RGB" conversion?
The driver will have to define a coloro pipeline with two fixed matrix colorop in a row, one with only "Limited to Full" and another with "YCbCr Full to RGB" ?

It depends on what the HW supports. Let's say a fixed function HW block can itself support "YCbCr Limited to RGB" then we just need a single colorop that exposes this enum. These are being added in the series that Harry published.[1]

In Intel's case, we have two separate blocks to do this. One that does the range correction (Limited to Full) and then a fixed function CSC block that does only "YCbCr Full to RGB" conversion. If they are adjacent in the pipeline, they can very well be represent by a single colorop described in the previous paragraph but we have a unique situation where there is a 1D LUT in between the two blocks.

[YUV Limited to Full] -> [1D LUT] -> [YCbCr XXX Full to RGB] -> [1D LUT].

==
Chaitanya

[1] https://lore.kernel.org/dri-devel/[email protected]/

Quoted 93 lines

Melissa

Quoted 91 lines
include/drm/drm_colorop.h +19 -0
+
+    /**
+     * @DRM_COLOROP_FM_RGB709_RGB2020:
+     *
+     * enum string "RGB709 to RGB2020"
+     *
+     * Selects the fixed-function CSC preset that converts RGB
+     * (BT.709) colorimetry to RGB (BT.2020).
+     */
+    DRM_COLOROP_FM_RGB709_RGB2020,
+
+    /**
+     * @DRM_COLOROP_FM_COUNT:
+     *
+     * enum value denoting the size of the enum
+     */
+    DRM_COLOROP_FM_COUNT
+};
+

  /**
   * struct drm_colorop_state - mutable colorop state */

include/drm/drm_colorop.h +14 -0
@@ -183,6 +248,13 @@ struct drm_colorop_state {
        */
       struct drm_property_blob *data;
+    /**
+     * @fixed_matrix_type:
+     *
+     * Type of Fixed Matrix operation.
+     */
+    enum drm_colorop_fixed_matrix_type fixed_matrix_type;
+
       /** @state: backpointer to global drm_atomic_state */
       struct drm_atomic_state *state;
   };
@@ -368,6 +440,13 @@ struct drm_colorop {
        */
       struct drm_property *data_property;
+    /**
+     * @fixed_matrix_type_property:
+     *
+     * Sub-type for DRM_COLOROP_FIXED_MATRIX type.
+     */
+    struct drm_property *fixed_matrix_type_property;
+
       /**
        * @next_property:
        *
@@ -424,6 +503,10 @@ int drm_plane_colorop_3dlut_init(struct 

drm_device *dev, struct drm_colorop *col
                   uint32_t lut_size,
                   enum drm_colorop_lut3d_interpolation_type interpolation, uint32_t flags);
+int drm_plane_colorop_fixed_matrix_init(struct drm_device *dev, struct drm_colorop *colorop,
+                    struct drm_plane *plane,
+                    const struct drm_colorop_funcs *funcs,
+                    u64 supported_fm, uint32_t flags);
  struct drm_colorop_state * drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop);

include/drm/drm_colorop.h +0 -0
@@ -480,6 +563,7 @@ drm_get_colorop_lut1d_interpolation_name(enum 

drm_colorop_lut1d_interpolation_ty
  const char *
  drm_get_colorop_lut3d_interpolation_name(enum drm_colorop_lut3d_interpolation_type type); +const char *drm_get_colorop_fixed_matrix_type_name(enum drm_colorop_fixed_matrix_type type);
  void drm_colorop_set_next_property(struct drm_colorop *colorop, struct drm_colorop *next);

include/uapi/drm/drm_mode.h +7 -0
index a4bdc4bd11bc..dc4b8566fec8 100644
@@ -971,6 +971,18 @@ enum drm_colorop_type {
        *         color = lut3d[index]
        */
       DRM_COLOROP_3D_LUT,
+
+    /**
+     * @DRM_COLOROP_FIXED_MATRIX:
+     *
+     * enum string "Fixed Matrix"
+     *
+     * A Colorop block that performs a pre-defined matrix operation 

selected
+     * via the FIXED_MATRIX_TYPE enum property. The driver advertises the supported
+     * operations through this property.
+     */
+    DRM_COLOROP_FIXED_MATRIX,
+
  };
  /**

Reviewed-by
#4 lore raw

Re: [PATCH v2 01/13] drm/colorop: Add DRM_COLOROP_FIXED_MATRIX

Quoted 301 lines · Chaitanya Kumar
Quoted 272 lines · Melissa Wen
Quoted 258 lines · Chaitanya Kumar Borah

Introduce DRM_COLOROP_FIXED_MATRIX, a new colorop type representing a hardware that performs a fixed matrix operation.

Unlike CTM-based colorops, this block does not expose programmable coefficients. Instead, userspace selects one of the predefined hardware modes via a new FIXED_MATRIX_TYPE enum property. Supported modes include common YCbCr->RGB and RGB709->RGB2020 conversions.

v2:
  - Naming changes (Pekka)

---
  drivers/gpu/drm/drm_atomic.c      |   4 ++ drivers/gpu/drm/drm_atomic_uapi.c |   4 ++ drivers/gpu/drm/drm_colorop.c     | 107
++++++++++++++++++++++++++++++
  include/drm/drm_colorop.h         |  84 +++++++++++++++++++++++ include/uapi/drm/drm_mode.h       |  12 ++++

  5 files changed, 211 insertions(+)
drivers/gpu/drm/drm_atomic.c +0 -0
index 41c57063f3b4..16a2183b11bf 100644
@@ -845,6 +845,10 @@ static void 
 drm_atomic_colorop_print_state(struct drm_printer *p,

drm_get_colorop_lut3d_interpolation_name(colorop-

Quoted 1 line

lut3d_interpolation));

          drm_printf(p, "\tdata blob id=%d\n", state->data ? state-

Quoted 1 line

data->base.id : 0);

          break;
+    case DRM_COLOROP_FIXED_MATRIX:
+        drm_printf(p, "\tfixed_matrix_type=%s\n", +               drm_get_colorop_fixed_matrix_type_name(state-

Quoted 1 line

fixed_matrix_type));

+        break;
      default:
          break;
      }

drivers/gpu/drm/drm_atomic_uapi.c +2 -0
index 5bd5bf6661df..d69406b08a0f 100644
@@ -761,6 +761,8 @@ static int 
 drm_atomic_colorop_set_property(struct drm_colorop *colorop,
       } else if (property == colorop->data_property) {
           return drm_atomic_color_set_data_property(colorop, state,
                                 property, val);
+    } else if (property == colorop->fixed_matrix_type_property) {
+        state->fixed_matrix_type = val;
       } else {
           drm_dbg_atomic(colorop->dev,

                     "[COLOROP:%d:%d] unknown property [PROP:%d:%s]\n",

drivers/gpu/drm/drm_atomic_uapi.c +2 -0
@@ -793,6 +795,8 @@ drm_atomic_colorop_get_property(struct 
 drm_colorop *colorop,
           *val = colorop->lut3d_interpolation;
       else if (property == colorop->data_property)
           *val = (state->data) ? state->data->base.id : 0;
+    else if (property == colorop->fixed_matrix_type_property)
+        *val = state->fixed_matrix_type;

      else
          return -EINVAL;

drivers/gpu/drm/drm_colorop.c +1 -0
index 566816e3c6f0..dd385e8dacbe 100644
@@ -68,6 +68,7 @@ static const struct drm_prop_enum_list 
 drm_colorop_type_enum_list[] = {
       { DRM_COLOROP_CTM_3X4, "3x4 Matrix"},
       { DRM_COLOROP_MULTIPLIER, "Multiplier"},
       { DRM_COLOROP_3D_LUT, "3D LUT"},
+    { DRM_COLOROP_FIXED_MATRIX, "Fixed Matrix"},
   };
   static const char * const colorop_curve_1d_type_names[] = {
@@ -90,6 +91,14 @@ static const struct drm_prop_enum_list 

drm_colorop_lut3d_interpolation_list[] =
      { DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL, "Tetrahedral" }, };
+static const char * const colorop_fixed_matrix_type_names[] = { +    [DRM_COLOROP_FM_YCBCR601_FULL_RGB]  = "YCbCr 601 Full to RGB", +    [DRM_COLOROP_FM_YCBCR709_FULL_RGB]    = "YCbCr 709 Full to RGB", +    [DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC]  = "YCbCr 2020 Full to RGB NC",
+    [DRM_COLOROP_FM_YCBCR_LIMITED_FULL]  = "YCbCr limited to full", +    [DRM_COLOROP_FM_RGB709_RGB2020]     = "RGB709 to RGB2020",

drivers/gpu/drm/drm_colorop.c +2 -0
+};
+

  /* Init Helpers */
  static int drm_plane_colorop_init(struct drm_device *dev, struct drm_colorop *colorop,

drivers/gpu/drm/drm_colorop.c +0 -0
@@ -455,6 +464,81 @@ int drm_plane_colorop_3dlut_init(struct 

drm_device *dev, struct drm_colorop *col
  }
  EXPORT_SYMBOL(drm_plane_colorop_3dlut_init);
+/**
+ * drm_plane_colorop_fixed_matrix_init - Initialize a DRM_COLOROP_FIXED_MATRIX
+ *
+ * @dev: DRM device
+ * @colorop: The drm_colorop object to initialize
+ * @plane: The associated drm_plane
+ * @funcs: control functions for the new colorop
+ * @supported_fm: A bitfield of supported drm_colorop_fixed_matrix_type enum values,
+ *               created using BIT(fixed_matrix_type) and combined with the OR '|'
+ *               operator.
+ * @flags: bitmask of misc, see DRM_COLOROP_FLAG_* defines.
+ * @return zero on success, -E value on failure
+ */
+int drm_plane_colorop_fixed_matrix_init(struct drm_device *dev, struct drm_colorop *colorop,
+                    struct drm_plane *plane,
+                    const struct drm_colorop_funcs *funcs, +                    u64 supported_fm, uint32_t flags)

drivers/gpu/drm/drm_colorop.c +10 -0
+{
+    struct drm_prop_enum_list enum_list[DRM_COLOROP_FM_COUNT];
+    int i, len;
+
+    struct drm_property *prop;
+    int ret;
+
+    if (!supported_fm) {
+        drm_err(dev,
+            "No supported FM type op for new Fixed Matrix colorop 

on [PLANE:%d:%s]\n",
+            plane->base.id, plane->name);
+        return -EINVAL;
+    }
+
+    if ((supported_fm & -BIT(DRM_COLOROP_FM_COUNT)) != 0) { +        drm_err(dev, "Unknown Fixed Matrix provided on [PLANE:%d:%s]\n",
+            plane->base.id, plane->name);
+        return -EINVAL;
+    }
+
+    ret = drm_plane_colorop_init(dev, colorop, plane, funcs, DRM_COLOROP_FIXED_MATRIX, flags);
+    if (ret)
+        return ret;

drivers/gpu/drm/drm_colorop.c +15 -0
+
+    len = 0;
+    for (i = 0; i < DRM_COLOROP_FM_COUNT; i++) {
+        if ((supported_fm & BIT(i)) == 0)
+            continue;
+
+        enum_list[len].type = i;
+        enum_list[len].name = colorop_fixed_matrix_type_names[i];
+        len++;
+    }
+
+    if (WARN_ON(len <= 0))
+        return -EINVAL;
+
+    prop = drm_property_create_enum(dev, DRM_MODE_PROP_ATOMIC, 

"FIXED_MATRIX_TYPE",
+                    enum_list, len);

drivers/gpu/drm/drm_colorop.c +7 -0
+
+    if (!prop)
+        return -ENOMEM;
+
+    colorop->fixed_matrix_type_property = prop;
+    /*
+     * Default to the first supported CSC mode as provided by the 

driver.
+     * Intuitively this should be something that keeps the colorop in pixel bypass
+     * mode but that is already handled via the standard colorop bypass
+     * property.
+     */
+    drm_object_attach_property(&colorop->base, colorop-

Quoted 1 line

fixed_matrix_type_property,

+                   enum_list[0].type);
+    drm_colorop_reset(colorop);

drivers/gpu/drm/drm_colorop.c +5 -0
+
+    return 0;
+}
+EXPORT_SYMBOL(drm_plane_colorop_fixed_matrix_init);
+

  static void __drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop, struct drm_colorop_state *state)
  {

drivers/gpu/drm/drm_colorop.c +10 -0
@@ -521,6 +605,13 @@ static void __drm_colorop_state_reset(struct 
 drm_colorop_state *colorop_state,
                                 &val);
           colorop_state->curve_1d_type = val;
       }
+
+    if (colorop->fixed_matrix_type_property) {
+ drm_object_property_get_default_value(&colorop->base,
+ colorop->fixed_matrix_type_property,
+                              &val);
+        colorop_state->fixed_matrix_type = val;
+    }
   }
   /**
@@ -561,6 +652,7 @@ static const char * const colorop_type_name[] = {
       [DRM_COLOROP_CTM_3X4] = "3x4 Matrix",
       [DRM_COLOROP_MULTIPLIER] = "Multiplier",
       [DRM_COLOROP_3D_LUT] = "3D LUT",
+    [DRM_COLOROP_FIXED_MATRIX] = "Fixed Matrix",
   };
   static const char * const colorop_lu3d_interpolation_name[] = {
@@ -617,6 +709,21 @@ const char 
 *drm_get_colorop_lut3d_interpolation_name(enum drm_colorop_lut3d_inte
       return colorop_lu3d_interpolation_name[type];
   }
+/**
+ * drm_get_colorop_fixed_matrix_type_name: return a string for 

fixed matrix type
+ * @type: fixed matrix type to compute name of
+ *
+ * In contrast to the other drm_get_*_name functions this one here returns a
+ * const pointer and hence is threadsafe.
+ */
+const char *drm_get_colorop_fixed_matrix_type_name(enum drm_colorop_fixed_matrix_type type)

drivers/gpu/drm/drm_colorop.c +7 -0
+{
+    if (WARN_ON(type >= ARRAY_SIZE(colorop_fixed_matrix_type_names)))
+        return "unknown";
+
+    return colorop_fixed_matrix_type_names[type];
+}
+

  /**
   * drm_colorop_set_next_property - sets the next pointer
   * @colorop: drm colorop

include/drm/drm_colorop.h +0 -0
index bd082854ca74..c13b4b045fff 100644
@@ -134,6 +134,71 @@ enum drm_colorop_curve_1d_type {

      DRM_COLOROP_1D_CURVE_COUNT
  };
+/**
+ * enum drm_colorop_fixed_matrix_type - type of Fixed Matrix
+ *
+ * Describes a Fixed Matrix operation to be applied by the DRM_COLOROP_FIXED_MATRIX
+ */

include/drm/drm_colorop.h +15 -0
+enum drm_colorop_fixed_matrix_type {
+    /**
+     * @DRM_COLOROP_FM_YCBCR601_FULL_RGB:
+     *
+     * enum string "YCbCr 601 Full to RGB"
+     *
+     * This selects the matrix that converts full range YCbCr into RGB
+     * according to the BT.601 coefficients.
+     */
+    DRM_COLOROP_FM_YCBCR601_FULL_RGB,
+
+    /**
+     * @DRM_COLOROP_FM_YCBCR709_FULL_RGB:
+     *
+     * enum string "YCbCr 709 Full to RGB"

include/drm/drm_colorop.h enum drm_colorop_curve_1d_type { · line 166

Quoted 10 lines
include/drm/drm_colorop.h +10 -0
+     *
+     * This selects the matrix that converts full range YCbCr into RGB
+     * according to the BT.709 coefficients.
+     */
+    DRM_COLOROP_FM_YCBCR709_FULL_RGB,
+
+    /**
+     * @DRM_COLOROP_FM_YCBCR2020_NC_FULL_RGB:
+     *
+     * enum string "YCbCr 2020 Full to RGB NC"

Nit: I think you mean "YCbCr 2020 NC Full to RGB"?

Quoted 6 lines
Quoted 5 lines

+     *
+     * This selects the matrix that converts full range YCbCr into RGB +     * according to the BT.2020 non-constant luminance coefficients. +     */
+    DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC,

... and here ^ DRM_COLOROP_FM_YCBCR_NC_FULL_RGB

Ack.

Quoted 11 lines
Quoted 11 lines

+
+    /**
+     * @DRM_COLOROP_FM_YCBCR_LIMITED_FULL:
+     *
+     * enum string "YCbCr limited to full"
+     *
+     * This selects the matrix that converts limited range YCbCr into +     * full range YCbCr. Though not strictly a matrix operation but +     * can be represented as one.
+     */
+    DRM_COLOROP_FM_YCBCR_LIMITED_FULL,

Quoted 5 lines

I didn't full understand how this is going to work.
Looks like it's merging two properties (COLOR_ENCODING and COLOR_RANGE) in a single colorop.
But we can only select one enum value. So how to communicate, for example, a "YCbCr 709 Limited to RGB" conversion?
The driver will have to define a coloro pipeline with two fixed matrix colorop in a row, one with only "Limited to Full" and another with "YCbCr Full to RGB" ?

Quoted 5 lines

It depends on what the HW supports. Let's say a fixed function HW block can itself support "YCbCr Limited to RGB" then we just need a single colorop that exposes this enum. These are being added in the series that Harry published.[1]

In Intel's case, we have two separate blocks to do this. One that does the range correction (Limited to Full) and then a fixed function CSC block that does only "YCbCr Full to RGB" conversion. If they are adjacent in the pipeline, they can very well be represent by a single colorop described in the previous paragraph but we have a unique situation where there is a 1D LUT in between the two blocks.

[YUV Limited to Full] -> [1D LUT] -> [YCbCr XXX Full to RGB] -> [1D LUT].

I see. Thanks for clarifying.

Apart from the DRM_COLOROP_FM_YCBCR_NC_FULL_RGB fix above-mentioned, this patch LGTM. It was missing IGT tests, but I see Harry provided it in the series you linked.

Quoted 100 lines

==
Chaitanya

[1] https://lore.kernel.org/dri-devel/[email protected]/

Quoted 93 lines

Melissa

Quoted 91 lines
include/drm/drm_colorop.h +19 -0
+
+    /**
+     * @DRM_COLOROP_FM_RGB709_RGB2020:
+     *
+     * enum string "RGB709 to RGB2020"
+     *
+     * Selects the fixed-function CSC preset that converts RGB
+     * (BT.709) colorimetry to RGB (BT.2020).
+     */
+    DRM_COLOROP_FM_RGB709_RGB2020,
+
+    /**
+     * @DRM_COLOROP_FM_COUNT:
+     *
+     * enum value denoting the size of the enum
+     */
+    DRM_COLOROP_FM_COUNT
+};
+

  /**
   * struct drm_colorop_state - mutable colorop state */

include/drm/drm_colorop.h +14 -0
@@ -183,6 +248,13 @@ struct drm_colorop_state {
        */
       struct drm_property_blob *data;
+    /**
+     * @fixed_matrix_type:
+     *
+     * Type of Fixed Matrix operation.
+     */
+    enum drm_colorop_fixed_matrix_type fixed_matrix_type;
+
       /** @state: backpointer to global drm_atomic_state */
       struct drm_atomic_state *state;
   };
@@ -368,6 +440,13 @@ struct drm_colorop {
        */
       struct drm_property *data_property;
+    /**
+     * @fixed_matrix_type_property:
+     *
+     * Sub-type for DRM_COLOROP_FIXED_MATRIX type.
+     */
+    struct drm_property *fixed_matrix_type_property;
+
       /**
        * @next_property:
        *
@@ -424,6 +503,10 @@ int drm_plane_colorop_3dlut_init(struct 

drm_device *dev, struct drm_colorop *col
                   uint32_t lut_size,
                   enum drm_colorop_lut3d_interpolation_type interpolation, uint32_t flags);
+int drm_plane_colorop_fixed_matrix_init(struct drm_device *dev, struct drm_colorop *colorop,
+                    struct drm_plane *plane,
+                    const struct drm_colorop_funcs *funcs,
+                    u64 supported_fm, uint32_t flags);
  struct drm_colorop_state * drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop);

include/drm/drm_colorop.h +0 -0
@@ -480,6 +563,7 @@ drm_get_colorop_lut1d_interpolation_name(enum 

drm_colorop_lut1d_interpolation_ty
  const char *
  drm_get_colorop_lut3d_interpolation_name(enum drm_colorop_lut3d_interpolation_type type); +const char *drm_get_colorop_fixed_matrix_type_name(enum drm_colorop_fixed_matrix_type type);
  void drm_colorop_set_next_property(struct drm_colorop *colorop, struct drm_colorop *next);

include/uapi/drm/drm_mode.h +7 -0
index a4bdc4bd11bc..dc4b8566fec8 100644
@@ -971,6 +971,18 @@ enum drm_colorop_type {
        *         color = lut3d[index]
        */
       DRM_COLOROP_3D_LUT,
+
+    /**
+     * @DRM_COLOROP_FIXED_MATRIX:
+     *
+     * enum string "Fixed Matrix"
+     *
+     * A Colorop block that performs a pre-defined matrix operation 

selected
+     * via the FIXED_MATRIX_TYPE enum property. The driver advertises the supported
+     * operations through this property.
+     */
+    DRM_COLOROP_FIXED_MATRIX,
+
  };
  /**

#5 lore raw

Re: [PATCH v2 01/13] drm/colorop: Add DRM_COLOROP_FIXED_MATRIX

Quoted 308 lines · Melissa Wen
Quoted 305 lines · Chaitanya Kumar
Quoted 272 lines · Melissa Wen
Quoted 258 lines · Chaitanya Kumar Borah

Introduce DRM_COLOROP_FIXED_MATRIX, a new colorop type representing a hardware that performs a fixed matrix operation.

Unlike CTM-based colorops, this block does not expose programmable coefficients. Instead, userspace selects one of the predefined hardware modes via a new FIXED_MATRIX_TYPE enum property. Supported modes include common YCbCr->RGB and RGB709->RGB2020 conversions.

v2:
  - Naming changes (Pekka)

---
  drivers/gpu/drm/drm_atomic.c      |   4 ++ drivers/gpu/drm/drm_atomic_uapi.c |   4 ++ drivers/gpu/drm/drm_colorop.c     | 107 ++++++++++++++++++++++++++
++++
  include/drm/drm_colorop.h         |  84 +++++++++++++++++++++++ include/uapi/drm/drm_mode.h       |  12 ++++

  5 files changed, 211 insertions(+)
drivers/gpu/drm/drm_atomic.c +0 -0
index 41c57063f3b4..16a2183b11bf 100644
@@ -845,6 +845,10 @@ static void 
 drm_atomic_colorop_print_state(struct drm_printer *p,

drm_get_colorop_lut3d_interpolation_name(colorop-

Quoted 1 line

lut3d_interpolation));

          drm_printf(p, "\tdata blob id=%d\n", state->data ? state-

Quoted 1 line

data->base.id : 0);

          break;
+    case DRM_COLOROP_FIXED_MATRIX:
+        drm_printf(p, "\tfixed_matrix_type=%s\n", +               drm_get_colorop_fixed_matrix_type_name(state-

Quoted 1 line

fixed_matrix_type));

+        break;
      default:
          break;
      }

drivers/gpu/drm/drm_atomic_uapi.c +2 -0
index 5bd5bf6661df..d69406b08a0f 100644
@@ -761,6 +761,8 @@ static int 
 drm_atomic_colorop_set_property(struct drm_colorop *colorop,
       } else if (property == colorop->data_property) {
           return drm_atomic_color_set_data_property(colorop, state,
                                 property, val);
+    } else if (property == colorop->fixed_matrix_type_property) {
+        state->fixed_matrix_type = val;
       } else {
           drm_dbg_atomic(colorop->dev,

                     "[COLOROP:%d:%d] unknown property [PROP:%d:%s]\n",

drivers/gpu/drm/drm_atomic_uapi.c +2 -0
@@ -793,6 +795,8 @@ drm_atomic_colorop_get_property(struct 
 drm_colorop *colorop,
           *val = colorop->lut3d_interpolation;
       else if (property == colorop->data_property)
           *val = (state->data) ? state->data->base.id : 0;
+    else if (property == colorop->fixed_matrix_type_property)
+        *val = state->fixed_matrix_type;

      else
          return -EINVAL;

drivers/gpu/drm/drm_colorop.c +1 -0
index 566816e3c6f0..dd385e8dacbe 100644
@@ -68,6 +68,7 @@ static const struct drm_prop_enum_list 
 drm_colorop_type_enum_list[] = {
       { DRM_COLOROP_CTM_3X4, "3x4 Matrix"},
       { DRM_COLOROP_MULTIPLIER, "Multiplier"},
       { DRM_COLOROP_3D_LUT, "3D LUT"},
+    { DRM_COLOROP_FIXED_MATRIX, "Fixed Matrix"},
   };
   static const char * const colorop_curve_1d_type_names[] = {
@@ -90,6 +91,14 @@ static const struct drm_prop_enum_list 

drm_colorop_lut3d_interpolation_list[] =
      { DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL, "Tetrahedral" }, };
+static const char * const colorop_fixed_matrix_type_names[] = { +    [DRM_COLOROP_FM_YCBCR601_FULL_RGB]  = "YCbCr 601 Full to RGB", +    [DRM_COLOROP_FM_YCBCR709_FULL_RGB]    = "YCbCr 709 Full to RGB", +    [DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC]  = "YCbCr 2020 Full to RGB NC",
+    [DRM_COLOROP_FM_YCBCR_LIMITED_FULL]  = "YCbCr limited to full", +    [DRM_COLOROP_FM_RGB709_RGB2020]     = "RGB709 to RGB2020",

drivers/gpu/drm/drm_colorop.c +2 -0
+};
+

  /* Init Helpers */
  static int drm_plane_colorop_init(struct drm_device *dev, struct drm_colorop *colorop,

drivers/gpu/drm/drm_colorop.c +0 -0
@@ -455,6 +464,81 @@ int drm_plane_colorop_3dlut_init(struct 

drm_device *dev, struct drm_colorop *col
  }
  EXPORT_SYMBOL(drm_plane_colorop_3dlut_init);
+/**
+ * drm_plane_colorop_fixed_matrix_init - Initialize a DRM_COLOROP_FIXED_MATRIX
+ *
+ * @dev: DRM device
+ * @colorop: The drm_colorop object to initialize
+ * @plane: The associated drm_plane
+ * @funcs: control functions for the new colorop
+ * @supported_fm: A bitfield of supported drm_colorop_fixed_matrix_type enum values,
+ *               created using BIT(fixed_matrix_type) and combined with the OR '|'
+ *               operator.
+ * @flags: bitmask of misc, see DRM_COLOROP_FLAG_* defines.
+ * @return zero on success, -E value on failure
+ */
+int drm_plane_colorop_fixed_matrix_init(struct drm_device *dev, struct drm_colorop *colorop,
+                    struct drm_plane *plane,
+                    const struct drm_colorop_funcs *funcs, +                    u64 supported_fm, uint32_t flags)

drivers/gpu/drm/drm_colorop.c +10 -0
+{
+    struct drm_prop_enum_list enum_list[DRM_COLOROP_FM_COUNT];
+    int i, len;
+
+    struct drm_property *prop;
+    int ret;
+
+    if (!supported_fm) {
+        drm_err(dev,
+            "No supported FM type op for new Fixed Matrix colorop 

on [PLANE:%d:%s]\n",
+            plane->base.id, plane->name);
+        return -EINVAL;
+    }
+
+    if ((supported_fm & -BIT(DRM_COLOROP_FM_COUNT)) != 0) { +        drm_err(dev, "Unknown Fixed Matrix provided on [PLANE:%d:
%s]\n",
+            plane->base.id, plane->name);
+        return -EINVAL;
+    }
+
+    ret = drm_plane_colorop_init(dev, colorop, plane, funcs, DRM_COLOROP_FIXED_MATRIX, flags);
+    if (ret)
+        return ret;

drivers/gpu/drm/drm_colorop.c +15 -0
+
+    len = 0;
+    for (i = 0; i < DRM_COLOROP_FM_COUNT; i++) {
+        if ((supported_fm & BIT(i)) == 0)
+            continue;
+
+        enum_list[len].type = i;
+        enum_list[len].name = colorop_fixed_matrix_type_names[i];
+        len++;
+    }
+
+    if (WARN_ON(len <= 0))
+        return -EINVAL;
+
+    prop = drm_property_create_enum(dev, DRM_MODE_PROP_ATOMIC, 

"FIXED_MATRIX_TYPE",
+                    enum_list, len);

drivers/gpu/drm/drm_colorop.c +7 -0
+
+    if (!prop)
+        return -ENOMEM;
+
+    colorop->fixed_matrix_type_property = prop;
+    /*
+     * Default to the first supported CSC mode as provided by the 

driver.
+     * Intuitively this should be something that keeps the colorop in pixel bypass
+     * mode but that is already handled via the standard colorop bypass
+     * property.
+     */
+    drm_object_attach_property(&colorop->base, colorop-

Quoted 1 line

fixed_matrix_type_property,

+                   enum_list[0].type);
+    drm_colorop_reset(colorop);

drivers/gpu/drm/drm_colorop.c +5 -0
+
+    return 0;
+}
+EXPORT_SYMBOL(drm_plane_colorop_fixed_matrix_init);
+

  static void __drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop, struct drm_colorop_state *state)
  {

drivers/gpu/drm/drm_colorop.c +10 -0
@@ -521,6 +605,13 @@ static void __drm_colorop_state_reset(struct 
 drm_colorop_state *colorop_state,
                                 &val);
           colorop_state->curve_1d_type = val;
       }
+
+    if (colorop->fixed_matrix_type_property) {
+ drm_object_property_get_default_value(&colorop->base,
+ colorop->fixed_matrix_type_property,
+                              &val);
+        colorop_state->fixed_matrix_type = val;
+    }
   }
   /**
@@ -561,6 +652,7 @@ static const char * const colorop_type_name[] = {
       [DRM_COLOROP_CTM_3X4] = "3x4 Matrix",
       [DRM_COLOROP_MULTIPLIER] = "Multiplier",
       [DRM_COLOROP_3D_LUT] = "3D LUT",
+    [DRM_COLOROP_FIXED_MATRIX] = "Fixed Matrix",
   };
   static const char * const colorop_lu3d_interpolation_name[] = {
@@ -617,6 +709,21 @@ const char 
 *drm_get_colorop_lut3d_interpolation_name(enum drm_colorop_lut3d_inte
       return colorop_lu3d_interpolation_name[type];
   }
+/**
+ * drm_get_colorop_fixed_matrix_type_name: return a string for 

fixed matrix type
+ * @type: fixed matrix type to compute name of
+ *
+ * In contrast to the other drm_get_*_name functions this one here returns a
+ * const pointer and hence is threadsafe.
+ */
+const char *drm_get_colorop_fixed_matrix_type_name(enum drm_colorop_fixed_matrix_type type)

drivers/gpu/drm/drm_colorop.c +7 -0
+{
+    if (WARN_ON(type >= ARRAY_SIZE(colorop_fixed_matrix_type_names)))
+        return "unknown";
+
+    return colorop_fixed_matrix_type_names[type];
+}
+

  /**
   * drm_colorop_set_next_property - sets the next pointer
   * @colorop: drm colorop

include/drm/drm_colorop.h +0 -0
index bd082854ca74..c13b4b045fff 100644
@@ -134,6 +134,71 @@ enum drm_colorop_curve_1d_type {

      DRM_COLOROP_1D_CURVE_COUNT
  };
+/**
+ * enum drm_colorop_fixed_matrix_type - type of Fixed Matrix
+ *
+ * Describes a Fixed Matrix operation to be applied by the DRM_COLOROP_FIXED_MATRIX
+ */

include/drm/drm_colorop.h +15 -0
+enum drm_colorop_fixed_matrix_type {
+    /**
+     * @DRM_COLOROP_FM_YCBCR601_FULL_RGB:
+     *
+     * enum string "YCbCr 601 Full to RGB"
+     *
+     * This selects the matrix that converts full range YCbCr into RGB
+     * according to the BT.601 coefficients.
+     */
+    DRM_COLOROP_FM_YCBCR601_FULL_RGB,
+
+    /**
+     * @DRM_COLOROP_FM_YCBCR709_FULL_RGB:
+     *
+     * enum string "YCbCr 709 Full to RGB"

include/drm/drm_colorop.h enum drm_colorop_curve_1d_type { · line 166

Quoted 10 lines
include/drm/drm_colorop.h +10 -0
+     *
+     * This selects the matrix that converts full range YCbCr into RGB
+     * according to the BT.709 coefficients.
+     */
+    DRM_COLOROP_FM_YCBCR709_FULL_RGB,
+
+    /**
+     * @DRM_COLOROP_FM_YCBCR2020_NC_FULL_RGB:
+     *
+     * enum string "YCbCr 2020 Full to RGB NC"

Nit: I think you mean "YCbCr 2020 NC Full to RGB"?

Quoted 6 lines
Quoted 5 lines

+     *
+     * This selects the matrix that converts full range YCbCr into RGB +     * according to the BT.2020 non-constant luminance coefficients. +     */
+    DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC,

... and here ^ DRM_COLOROP_FM_YCBCR_NC_FULL_RGB

Ack.

Quoted 11 lines
Quoted 11 lines

+
+    /**
+     * @DRM_COLOROP_FM_YCBCR_LIMITED_FULL:
+     *
+     * enum string "YCbCr limited to full"
+     *
+     * This selects the matrix that converts limited range YCbCr into +     * full range YCbCr. Though not strictly a matrix operation but +     * can be represented as one.
+     */
+    DRM_COLOROP_FM_YCBCR_LIMITED_FULL,

Quoted 5 lines

I didn't full understand how this is going to work.
Looks like it's merging two properties (COLOR_ENCODING and COLOR_RANGE) in a single colorop.
But we can only select one enum value. So how to communicate, for example, a "YCbCr 709 Limited to RGB" conversion?
The driver will have to define a coloro pipeline with two fixed matrix colorop in a row, one with only "Limited to Full" and another with "YCbCr Full to RGB" ?

It depends on what the HW supports. Let's say a fixed function HW block can itself support "YCbCr Limited to RGB" then we just need a single colorop that exposes this enum. These are being added in the series that Harry published.[1]

In Intel's case, we have two separate blocks to do this. One that does the range correction (Limited to Full) and then a fixed function CSC block that does only "YCbCr Full to RGB" conversion. If they are adjacent in the pipeline, they can very well be represent by a single colorop described in the previous paragraph but we have a unique situation where there is a 1D LUT in between the two blocks.

Quoted 9 lines
Quoted 1 line

[YUV Limited to Full] -> [1D LUT] -> [YCbCr XXX Full to RGB] -> [1D LUT].

I see. Thanks for clarifying.

Apart from the DRM_COLOROP_FM_YCBCR_NC_FULL_RGB fix above-mentioned, this patch LGTM. It was missing IGT tests, but I see Harry provided it in the series you linked.

Thank you, Melissa, for the review.

Regarding the IGTs they are yet to be upstreamed with this version of the series as we are still working out how to use CRC matching for pass criteria. (As i915/xe does not have writeback hooked up yet)

==
Chaitanya

Quoted 101 lines
Quoted 100 lines

==
Chaitanya

[1] https://lore.kernel.org/dri-devel/20260330153451.99472-3- [email protected]/

Quoted 93 lines

Melissa

Quoted 91 lines
include/drm/drm_colorop.h +19 -0
+
+    /**
+     * @DRM_COLOROP_FM_RGB709_RGB2020:
+     *
+     * enum string "RGB709 to RGB2020"
+     *
+     * Selects the fixed-function CSC preset that converts RGB
+     * (BT.709) colorimetry to RGB (BT.2020).
+     */
+    DRM_COLOROP_FM_RGB709_RGB2020,
+
+    /**
+     * @DRM_COLOROP_FM_COUNT:
+     *
+     * enum value denoting the size of the enum
+     */
+    DRM_COLOROP_FM_COUNT
+};
+

  /**
   * struct drm_colorop_state - mutable colorop state */

include/drm/drm_colorop.h +14 -0
@@ -183,6 +248,13 @@ struct drm_colorop_state {
        */
       struct drm_property_blob *data;
+    /**
+     * @fixed_matrix_type:
+     *
+     * Type of Fixed Matrix operation.
+     */
+    enum drm_colorop_fixed_matrix_type fixed_matrix_type;
+
       /** @state: backpointer to global drm_atomic_state */
       struct drm_atomic_state *state;
   };
@@ -368,6 +440,13 @@ struct drm_colorop {
        */
       struct drm_property *data_property;
+    /**
+     * @fixed_matrix_type_property:
+     *
+     * Sub-type for DRM_COLOROP_FIXED_MATRIX type.
+     */
+    struct drm_property *fixed_matrix_type_property;
+
       /**
        * @next_property:
        *
@@ -424,6 +503,10 @@ int drm_plane_colorop_3dlut_init(struct 

drm_device *dev, struct drm_colorop *col
                   uint32_t lut_size,
                   enum drm_colorop_lut3d_interpolation_type interpolation, uint32_t flags);
+int drm_plane_colorop_fixed_matrix_init(struct drm_device *dev, struct drm_colorop *colorop,
+                    struct drm_plane *plane,
+                    const struct drm_colorop_funcs *funcs,
+                    u64 supported_fm, uint32_t flags);
  struct drm_colorop_state * drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop);

include/drm/drm_colorop.h +0 -0
@@ -480,6 +563,7 @@ drm_get_colorop_lut1d_interpolation_name(enum 

drm_colorop_lut1d_interpolation_ty
  const char *
  drm_get_colorop_lut3d_interpolation_name(enum drm_colorop_lut3d_interpolation_type type); +const char *drm_get_colorop_fixed_matrix_type_name(enum drm_colorop_fixed_matrix_type type);
  void drm_colorop_set_next_property(struct drm_colorop *colorop, struct drm_colorop *next);

include/uapi/drm/drm_mode.h +7 -0
index a4bdc4bd11bc..dc4b8566fec8 100644
@@ -971,6 +971,18 @@ enum drm_colorop_type {
        *         color = lut3d[index]
        */
       DRM_COLOROP_3D_LUT,
+
+    /**
+     * @DRM_COLOROP_FIXED_MATRIX:
+     *
+     * enum string "Fixed Matrix"
+     *
+     * A Colorop block that performs a pre-defined matrix operation 

selected
+     * via the FIXED_MATRIX_TYPE enum property. The driver advertises the supported
+     * operations through this property.
+     */
+    DRM_COLOROP_FIXED_MATRIX,
+
  };
  /**

#6 lore raw

Re: [PATCH v2 01/13] drm/colorop: Add DRM_COLOROP_FIXED_MATRIX

Quoted 1 line · Chaitanya Kumar

Regarding the IGTs they are yet to be upstreamed with this version of the series as we are still working out how to use CRC matching for pass criteria. (As i915/xe does not have writeback hooked up yet)

Out of curiousity, are you working on adding writeback support to them?

Melissa

#7 lore raw

Re: [PATCH v2 01/13] drm/colorop: Add DRM_COLOROP_FIXED_MATRIX

Quoted 4 lines · Melissa Wen
Quoted 1 line · Chaitanya Kumar

Regarding the IGTs they are yet to be upstreamed with this version of the series as we are still working out how to use CRC matching for pass criteria. (As i915/xe does not have writeback hooked up yet)

Out of curiousity, are you working on adding writeback support to them?

It is currently a work in progress.

https://lore.kernel.org/dri-devel/[email protected]/

https://lore.kernel.org/intel-gfx/[email protected]/

==
Chaitanya

Reviewed-by
#8 lore raw

Re: [PATCH v2 01/13] drm/colorop: Add DRM_COLOROP_FIXED_MATRIX

In reply to Melissa Wen
Quoted 279 lines · Melissa Wen
Quoted 276 lines · Chaitanya Kumar
Quoted 243 lines · Melissa Wen
Quoted 229 lines · Chaitanya Kumar Borah

Introduce DRM_COLOROP_FIXED_MATRIX, a new colorop type representing a hardware that performs a fixed matrix operation.

Unlike CTM-based colorops, this block does not expose programmable coefficients. Instead, userspace selects one of the predefined hardware modes via a new FIXED_MATRIX_TYPE enum property. Supported modes include common YCbCr->RGB and RGB709->RGB2020 conversions.

v2:
  - Naming changes (Pekka)

---
  drivers/gpu/drm/drm_atomic.c      |   4 ++ drivers/gpu/drm/drm_atomic_uapi.c |   4 ++ drivers/gpu/drm/drm_colorop.c     | 107 ++++++++++++++++++++++++++++++ include/drm/drm_colorop.h         |  84 +++++++++++++++++++++++ include/uapi/drm/drm_mode.h       |  12 ++++

  5 files changed, 211 insertions(+)
drivers/gpu/drm/drm_atomic.c +4 -0
index 41c57063f3b4..16a2183b11bf 100644
@@ -845,6 +845,10 @@ static void drm_atomic_colorop_print_state(struct drm_printer *p,
 drm_get_colorop_lut3d_interpolation_name(colorop- >lut3d_interpolation));
           drm_printf(p, "\tdata blob id=%d\n", state->data ? state- >data->base.id : 0);
           break;
+    case DRM_COLOROP_FIXED_MATRIX:
+        drm_printf(p, "\tfixed_matrix_type=%s\n",
+               drm_get_colorop_fixed_matrix_type_name(state- >fixed_matrix_type));
+        break;

      default:
          break;
      }

drivers/gpu/drm/drm_atomic_uapi.c +4 -0
index 5bd5bf6661df..d69406b08a0f 100644
@@ -761,6 +761,8 @@ static int drm_atomic_colorop_set_property(struct drm_colorop *colorop,
       } else if (property == colorop->data_property) {
           return drm_atomic_color_set_data_property(colorop, state,
                                 property, val);
+    } else if (property == colorop->fixed_matrix_type_property) {
+        state->fixed_matrix_type = val;
       } else {
           drm_dbg_atomic(colorop->dev,
                      "[COLOROP:%d:%d] unknown property [PROP:%d:%s]\n",
@@ -793,6 +795,8 @@ drm_atomic_colorop_get_property(struct drm_colorop *colorop,
           *val = colorop->lut3d_interpolation;
       else if (property == colorop->data_property)
           *val = (state->data) ? state->data->base.id : 0;
+    else if (property == colorop->fixed_matrix_type_property)
+        *val = state->fixed_matrix_type;

      else
          return -EINVAL;

drivers/gpu/drm/drm_colorop.c +107 -0
index 566816e3c6f0..dd385e8dacbe 100644
@@ -68,6 +68,7 @@ static const struct drm_prop_enum_list drm_colorop_type_enum_list[] = {
       { DRM_COLOROP_CTM_3X4, "3x4 Matrix"},
       { DRM_COLOROP_MULTIPLIER, "Multiplier"},
       { DRM_COLOROP_3D_LUT, "3D LUT"},
+    { DRM_COLOROP_FIXED_MATRIX, "Fixed Matrix"},
   };
   static const char * const colorop_curve_1d_type_names[] = {
@@ -90,6 +91,14 @@ static const struct drm_prop_enum_list drm_colorop_lut3d_interpolation_list[] =
       { DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL, "Tetrahedral" },
   };
+static const char * const colorop_fixed_matrix_type_names[] = {
+    [DRM_COLOROP_FM_YCBCR601_FULL_RGB]  = "YCbCr 601 Full to RGB",
+    [DRM_COLOROP_FM_YCBCR709_FULL_RGB]    = "YCbCr 709 Full to RGB",
+    [DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC]  = "YCbCr 2020 Full to RGB NC",
+    [DRM_COLOROP_FM_YCBCR_LIMITED_FULL]  = "YCbCr limited to full",
+    [DRM_COLOROP_FM_RGB709_RGB2020]     = "RGB709 to RGB2020",
+};
+
   /* Init Helpers */
   static int drm_plane_colorop_init(struct drm_device *dev, struct drm_colorop *colorop,
@@ -455,6 +464,81 @@ int drm_plane_colorop_3dlut_init(struct drm_device *dev, struct drm_colorop *col
   }
   EXPORT_SYMBOL(drm_plane_colorop_3dlut_init);
+/**
+ * drm_plane_colorop_fixed_matrix_init - Initialize a DRM_COLOROP_FIXED_MATRIX
+ *
+ * @dev: DRM device
+ * @colorop: The drm_colorop object to initialize
+ * @plane: The associated drm_plane
+ * @funcs: control functions for the new colorop
+ * @supported_fm: A bitfield of supported drm_colorop_fixed_matrix_type enum values,
+ *               created using BIT(fixed_matrix_type) and combined with the OR '|'
+ *               operator.
+ * @flags: bitmask of misc, see DRM_COLOROP_FLAG_* defines.
+ * @return zero on success, -E value on failure
+ */
+int drm_plane_colorop_fixed_matrix_init(struct drm_device *dev, struct drm_colorop *colorop,
+                    struct drm_plane *plane,
+                    const struct drm_colorop_funcs *funcs,
+                    u64 supported_fm, uint32_t flags)
+{
+    struct drm_prop_enum_list enum_list[DRM_COLOROP_FM_COUNT];
+    int i, len;
+
+    struct drm_property *prop;
+    int ret;
+
+    if (!supported_fm) {
+        drm_err(dev,
+            "No supported FM type op for new Fixed Matrix colorop on [PLANE:%d:%s]\n",
+            plane->base.id, plane->name);
+        return -EINVAL;
+    }
+
+    if ((supported_fm & -BIT(DRM_COLOROP_FM_COUNT)) != 0) {
+        drm_err(dev, "Unknown Fixed Matrix provided on [PLANE:%d:%s]\n",
+            plane->base.id, plane->name);
+        return -EINVAL;
+    }
+
+    ret = drm_plane_colorop_init(dev, colorop, plane, funcs, DRM_COLOROP_FIXED_MATRIX, flags);
+    if (ret)
+        return ret;
+
+    len = 0;
+    for (i = 0; i < DRM_COLOROP_FM_COUNT; i++) {
+        if ((supported_fm & BIT(i)) == 0)
+            continue;
+
+        enum_list[len].type = i;
+        enum_list[len].name = colorop_fixed_matrix_type_names[i];
+        len++;
+    }
+
+    if (WARN_ON(len <= 0))
+        return -EINVAL;
+
+    prop = drm_property_create_enum(dev, DRM_MODE_PROP_ATOMIC, "FIXED_MATRIX_TYPE",
+                    enum_list, len);
+
+    if (!prop)
+        return -ENOMEM;
+
+    colorop->fixed_matrix_type_property = prop;
+    /*
+     * Default to the first supported CSC mode as provided by the driver.
+     * Intuitively this should be something that keeps the colorop in pixel bypass
+     * mode but that is already handled via the standard colorop bypass
+     * property.
+     */
+    drm_object_attach_property(&colorop->base, colorop- >fixed_matrix_type_property,
+                   enum_list[0].type);
+    drm_colorop_reset(colorop);
+
+    return 0;
+}
+EXPORT_SYMBOL(drm_plane_colorop_fixed_matrix_init);
+
   static void __drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop,
                               struct drm_colorop_state *state)
   {
@@ -521,6 +605,13 @@ static void __drm_colorop_state_reset(struct drm_colorop_state *colorop_state,
                                 &val);
           colorop_state->curve_1d_type = val;
       }
+
+    if (colorop->fixed_matrix_type_property) {
+ drm_object_property_get_default_value(&colorop->base,
+ colorop->fixed_matrix_type_property,
+                              &val);
+        colorop_state->fixed_matrix_type = val;
+    }
   }
   /**
@@ -561,6 +652,7 @@ static const char * const colorop_type_name[] = {
       [DRM_COLOROP_CTM_3X4] = "3x4 Matrix",
       [DRM_COLOROP_MULTIPLIER] = "Multiplier",
       [DRM_COLOROP_3D_LUT] = "3D LUT",
+    [DRM_COLOROP_FIXED_MATRIX] = "Fixed Matrix",
   };
   static const char * const colorop_lu3d_interpolation_name[] = {
@@ -617,6 +709,21 @@ const char *drm_get_colorop_lut3d_interpolation_name(enum drm_colorop_lut3d_inte
       return colorop_lu3d_interpolation_name[type];
   }
+/**
+ * drm_get_colorop_fixed_matrix_type_name: return a string for fixed matrix type
+ * @type: fixed matrix type to compute name of
+ *
+ * In contrast to the other drm_get_*_name functions this one here returns a
+ * const pointer and hence is threadsafe.
+ */
+const char *drm_get_colorop_fixed_matrix_type_name(enum drm_colorop_fixed_matrix_type type)
+{
+    if (WARN_ON(type >= ARRAY_SIZE(colorop_fixed_matrix_type_names)))
+        return "unknown";
+
+    return colorop_fixed_matrix_type_names[type];
+}
+
   /**
    * drm_colorop_set_next_property - sets the next pointer
    * @colorop: drm colorop
include/drm/drm_colorop.h +0 -0
index bd082854ca74..c13b4b045fff 100644
@@ -134,6 +134,71 @@ enum drm_colorop_curve_1d_type {

      DRM_COLOROP_1D_CURVE_COUNT
  };

include/drm/drm_colorop.h +20 -0
+/**
+ * enum drm_colorop_fixed_matrix_type - type of Fixed Matrix
+ *
+ * Describes a Fixed Matrix operation to be applied by the DRM_COLOROP_FIXED_MATRIX
+ */
+enum drm_colorop_fixed_matrix_type {
+    /**
+     * @DRM_COLOROP_FM_YCBCR601_FULL_RGB:
+     *
+     * enum string "YCbCr 601 Full to RGB"
+     *
+     * This selects the matrix that converts full range YCbCr into RGB
+     * according to the BT.601 coefficients.
+     */
+    DRM_COLOROP_FM_YCBCR601_FULL_RGB,
+
+    /**
+     * @DRM_COLOROP_FM_YCBCR709_FULL_RGB:
+     *
+     * enum string "YCbCr 709 Full to RGB"

include/drm/drm_colorop.h enum drm_colorop_curve_1d_type { · line 166

Quoted 10 lines
include/drm/drm_colorop.h +10 -0
+     *
+     * This selects the matrix that converts full range YCbCr into RGB
+     * according to the BT.709 coefficients.
+     */
+    DRM_COLOROP_FM_YCBCR709_FULL_RGB,
+
+    /**
+     * @DRM_COLOROP_FM_YCBCR2020_NC_FULL_RGB:
+     *
+     * enum string "YCbCr 2020 Full to RGB NC"

Nit: I think you mean "YCbCr 2020 NC Full to RGB"?

Quoted 6 lines
Quoted 5 lines

+     *
+     * This selects the matrix that converts full range YCbCr into RGB +     * according to the BT.2020 non-constant luminance coefficients. +     */
+    DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC,

... and here ^ DRM_COLOROP_FM_YCBCR_NC_FULL_RGB

Ack.

Quoted 11 lines
Quoted 11 lines

+
+    /**
+     * @DRM_COLOROP_FM_YCBCR_LIMITED_FULL:
+     *
+     * enum string "YCbCr limited to full"
+     *
+     * This selects the matrix that converts limited range YCbCr into +     * full range YCbCr. Though not strictly a matrix operation but +     * can be represented as one.
+     */
+    DRM_COLOROP_FM_YCBCR_LIMITED_FULL,

Quoted 5 lines

I didn't full understand how this is going to work.
Looks like it's merging two properties (COLOR_ENCODING and COLOR_RANGE) in a single colorop.
But we can only select one enum value. So how to communicate, for example, a "YCbCr 709 Limited to RGB" conversion?
The driver will have to define a coloro pipeline with two fixed matrix colorop in a row, one with only "Limited to Full" and another with "YCbCr Full to RGB" ?

It depends on what the HW supports. Let's say a fixed function HW block can itself support "YCbCr Limited to RGB" then we just need a single colorop that exposes this enum. These are being added in the series that Harry published.[1]

In Intel's case, we have two separate blocks to do this. One that does the range correction (Limited to Full) and then a fixed function CSC block that does only "YCbCr Full to RGB" conversion. If they are adjacent in the pipeline, they can very well be represent by a single colorop described in the previous paragraph but we have a unique situation where there is a 1D LUT in between the two blocks.

Quoted 8 lines
Quoted 1 line

[YUV Limited to Full] -> [1D LUT] -> [YCbCr XXX Full to RGB] -> [1D LUT].

I see. Thanks for clarifying.

Apart from the DRM_COLOROP_FM_YCBCR_NC_FULL_RGB fix above-mentioned, this patch LGTM. It was missing IGT tests, but I see Harry provided it in the series you linked.

Feel free to also add my

Harry

Quoted 96 lines
Quoted 95 lines

==
Chaitanya

[1] https://lore.kernel.org/dri-devel/[email protected]/

Quoted 87 lines

Melissa

Quoted 85 lines
include/drm/drm_colorop.h +19 -0
+
+    /**
+     * @DRM_COLOROP_FM_RGB709_RGB2020:
+     *
+     * enum string "RGB709 to RGB2020"
+     *
+     * Selects the fixed-function CSC preset that converts RGB
+     * (BT.709) colorimetry to RGB (BT.2020).
+     */
+    DRM_COLOROP_FM_RGB709_RGB2020,
+
+    /**
+     * @DRM_COLOROP_FM_COUNT:
+     *
+     * enum value denoting the size of the enum
+     */
+    DRM_COLOROP_FM_COUNT
+};
+

  /**
   * struct drm_colorop_state - mutable colorop state */

include/drm/drm_colorop.h +18 -0
@@ -183,6 +248,13 @@ struct drm_colorop_state {
        */
       struct drm_property_blob *data;
+    /**
+     * @fixed_matrix_type:
+     *
+     * Type of Fixed Matrix operation.
+     */
+    enum drm_colorop_fixed_matrix_type fixed_matrix_type;
+
       /** @state: backpointer to global drm_atomic_state */
       struct drm_atomic_state *state;
   };
@@ -368,6 +440,13 @@ struct drm_colorop {
        */
       struct drm_property *data_property;
+    /**
+     * @fixed_matrix_type_property:
+     *
+     * Sub-type for DRM_COLOROP_FIXED_MATRIX type.
+     */
+    struct drm_property *fixed_matrix_type_property;
+
       /**
        * @next_property:
        *
@@ -424,6 +503,10 @@ int drm_plane_colorop_3dlut_init(struct drm_device *dev, struct drm_colorop *col
                    uint32_t lut_size,
                    enum drm_colorop_lut3d_interpolation_type interpolation,
                    uint32_t flags);
+int drm_plane_colorop_fixed_matrix_init(struct drm_device *dev, struct drm_colorop *colorop,
+                    struct drm_plane *plane,
+                    const struct drm_colorop_funcs *funcs,
+                    u64 supported_fm, uint32_t flags);

  struct drm_colorop_state * drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop);

include/drm/drm_colorop.h +0 -0
@@ -480,6 +563,7 @@ drm_get_colorop_lut1d_interpolation_name(enum drm_colorop_lut1d_interpolation_ty

  const char *
  drm_get_colorop_lut3d_interpolation_name(enum drm_colorop_lut3d_interpolation_type type); +const char *drm_get_colorop_fixed_matrix_type_name(enum drm_colorop_fixed_matrix_type type); void drm_colorop_set_next_property(struct drm_colorop *colorop, struct drm_colorop *next);

include/uapi/drm/drm_mode.h +12 -0
index a4bdc4bd11bc..dc4b8566fec8 100644
@@ -971,6 +971,18 @@ enum drm_colorop_type {
        *         color = lut3d[index]
        */
       DRM_COLOROP_3D_LUT,
+
+    /**
+     * @DRM_COLOROP_FIXED_MATRIX:
+     *
+     * enum string "Fixed Matrix"
+     *
+     * A Colorop block that performs a pre-defined matrix operation selected
+     * via the FIXED_MATRIX_TYPE enum property. The driver advertises the supported
+     * operations through this property.
+     */
+    DRM_COLOROP_FIXED_MATRIX,
+
   };
   /**
#9 lore raw

PATCH v2 2/13 drm/i915/color: Add CSC on SDR plane color pipeline

In reply to Chaitanya Kumar Borah

Add the fixed-function CSC block to color pipeline in SDR planes as a DRM_COLOROP_FIXED_MATRIX colorop.

---
 .../drm/i915/display/intel_color_pipeline.c   | 22 ++++++++++++++++++-
 .../drm/i915/display/intel_display_limits.h   |  1 +
 2 files changed, 22 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_color_pipeline.c +21 -1
index 6cf8080ee800..49c621d1bf22 100644
@@ -43,6 +43,16 @@ static const enum intel_color_block hdr_plane_pipeline[] = {
 	INTEL_PLANE_CB_POST_CSC_LUT,
 };
 
+static const enum intel_color_block sdr_plane_pipeline[] = {
+	INTEL_PLANE_CB_CSC_FF,
+};
+
+static const u64 intel_plane_supported_csc_ff =
+		BIT(DRM_COLOROP_FM_YCBCR601_FULL_RGB) |
+		BIT(DRM_COLOROP_FM_YCBCR709_FULL_RGB) |
+		BIT(DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC) |
+		BIT(DRM_COLOROP_FM_RGB709_RGB2020);
+
 static bool plane_has_3dlut(struct intel_display *display, enum pipe pipe,
 			    struct drm_plane *plane)
 {
@@ -92,6 +102,12 @@ struct intel_colorop *intel_color_pipeline_plane_add_colorop(struct drm_plane *p
 							  DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR,
 							  DRM_COLOROP_FLAG_ALLOW_BYPASS);
 		break;
+	case INTEL_PLANE_CB_CSC_FF:
+		ret = drm_plane_colorop_fixed_matrix_init(dev, &colorop->base, plane,
+							  &intel_colorop_funcs,
+							  intel_plane_supported_csc_ff,
+							  DRM_COLOROP_FLAG_ALLOW_BYPASS);
+		break;
 	default:
 		drm_err(plane->dev, "Invalid colorop id [%d]", id);
 		ret = -EINVAL;
@@ -122,13 +138,17 @@ int _intel_color_pipeline_plane_init(struct drm_plane *plane, struct drm_prop_en
 	int pipeline_len;
 	int ret = 0;
 	int i;
+	bool is_hdr = icl_is_hdr_plane(display, to_intel_plane(plane)->id);
 
 	if (plane_has_3dlut(display, pipe, plane)) {
 		pipeline = xe3plpd_primary_plane_pipeline;
 		pipeline_len = ARRAY_SIZE(xe3plpd_primary_plane_pipeline);
-	} else {
+	} else if (is_hdr) {
 		pipeline = hdr_plane_pipeline;
 		pipeline_len = ARRAY_SIZE(hdr_plane_pipeline);
+	} else {
+		pipeline = sdr_plane_pipeline;
+		pipeline_len = ARRAY_SIZE(sdr_plane_pipeline);
 	}
 
 	for (i = 0; i < pipeline_len; i++) {
drivers/gpu/drm/i915/display/intel_display_limits.h +1 -0
index 453f7b720815..f4aad54472ce 100644
@@ -167,6 +167,7 @@ enum aux_ch {
 enum intel_color_block {
 	INTEL_PLANE_CB_PRE_CSC_LUT,
 	INTEL_PLANE_CB_CSC,
+	INTEL_PLANE_CB_CSC_FF,
 	INTEL_PLANE_CB_POST_CSC_LUT,
 	INTEL_PLANE_CB_3DLUT,
 
Signature · 1 line
2.25.1
#10 lore raw

PATCH v2 3/13 drm/i915/color: Program fixed-function CSC on SDR planes

In reply to Chaitanya Kumar Borah

Program the fixed-function CSC block for SDR planes based on the DRM_COLOROP_FIXED_MATRIX state.

Track the bypass state explicitly as a boolean in the plane hw state since bypass is managed separately from the FIXED_MATRIX enum value in the colorop framework.

---
 .../drm/i915/display/intel_display_types.h    |  2 ++
 drivers/gpu/drm/i915/display/intel_plane.c    | 12 ++++++--
 .../drm/i915/display/skl_universal_plane.c    | 30 +++++++++++++++++++
 3 files changed, 42 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_display_types.h +2 -0
index e2496db1642a..3347bba598d9 100644
@@ -679,6 +679,8 @@ struct intel_plane_state {
 		enum drm_color_range color_range;
 		enum drm_scaling_filter scaling_filter;
 		struct drm_property_blob *ctm, *degamma_lut, *gamma_lut, *lut_3d;
+		enum drm_colorop_fixed_matrix_type csc_ff_type; /* For SDR plane */
+		bool csc_ff_enable;
 	} hw;
 
 	struct i915_vma *ggtt_vma;
drivers/gpu/drm/i915/display/intel_plane.c +10 -2
index 5390ceb21ca4..3ef43db8d5d7 100644
@@ -378,11 +378,19 @@ intel_plane_color_copy_uapi_to_hw_state(struct intel_plane_state *plane_state,
 	while (iter_colorop) {
 		for_each_new_colorop_in_state(state, colorop, new_colorop_state, i) {
 			if (new_colorop_state->colorop == iter_colorop) {
-				blob = new_colorop_state->bypass ? NULL : new_colorop_state->data;
 				intel_colorop = to_intel_colorop(colorop);
-				changed |= intel_plane_colorop_replace_blob(plane_state,
+				if (intel_colorop->id == INTEL_PLANE_CB_CSC_FF) {
+					plane_state->hw.csc_ff_enable =
+						!new_colorop_state->bypass;
+					plane_state->hw.csc_ff_type =
+						new_colorop_state->fixed_matrix_type;
+				} else {
+					blob = new_colorop_state->bypass ?
+						NULL : new_colorop_state->data;
+					changed |= intel_plane_colorop_replace_blob(plane_state,
 									    intel_colorop,
 									    blob);
+				}
 			}
 		}
 		iter_colorop = iter_colorop->next;
drivers/gpu/drm/i915/display/skl_universal_plane.c +30 -0
index 11ba42c67e3e..2234abcd1b03 100644
@@ -1240,6 +1240,32 @@ static u32 glk_plane_color_ctl_crtc(const struct intel_crtc_state *crtc_state)
 	return plane_color_ctl;
 }
 
+static u32 intel_csc_ff_type_to_csc_mode(enum drm_colorop_fixed_matrix_type csc_ff_type,
+					 bool enable)
+{
+	u32 csc_mode = PLANE_COLOR_CSC_MODE_BYPASS;
+
+	if (enable) {
+		switch (csc_ff_type) {
+		case DRM_COLOROP_FM_YCBCR601_FULL_RGB:
+			csc_mode = PLANE_COLOR_CSC_MODE_YUV601_TO_RGB601;
+			break;
+		case DRM_COLOROP_FM_YCBCR709_FULL_RGB:
+			csc_mode = PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;
+			break;
+		case DRM_COLOROP_FM_YCBCR2020_FULL_RGB_NC:
+			csc_mode = PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;
+			break;
+		case DRM_COLOROP_FM_RGB709_RGB2020:
+			csc_mode = PLANE_COLOR_CSC_MODE_RGB709_TO_RGB2020;
+			break;
+		default:
+			csc_mode = PLANE_COLOR_CSC_MODE_BYPASS;
+		}
+	}
+	return csc_mode;
+}
+
 static u32 glk_plane_color_ctl(const struct intel_plane_state *plane_state)
 {
 	struct intel_display *display = to_intel_display(plane_state);
@@ -1271,6 +1297,10 @@ static u32 glk_plane_color_ctl(const struct intel_plane_state *plane_state)
 			plane_color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
 	}
 
+	if (!icl_is_hdr_plane(display, plane->id))
+		plane_color_ctl |= intel_csc_ff_type_to_csc_mode(plane_state->hw.csc_ff_type,
+								 plane_state->hw.csc_ff_enable);
+
 	if (plane_state->force_black)
 		plane_color_ctl |= PLANE_COLOR_PLANE_CSC_ENABLE;
 
Signature · 1 line
2.25.1
#11 lore raw

PATCH v2 4/13 drm/i915/color: Add support for 1D LUT in SDR planes

In reply to Chaitanya Kumar Borah

Extend the SDR plane color pipeline to include pre- and post-CSC 1D LUT blocks.

SDR planes use a smaller LUT size than HDR planes and therefore initialize the 1D LUT colorops with the appropriate hardware capacity.

---
 drivers/gpu/drm/i915/display/intel_color_pipeline.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_color_pipeline.c +8 -1
index 49c621d1bf22..20f5e0e83496 100644
@@ -15,6 +15,7 @@
 #define MAX_COLOROP 4
 #define PLANE_DEGAMMA_SIZE 128
 #define PLANE_GAMMA_SIZE 32
+#define PLANE_DEGAMMA_SIZE_SDR 32
 
 static const struct drm_colorop_funcs intel_colorop_funcs = {
 	.destroy = intel_colorop_destroy,
@@ -44,7 +45,9 @@ static const enum intel_color_block hdr_plane_pipeline[] = {
 };
 
 static const enum intel_color_block sdr_plane_pipeline[] = {
+	INTEL_PLANE_CB_PRE_CSC_LUT,
 	INTEL_PLANE_CB_CSC_FF,
+	INTEL_PLANE_CB_POST_CSC_LUT,
 };
 
 static const u64 intel_plane_supported_csc_ff =
@@ -67,8 +70,10 @@ struct intel_colorop *intel_color_pipeline_plane_add_colorop(struct drm_plane *p
 							     enum intel_color_block id)
 {
 	struct drm_device *dev = plane->dev;
+	struct intel_display *display = to_intel_display(dev);
 	struct intel_colorop *colorop;
 	int ret;
+	bool is_hdr = icl_is_hdr_plane(display, to_intel_plane(plane)->id);
 
 	colorop = intel_colorop_create(id);
 
@@ -80,7 +85,9 @@ struct intel_colorop *intel_color_pipeline_plane_add_colorop(struct drm_plane *p
 		ret = drm_plane_colorop_curve_1d_lut_init(dev,
 							  &colorop->base, plane,
 							  &intel_colorop_funcs,
-							  PLANE_DEGAMMA_SIZE,
+							  is_hdr ?
+							  PLANE_DEGAMMA_SIZE :
+							  PLANE_DEGAMMA_SIZE_SDR,
 							  DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR,
 							  DRM_COLOROP_FLAG_ALLOW_BYPASS);
 		break;
Signature · 1 line
2.25.1
#12 lore raw

PATCH v2 5/13 drm/i915/color: Fix HDR pre-CSC LUT programming loop

In reply to Chaitanya Kumar Borah

From: Pranay Samala <[email protected]>

The integer lut programming loop never executes completely due to incorrect condition (i++ > 130).

Fix to properly program 129th+ entries for values > 1.0.

Cc <[email protected]> #v6.19
Fixes 82caa1c8813f ("drm/i915/color: Program Pre-CSC registers")
---
 drivers/gpu/drm/i915/display/intel_color.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_color.c +1 -1
index e7950655434b..6d1cffc6d2be 100644
@@ -3976,7 +3976,7 @@ xelpd_program_plane_pre_csc_lut(struct intel_dsb *dsb,
 				intel_de_write_dsb(display, dsb,
 						   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0),
 						   (1 << 24));
-			} while (i++ > 130);
+			} while (i++ < 130);
 		} else {
 			for (i = 0; i < lut_size; i++) {
 				u32 v = (i * ((1 << 24) - 1)) / (lut_size - 1);
Signature · 1 line
2.25.1
Reviewed-by on v2 5/13
#13 lore raw

RE: [PATCH v2 05/13] drm/i915/color: Fix HDR pre-CSC LUT programming loop

Quoted 17 lines

-----Original Message-----
From: Borah, Chaitanya Kumar <[email protected]>
Sent: Wednesday, April 8, 2026 10:45 AM
To: [email protected]; [email protected]; intel- [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>; Lankhorst, Maarten <[email protected]>; [email protected]; Samala, Pranay <[email protected]>; Sharma, Swati2 <[email protected]>; Borah, Chaitanya Kumar <[email protected]>
Subject: [PATCH v2 05/13] drm/i915/color: Fix HDR pre-CSC LUT programming loop

Quoted 6 lines

From: Pranay Samala <[email protected]>

The integer lut programming loop never executes completely due to incorrect condition (i++ > 130).

Fix to properly program 129th+ entries for values > 1.0.

Looks Good to me.

Quoted 26 lines
Cc <[email protected]> #v6.19
Fixes 82caa1c8813f ("drm/i915/color: Program Pre-CSC registers")
---
 drivers/gpu/drm/i915/display/intel_color.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_color.c +1 -1
index e7950655434b..6d1cffc6d2be 100644
@@ -3976,7 +3976,7 @@ xelpd_program_plane_pre_csc_lut(struct intel_dsb
 *dsb,
 				intel_de_write_dsb(display, dsb,
 
 PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0),
 						   (1 << 24));
-			} while (i++ > 130);
+			} while (i++ < 130);
 		} else {
drivers/gpu/drm/i915/display/intel_color.c +0 -1
 			for (i = 0; i < lut_size; i++) {
 				u32 v = (i * ((1 << 24) - 1)) / (lut_size - 1);
--

2.25.1

#14 lore raw

PATCH v2 6/13 drm/i915/color: Extract HDR pre-CSC LUT programming to helper function

In reply to Chaitanya Kumar Borah

From: Pranay Samala <[email protected]>

As we prepare to add support for LUT programming in SDR planes, refactor HDR plane pre-CSC LUT programming to a helper.

---
 drivers/gpu/drm/i915/display/intel_color.c | 92 ++++++++++++----------
 1 file changed, 51 insertions(+), 41 deletions(-)
drivers/gpu/drm/i915/display/intel_color.c +51 -41
index 6d1cffc6d2be..17ab4364faea 100644
@@ -3943,6 +3943,55 @@ xelpd_load_plane_csc_matrix(struct intel_dsb *dsb,
 			   ctm_to_twos_complement(input[11], 0, 12));
 }
 
+static void
+xelpd_load_hdr_pre_csc_lut(struct intel_display *display,
+			   struct intel_dsb *dsb,
+			   enum pipe pipe,
+			   enum plane_id plane,
+			   const struct drm_color_lut32 *pre_csc_lut)
+{
+	u32 lut_size = 128;
+	u32 lut_val;
+	int i;
+
+	intel_de_write_dsb(display, dsb,
+			   PLANE_PRE_CSC_GAMC_INDEX_ENH(pipe, plane, 0),
+			   PLANE_PAL_PREC_AUTO_INCREMENT);
+
+	if (pre_csc_lut) {
+		for (i = 0; i < lut_size; i++) {
+			lut_val = drm_color_lut32_extract(pre_csc_lut[i].green, 24);
+
+			intel_de_write_dsb(display, dsb,
+					   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0),
+					   lut_val);
+		}
+
+		/* Program the max register to clamp values > 1.0. */
+		/* TODO: Restrict to 0x7ffffff */
+		do {
+			intel_de_write_dsb(display, dsb,
+					   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0),
+					   (1 << 24));
+		} while (i++ < 130);
+	} else {
+		for (i = 0; i < lut_size; i++) {
+			lut_val = (i * ((1 << 24) - 1)) / (lut_size - 1);
+
+			intel_de_write_dsb(display, dsb,
+					   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0), lut_val);
+		}
+
+		do {
+			intel_de_write_dsb(display, dsb,
+					   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0),
+					   1 << 24);
+		} while (i++ < 130);
+	}
+
+	intel_de_write_dsb(display, dsb, PLANE_PRE_CSC_GAMC_INDEX_ENH(pipe, plane, 0), 0);
+}
+
 static void
 xelpd_program_plane_pre_csc_lut(struct intel_dsb *dsb,
 				const struct intel_plane_state *plane_state)
@@ -3952,48 +4001,9 @@ xelpd_program_plane_pre_csc_lut(struct intel_dsb *dsb,
 	enum pipe pipe = to_intel_plane(state->plane)->pipe;
 	enum plane_id plane = to_intel_plane(state->plane)->id;
 	const struct drm_color_lut32 *pre_csc_lut = plane_state->hw.degamma_lut->data;
-	u32 i, lut_size;
 
-	if (icl_is_hdr_plane(display, plane)) {
-		lut_size = 128;
-
-		intel_de_write_dsb(display, dsb,
-				   PLANE_PRE_CSC_GAMC_INDEX_ENH(pipe, plane, 0),
-				   PLANE_PAL_PREC_AUTO_INCREMENT);
-
-		if (pre_csc_lut) {
-			for (i = 0; i < lut_size; i++) {
-				u32 lut_val = drm_color_lut32_extract(pre_csc_lut[i].green, 24);
-
-				intel_de_write_dsb(display, dsb,
-						   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0),
-						   lut_val);
-			}
-
-			/* Program the max register to clamp values > 1.0. */
-			/* TODO: Restrict to 0x7ffffff */
-			do {
-				intel_de_write_dsb(display, dsb,
-						   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0),
-						   (1 << 24));
-			} while (i++ < 130);
-		} else {
-			for (i = 0; i < lut_size; i++) {
-				u32 v = (i * ((1 << 24) - 1)) / (lut_size - 1);
-
-				intel_de_write_dsb(display, dsb,
-						   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0), v);
-			}
-
-			do {
-				intel_de_write_dsb(display, dsb,
-						   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0),
-						   1 << 24);
-			} while (i++ < 130);
-		}
-
-		intel_de_write_dsb(display, dsb, PLANE_PRE_CSC_GAMC_INDEX_ENH(pipe, plane, 0), 0);
-	}
+	if (icl_is_hdr_plane(display, plane))
+		xelpd_load_hdr_pre_csc_lut(display, dsb, pipe, plane, pre_csc_lut);
 }
 
 static void
Signature · 1 line
2.25.1
#15 lore raw

PATCH v2 7/13 drm/i915/color: Program Pre-CSC registers for SDR

In reply to Chaitanya Kumar Borah

From: Pranay Samala <[email protected]>

Implement plane pre-CSC LUT support for SDR planes.

v2:
- s/drm_color_lut_extract/drm_color_lut32_extract

---
 drivers/gpu/drm/i915/display/intel_color.c | 55 ++++++++++++++++++++++
 1 file changed, 55 insertions(+)
drivers/gpu/drm/i915/display/intel_color.c +55 -0
index 17ab4364faea..7d670ae8325f 100644
@@ -3992,6 +3992,59 @@ xelpd_load_hdr_pre_csc_lut(struct intel_display *display,
 	intel_de_write_dsb(display, dsb, PLANE_PRE_CSC_GAMC_INDEX_ENH(pipe, plane, 0), 0);
 }
 
+static void
+xelpd_load_sdr_pre_csc_lut(struct intel_display *display,
+			   struct intel_dsb *dsb,
+			   enum pipe pipe,
+			   enum plane_id plane,
+			   const struct drm_color_lut32 *pre_csc_lut)
+{
+	u32 lut_size = 32;
+	u32 lut_val;
+	int i;
+
+	/*
+	 * First 3 planes are HDR, so reduce by 3 to get to the right
+	 * SDR plane offset
+	 */
+	plane = plane - 3;
+
+	intel_de_write_dsb(display, dsb,
+			   PLANE_PRE_CSC_GAMC_INDEX(pipe, plane, 0),
+			   PLANE_PAL_PREC_AUTO_INCREMENT);
+
+	if (pre_csc_lut) {
+		for (i = 0; i < lut_size; i++) {
+			lut_val = drm_color_lut32_extract(pre_csc_lut[i].green, 16);
+
+			intel_de_write_dsb(display, dsb,
+					   PLANE_PRE_CSC_GAMC_DATA(pipe, plane, 0),
+					   lut_val);
+		}
+
+		do {
+			intel_de_write_dsb(display, dsb,
+					   PLANE_PRE_CSC_GAMC_DATA(pipe, plane, 0),
+					   (1 << 16));
+		} while (i++ < 34);
+	} else {
+		for (i = 0; i < lut_size; i++) {
+			lut_val = (i * ((1 << 16) - 1)) / (lut_size - 1);
+
+			intel_de_write_dsb(display, dsb,
+					   PLANE_PRE_CSC_GAMC_DATA(pipe, plane, 0), lut_val);
+		}
+
+		do {
+			intel_de_write_dsb(display, dsb,
+					   PLANE_PRE_CSC_GAMC_DATA(pipe, plane, 0),
+					   1 << 16);
+		} while (i++ < 34);
+	}
+
+	intel_de_write_dsb(display, dsb, PLANE_PRE_CSC_GAMC_INDEX(pipe, plane, 0), 0);
+}
+
 static void
 xelpd_program_plane_pre_csc_lut(struct intel_dsb *dsb,
 				const struct intel_plane_state *plane_state)
@@ -4004,6 +4057,8 @@ xelpd_program_plane_pre_csc_lut(struct intel_dsb *dsb,
 
 	if (icl_is_hdr_plane(display, plane))
 		xelpd_load_hdr_pre_csc_lut(display, dsb, pipe, plane, pre_csc_lut);
+	else
+		xelpd_load_sdr_pre_csc_lut(display, dsb, pipe, plane, pre_csc_lut);
 }
 
 static void
Signature · 1 line
2.25.1
#16 lore raw

PATCH v2 8/13 drm/i915/color: Extract HDR post-CSC LUT programming to helper function

In reply to Chaitanya Kumar Borah

From: Pranay Samala <[email protected]>

Move HDR plane post-CSC LUT programming to improve code organization.

Also removes the segment 0 index register writes as it is not currently programmed.

---
 drivers/gpu/drm/i915/display/intel_color.c | 92 +++++++++++-----------
 1 file changed, 48 insertions(+), 44 deletions(-)
drivers/gpu/drm/i915/display/intel_color.c +48 -44
index 7d670ae8325f..55e206abe5b1 100644
@@ -4061,6 +4061,52 @@ xelpd_program_plane_pre_csc_lut(struct intel_dsb *dsb,
 		xelpd_load_sdr_pre_csc_lut(display, dsb, pipe, plane, pre_csc_lut);
 }
 
+static void
+xelpd_load_hdr_post_csc_lut(struct intel_display *display,
+			    struct intel_dsb *dsb,
+			    enum pipe pipe,
+			    enum plane_id plane,
+			    const struct drm_color_lut32 *post_csc_lut)
+{
+	u32 lut_size = 32;
+	u32 lut_val;
+	int i;
+
+	intel_de_write_dsb(display, dsb, PLANE_POST_CSC_GAMC_INDEX_ENH(pipe, plane, 0),
+			   PLANE_PAL_PREC_AUTO_INCREMENT);
+
+	if (post_csc_lut) {
+		for (i = 0; i < lut_size; i++) {
+			lut_val = drm_color_lut32_extract(post_csc_lut[i].green, 24);
+
+			intel_de_write_dsb(display, dsb,
+					   PLANE_POST_CSC_GAMC_DATA_ENH(pipe, plane, 0),
+					   lut_val);
+		}
+
+		do {
+			intel_de_write_dsb(display, dsb,
+					   PLANE_POST_CSC_GAMC_DATA_ENH(pipe, plane, 0),
+					   (1 << 24));
+		} while (i++ < 34);
+	} else {
+		for (i = 0; i < lut_size; i++) {
+			lut_val = (i * ((1 << 24) - 1)) / (lut_size - 1);
+
+			intel_de_write_dsb(display, dsb,
+					   PLANE_POST_CSC_GAMC_DATA_ENH(pipe, plane, 0), lut_val);
+		}
+
+		do {
+			intel_de_write_dsb(display, dsb,
+					   PLANE_POST_CSC_GAMC_DATA_ENH(pipe, plane, 0),
+					   1 << 24);
+		} while (i++ < 34);
+	}
+
+	intel_de_write_dsb(display, dsb, PLANE_POST_CSC_GAMC_INDEX_ENH(pipe, plane, 0), 0);
+}
+
 static void
 xelpd_program_plane_post_csc_lut(struct intel_dsb *dsb,
 				 const struct intel_plane_state *plane_state)
@@ -4070,51 +4116,9 @@ xelpd_program_plane_post_csc_lut(struct intel_dsb *dsb,
 	enum pipe pipe = to_intel_plane(state->plane)->pipe;
 	enum plane_id plane = to_intel_plane(state->plane)->id;
 	const struct drm_color_lut32 *post_csc_lut = plane_state->hw.gamma_lut->data;
-	u32 i, lut_size, lut_val;
-
-	if (icl_is_hdr_plane(display, plane)) {
-		intel_de_write_dsb(display, dsb, PLANE_POST_CSC_GAMC_INDEX_ENH(pipe, plane, 0),
-				   PLANE_PAL_PREC_AUTO_INCREMENT);
-		/* TODO: Add macro */
-		intel_de_write_dsb(display, dsb, PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH(pipe, plane, 0),
-				   PLANE_PAL_PREC_AUTO_INCREMENT);
-		if (post_csc_lut) {
-			lut_size = 32;
-			for (i = 0; i < lut_size; i++) {
-				lut_val = drm_color_lut32_extract(post_csc_lut[i].green, 24);
-
-				intel_de_write_dsb(display, dsb,
-						   PLANE_POST_CSC_GAMC_DATA_ENH(pipe, plane, 0),
-						   lut_val);
-			}
-
-			/* Segment 2 */
-			do {
-				intel_de_write_dsb(display, dsb,
-						   PLANE_POST_CSC_GAMC_DATA_ENH(pipe, plane, 0),
-						   (1 << 24));
-			} while (i++ < 34);
-		} else {
-			/*TODO: Add for segment 0 */
-			lut_size = 32;
-			for (i = 0; i < lut_size; i++) {
-				u32 v = (i * ((1 << 24) - 1)) / (lut_size - 1);
-
-				intel_de_write_dsb(display, dsb,
-						   PLANE_POST_CSC_GAMC_DATA_ENH(pipe, plane, 0), v);
-			}
-
-			do {
-				intel_de_write_dsb(display, dsb,
-						   PLANE_POST_CSC_GAMC_DATA_ENH(pipe, plane, 0),
-						   1 << 24);
-			} while (i++ < 34);
-		}
 
-		intel_de_write_dsb(display, dsb, PLANE_POST_CSC_GAMC_INDEX_ENH(pipe, plane, 0), 0);
-		intel_de_write_dsb(display, dsb,
-				   PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH(pipe, plane, 0), 0);
-	}
+	if (icl_is_hdr_plane(display, plane))
+		xelpd_load_hdr_post_csc_lut(display, dsb, pipe, plane, post_csc_lut);
 }
 
 static void
Signature · 1 line
2.25.1
#17 lore raw

PATCH v2 9/13 drm/i915/color: Program Plane Post CSC registers for SDR planes

In reply to Chaitanya Kumar Borah

From: Pranay Samala <[email protected]>

Implement plane post-CSC LUT support for SDR planes.

---
 drivers/gpu/drm/i915/display/intel_color.c | 53 ++++++++++++++++++++++
 1 file changed, 53 insertions(+)
drivers/gpu/drm/i915/display/intel_color.c +53 -0
index 55e206abe5b1..57f574f452b3 100644
@@ -4107,6 +4107,57 @@ xelpd_load_hdr_post_csc_lut(struct intel_display *display,
 	intel_de_write_dsb(display, dsb, PLANE_POST_CSC_GAMC_INDEX_ENH(pipe, plane, 0), 0);
 }
 
+static void
+xelpd_load_sdr_post_csc_lut(struct intel_display *display,
+			    struct intel_dsb *dsb,
+			    enum pipe pipe,
+			    enum plane_id plane,
+			    const struct drm_color_lut32 *post_csc_lut)
+{
+	u32 lut_size = 32;
+	u32 lut_val;
+	int i;
+
+	/*
+	 * First 3 planes are HDR, so reduce by 3 to get to the right
+	 * SDR plane offset
+	 */
+	plane = plane - 3;
+	intel_de_write_dsb(display, dsb, PLANE_POST_CSC_GAMC_INDEX(pipe, plane, 0),
+			   PLANE_PAL_PREC_AUTO_INCREMENT);
+
+	if (post_csc_lut) {
+		for (i = 0; i < lut_size; i++) {
+			lut_val = drm_color_lut32_extract(post_csc_lut[i].green, 16);
+
+			intel_de_write_dsb(display, dsb,
+					   PLANE_POST_CSC_GAMC_DATA(pipe, plane, 0),
+					   lut_val);
+		}
+
+		do {
+			intel_de_write_dsb(display, dsb,
+					   PLANE_POST_CSC_GAMC_DATA(pipe, plane, 0),
+					   (1 << 16));
+		} while (i++ < 34);
+	} else {
+		for (i = 0; i < lut_size; i++) {
+			lut_val = (i * ((1 << 16) - 1)) / (lut_size - 1);
+
+			intel_de_write_dsb(display, dsb,
+					   PLANE_POST_CSC_GAMC_DATA(pipe, plane, 0), lut_val);
+		}
+
+		do {
+			intel_de_write_dsb(display, dsb,
+					   PLANE_POST_CSC_GAMC_DATA(pipe, plane, 0),
+					   1 << 16);
+		} while (i++ < 34);
+	}
+
+	intel_de_write_dsb(display, dsb, PLANE_POST_CSC_GAMC_INDEX(pipe, plane, 0), 0);
+}
+
 static void
 xelpd_program_plane_post_csc_lut(struct intel_dsb *dsb,
 				 const struct intel_plane_state *plane_state)
@@ -4119,6 +4170,8 @@ xelpd_program_plane_post_csc_lut(struct intel_dsb *dsb,
 
 	if (icl_is_hdr_plane(display, plane))
 		xelpd_load_hdr_post_csc_lut(display, dsb, pipe, plane, post_csc_lut);
+	else
+		xelpd_load_sdr_post_csc_lut(display, dsb, pipe, plane, post_csc_lut);
 }
 
 static void
Signature · 1 line
2.25.1
#18 lore raw

PATCH v2 10/13 drm/i915/color: Add color pipeline support for SDR planes

In reply to Chaitanya Kumar Borah

Now that everything is in place expose the SDR plane color pipeline to user-space.

---
 drivers/gpu/drm/i915/display/intel_color_pipeline.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/i915/display/intel_color_pipeline.c +0 -6
index 20f5e0e83496..9e5891338f31 100644
@@ -182,17 +182,11 @@ int _intel_color_pipeline_plane_init(struct drm_plane *plane, struct drm_prop_en
 
 int intel_color_pipeline_plane_init(struct drm_plane *plane, enum pipe pipe)
 {
-	struct drm_device *dev = plane->dev;
-	struct intel_display *display = to_intel_display(dev);
 	struct drm_prop_enum_list pipelines[MAX_COLOR_PIPELINES] = {};
 	int len = 0;
 	int ret = 0;
 	int i;
 
-	/* Currently expose pipeline only for HDR planes */
-	if (!icl_is_hdr_plane(display, to_intel_plane(plane)->id))
-		return 0;
-
 	/* Add pipeline consisting of transfer functions */
 	ret = _intel_color_pipeline_plane_init(plane, &pipelines[len], pipe);
 	if (ret)
Signature · 1 line
2.25.1
#19 lore raw

PATCH v2 11/13 drm/i915/color: Add YCbCr limited-to-full range color block support

In reply to Chaitanya Kumar Borah

Add support for color block which performs YCbCr limited-to-full range expansion in the plane color pipeline. The color block is represented using DRM_COLOROP_FIXED_MATRIX colorop.

---
 drivers/gpu/drm/i915/display/intel_color_pipeline.c | 6 ++++++
 drivers/gpu/drm/i915/display/intel_display_limits.h | 1 +
 2 files changed, 7 insertions(+)
drivers/gpu/drm/i915/display/intel_color_pipeline.c +6 -0
index 9e5891338f31..17cbbbc839af 100644
@@ -115,6 +115,12 @@ struct intel_colorop *intel_color_pipeline_plane_add_colorop(struct drm_plane *p
 							  intel_plane_supported_csc_ff,
 							  DRM_COLOROP_FLAG_ALLOW_BYPASS);
 		break;
+	case INTEL_PLANE_CB_YUV_RANGE_CORRECT:
+		ret = drm_plane_colorop_fixed_matrix_init(dev, &colorop->base, plane,
+							  &intel_colorop_funcs,
+							  BIT(DRM_COLOROP_FM_YCBCR_LIMITED_FULL),
+							  DRM_COLOROP_FLAG_ALLOW_BYPASS);
+		break;
 	default:
 		drm_err(plane->dev, "Invalid colorop id [%d]", id);
 		ret = -EINVAL;
drivers/gpu/drm/i915/display/intel_display_limits.h +1 -0
index f4aad54472ce..85986a8b4528 100644
@@ -170,6 +170,7 @@ enum intel_color_block {
 	INTEL_PLANE_CB_CSC_FF,
 	INTEL_PLANE_CB_POST_CSC_LUT,
 	INTEL_PLANE_CB_3DLUT,
+	INTEL_PLANE_CB_YUV_RANGE_CORRECT,
 
 	INTEL_CB_MAX
 };
Signature · 1 line
2.25.1
#20 lore raw

PATCH v2 12/13 drm/i915/color: Program plane YUV range correction colorop

In reply to Chaitanya Kumar Borah

Hook up the INTEL_PLANE_CB_YUV_RANGE_CORRECT colorop to plane state and program the corresponding plane color control bits. Track the colorop state in intel_plane_state and enable/disable YUV range correction based on the colorop bypass state.

---
 drivers/gpu/drm/i915/display/intel_display_types.h | 1 +
 drivers/gpu/drm/i915/display/intel_plane.c         | 3 +++
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 5 ++++-
 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_display_types.h +1 -0
index 3347bba598d9..8f942683fc5c 100644
@@ -681,6 +681,7 @@ struct intel_plane_state {
 		struct drm_property_blob *ctm, *degamma_lut, *gamma_lut, *lut_3d;
 		enum drm_colorop_fixed_matrix_type csc_ff_type; /* For SDR plane */
 		bool csc_ff_enable;
+		bool yuv_range_correct;
 	} hw;
 
 	struct i915_vma *ggtt_vma;
drivers/gpu/drm/i915/display/intel_plane.c +3 -0
index 3ef43db8d5d7..0ef06a42f2ac 100644
@@ -384,6 +384,9 @@ intel_plane_color_copy_uapi_to_hw_state(struct intel_plane_state *plane_state,
 						!new_colorop_state->bypass;
 					plane_state->hw.csc_ff_type =
 						new_colorop_state->fixed_matrix_type;
+				} else if (intel_colorop->id == INTEL_PLANE_CB_YUV_RANGE_CORRECT) {
+					plane_state->hw.yuv_range_correct =
+						!new_colorop_state->bypass;
 				} else {
 					blob = new_colorop_state->bypass ?
 						NULL : new_colorop_state->data;
drivers/gpu/drm/i915/display/skl_universal_plane.c +4 -1
index 2234abcd1b03..560093940ae3 100644
@@ -1297,9 +1297,12 @@ static u32 glk_plane_color_ctl(const struct intel_plane_state *plane_state)
 			plane_color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
 	}
 
-	if (!icl_is_hdr_plane(display, plane->id))
+	if (!icl_is_hdr_plane(display, plane->id)) {
 		plane_color_ctl |= intel_csc_ff_type_to_csc_mode(plane_state->hw.csc_ff_type,
 								 plane_state->hw.csc_ff_enable);
+		plane_color_ctl |= plane_state->hw.yuv_range_correct ? 0 :
+					PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
+	}
 
 	if (plane_state->force_black)
 		plane_color_ctl |= PLANE_COLOR_PLANE_CSC_ENABLE;
Signature · 1 line
2.25.1
#21 lore raw

PATCH v2 13/13 drm/i915/color: Add YUV range correction to SDR plane pipeline

In reply to Chaitanya Kumar Borah

Insert the INTEL_PLANE_CB_YUV_RANGE_CORRECT color block into the SDR plane color pipeline. This enables YCbCr limited-to-full range expansion ahead of the CSC block that expects full range pixel data. With this, the pipeline can accept limited range framebuffers.

---
 drivers/gpu/drm/i915/display/intel_color_pipeline.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/display/intel_color_pipeline.c +1 -0
index 17cbbbc839af..301ee3bdc4b0 100644
@@ -45,6 +45,7 @@ static const enum intel_color_block hdr_plane_pipeline[] = {
 };
 
 static const enum intel_color_block sdr_plane_pipeline[] = {
+	INTEL_PLANE_CB_YUV_RANGE_CORRECT,
 	INTEL_PLANE_CB_PRE_CSC_LUT,
 	INTEL_PLANE_CB_CSC_FF,
 	INTEL_PLANE_CB_POST_CSC_LUT,
Signature · 1 line
2.25.1
#22 lore raw

✗ CI.KUnit: failure for drm/i915/color: Enable SDR plane color pipeline (rev2)

In reply to Chaitanya Kumar Borah
== Series Details ==

== Series Details ==

Series: drm/i915/color: Enable SDR plane color pipeline (rev2)
URL : https://patchwork.freedesktop.org/series/162786/
State : failure

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [05:50:18] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[05:50:22] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[05:50:54] Starting KUnit Kernel (1/1)...
[05:50:54] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[05:50:54] ================== guc_buf (11 subtests) ===================
[05:50:54] [PASSED] test_smallest
[05:50:54] [PASSED] test_largest
[05:50:54] [PASSED] test_granular
[05:50:54] [PASSED] test_unique
[05:50:54] [PASSED] test_overlap
[05:50:54] [PASSED] test_reusable
[05:50:54] [PASSED] test_too_big
[05:50:54] [PASSED] test_flush
[05:50:54] [PASSED] test_lookup
[05:50:54] [PASSED] test_data
[05:50:54] [PASSED] test_class
[05:50:54] ===================== [PASSED] guc_buf =====================
[05:50:54] =================== guc_dbm (7 subtests) ===================
[05:50:54] [PASSED] test_empty
[05:50:54] [PASSED] test_default
[05:50:54] ======================== test_size  ========================
[05:50:54] [PASSED] 4
[05:50:54] [PASSED] 8
[05:50:54] [PASSED] 32
[05:50:54] [PASSED] 256
[05:50:54] ==================== [PASSED] test_size ====================
[05:50:54] ======================= test_reuse  ========================
[05:50:54] [PASSED] 4
[05:50:54] [PASSED] 8
[05:50:54] [PASSED] 32
[05:50:54] [PASSED] 256
[05:50:54] =================== [PASSED] test_reuse ====================
[05:50:54] =================== test_range_overlap  ====================
[05:50:54] [PASSED] 4
[05:50:54] [PASSED] 8
[05:50:54] [PASSED] 32
[05:50:54] [PASSED] 256
[05:50:54] =============== [PASSED] test_range_overlap ================
[05:50:54] =================== test_range_compact  ====================
[05:50:54] [PASSED] 4
[05:50:54] [PASSED] 8
[05:50:54] [PASSED] 32
[05:50:54] [PASSED] 256
[05:50:54] =============== [PASSED] test_range_compact ================
[05:50:54] ==================== test_range_spare  =====================
[05:50:54] [PASSED] 4
[05:50:54] [PASSED] 8
[05:50:54] [PASSED] 32
[05:50:54] [PASSED] 256
[05:50:54] ================ [PASSED] test_range_spare =================
[05:50:54] ===================== [PASSED] guc_dbm =====================
[05:50:54] =================== guc_idm (6 subtests) ===================
[05:50:54] [PASSED] bad_init
[05:50:54] [PASSED] no_init
[05:50:54] [PASSED] init_fini
[05:50:54] [PASSED] check_used
[05:50:54] [PASSED] check_quota
[05:50:54] [PASSED] check_all
[05:50:54] ===================== [PASSED] guc_idm =====================
[05:50:54] ================== no_relay (3 subtests) ===================
[05:50:54] [PASSED] xe_drops_guc2pf_if_not_ready
[05:50:54] [PASSED] xe_drops_guc2vf_if_not_ready
[05:50:54] [PASSED] xe_rejects_send_if_not_ready
[05:50:54] ==================== [PASSED] no_relay =====================
[05:50:54] ================== pf_relay (14 subtests) ==================
[05:50:54] [PASSED] pf_rejects_guc2pf_too_short
[05:50:54] [PASSED] pf_rejects_guc2pf_too_long
[05:50:54] [PASSED] pf_rejects_guc2pf_no_payload
[05:50:54] [PASSED] pf_fails_no_payload
[05:50:54] [PASSED] pf_fails_bad_origin
[05:50:54] [PASSED] pf_fails_bad_type
[05:50:54] [PASSED] pf_txn_reports_error
[05:50:54] [PASSED] pf_txn_sends_pf2guc
[05:50:54] [PASSED] pf_sends_pf2guc
[05:50:54] [SKIPPED] pf_loopback_nop
[05:50:54] [SKIPPED] pf_loopback_echo
[05:50:54] [SKIPPED] pf_loopback_fail
[05:50:54] [SKIPPED] pf_loopback_busy
[05:50:54] [SKIPPED] pf_loopback_retry
[05:50:54] ==================== [PASSED] pf_relay =====================
[05:50:54] ================== vf_relay (3 subtests) ===================
[05:50:54] [PASSED] vf_rejects_guc2vf_too_short
[05:50:54] [PASSED] vf_rejects_guc2vf_too_long
[05:50:54] [PASSED] vf_rejects_guc2vf_no_payload
[05:50:54] ==================== [PASSED] vf_relay =====================
[05:50:54] ================ pf_gt_config (9 subtests) =================
[05:50:54] [PASSED] fair_contexts_1vf
[05:50:54] [PASSED] fair_doorbells_1vf
[05:50:54] [PASSED] fair_ggtt_1vf
[05:50:54] ====================== fair_vram_1vf  ======================
[05:50:54] [PASSED] 3.50 GiB
[05:50:54] [PASSED] 11.5 GiB
[05:50:54] [PASSED] 15.5 GiB
[05:50:54] [PASSED] 31.5 GiB
[05:50:54] [PASSED] 63.5 GiB
[05:50:54] [PASSED] 1.91 GiB
[05:50:54] ================== [PASSED] fair_vram_1vf ==================
[05:50:54] ================ fair_vram_1vf_admin_only  =================
[05:50:54] [PASSED] 3.50 GiB
[05:50:54] [PASSED] 11.5 GiB
[05:50:54] [PASSED] 15.5 GiB
[05:50:54] [PASSED] 31.5 GiB
[05:50:54] [PASSED] 63.5 GiB
[05:50:54] [PASSED] 1.91 GiB
[05:50:54] ============ [PASSED] fair_vram_1vf_admin_only =============
[05:50:54] ====================== fair_contexts  ======================
[05:50:54] [PASSED] 1 VF
[05:50:54] [PASSED] 2 VFs
[05:50:54] [PASSED] 3 VFs
[05:50:54] [PASSED] 4 VFs
[05:50:54] [PASSED] 5 VFs
[05:50:54] [PASSED] 6 VFs
[05:50:54] [PASSED] 7 VFs
[05:50:54] [PASSED] 8 VFs
[05:50:54] [PASSED] 9 VFs
[05:50:54] [PASSED] 10 VFs
[05:50:54] [PASSED] 11 VFs
[05:50:54] [PASSED] 12 VFs
[05:50:54] [PASSED] 13 VFs
[05:50:54] [PASSED] 14 VFs
[05:50:54] [PASSED] 15 VFs
[05:50:54] [PASSED] 16 VFs
[05:50:54] [PASSED] 17 VFs
[05:50:54] [PASSED] 18 VFs
[05:50:54] [PASSED] 19 VFs
[05:50:54] [PASSED] 20 VFs
[05:50:54] [PASSED] 21 VFs
[05:50:54] [PASSED] 22 VFs
[05:50:54] [PASSED] 23 VFs
[05:50:54] [PASSED] 24 VFs
[05:50:54] [PASSED] 25 VFs
[05:50:54] [PASSED] 26 VFs
[05:50:54] [PASSED] 27 VFs
[05:50:54] [PASSED] 28 VFs
[05:50:54] [PASSED] 29 VFs
[05:50:54] [PASSED] 30 VFs
[05:50:54] [PASSED] 31 VFs
[05:50:54] [PASSED] 32 VFs
[05:50:54] [PASSED] 33 VFs
[05:50:54] [PASSED] 34 VFs
[05:50:54] [PASSED] 35 VFs
[05:50:54] [PASSED] 36 VFs
[05:50:54] [PASSED] 37 VFs
[05:50:54] [PASSED] 38 VFs
[05:50:54] [PASSED] 39 VFs
[05:50:54] [PASSED] 40 VFs
[05:50:54] [PASSED] 41 VFs
[05:50:54] [PASSED] 42 VFs
[05:50:54] [PASSED] 43 VFs
[05:50:54] [PASSED] 44 VFs
[05:50:54] [PASSED] 45 VFs
[05:50:54] [PASSED] 46 VFs
[05:50:54] [PASSED] 47 VFs
[05:50:54] [PASSED] 48 VFs
[05:50:54] [PASSED] 49 VFs
[05:50:54] [PASSED] 50 VFs
[05:50:54] [PASSED] 51 VFs
[05:50:54] [PASSED] 52 VFs
[05:50:54] [PASSED] 53 VFs
[05:50:54] [PASSED] 54 VFs
[05:50:54] [PASSED] 55 VFs
[05:50:54] [PASSED] 56 VFs
[05:50:54] [PASSED] 57 VFs
[05:50:54] [PASSED] 58 VFs
[05:50:54] [PASSED] 59 VFs
[05:50:54] [PASSED] 60 VFs
[05:50:54] [PASSED] 61 VFs
[05:50:54] [PASSED] 62 VFs
[05:50:54] [PASSED] 63 VFs
[05:50:54] ================== [PASSED] fair_contexts ==================
[05:50:54] ===================== fair_doorbells  ======================
[05:50:54] [PASSED] 1 VF
[05:50:54] [PASSED] 2 VFs
[05:50:54] [PASSED] 3 VFs
[05:50:54] [PASSED] 4 VFs
[05:50:54] [PASSED] 5 VFs
[05:50:54] [PASSED] 6 VFs
[05:50:54] [PASSED] 7 VFs
[05:50:54] [PASSED] 8 VFs
[05:50:54] [PASSED] 9 VFs
[05:50:54] [PASSED] 10 VFs
[05:50:54] [PASSED] 11 VFs
[05:50:54] [PASSED] 12 VFs
[05:50:54] [PASSED] 13 VFs
[05:50:54] [PASSED] 14 VFs
[05:50:54] [PASSED] 15 VFs
[05:50:54] [PASSED] 16 VFs
[05:50:54] [PASSED] 17 VFs
[05:50:54] [PASSED] 18 VFs
[05:50:54] [PASSED] 19 VFs
[05:50:54] [PASSED] 20 VFs
[05:50:54] [PASSED] 21 VFs
[05:50:54] [PASSED] 22 VFs
[05:50:54] [PASSED] 23 VFs
[05:50:54] [PASSED] 24 VFs
[05:50:54] [PASSED] 25 VFs
[05:50:54] [PASSED] 26 VFs
[05:50:54] [PASSED] 27 VFs
[05:50:54] [PASSED] 28 VFs
[05:50:54] [PASSED] 29 VFs
[05:50:54] [PASSED] 30 VFs
[05:50:54] [PASSED] 31 VFs
[05:50:54] [PASSED] 32 VFs
[05:50:54] [PASSED] 33 VFs
[05:50:54] [PASSED] 34 VFs
[05:50:54] [PASSED] 35 VFs
[05:50:54] [PASSED] 36 VFs
[05:50:54] [PASSED] 37 VFs
[05:50:54] [PASSED] 38 VFs
[05:50:54] [PASSED] 39 VFs
[05:50:54] [PASSED] 40 VFs
[05:50:54] [PASSED] 41 VFs
[05:50:54] [PASSED] 42 VFs
[05:50:54] [PASSED] 43 VFs
[05:50:54] [PASSED] 44 VFs
[05:50:54] [PASSED] 45 VFs
[05:50:54] [PASSED] 46 VFs
[05:50:54] [PASSED] 47 VFs
[05:50:54] [PASSED] 48 VFs
[05:50:54] [PASSED] 49 VFs
[05:50:54] [PASSED] 50 VFs
[05:50:54] [PASSED] 51 VFs
[05:50:54] [PASSED] 52 VFs
[05:50:54] [PASSED] 53 VFs
[05:50:54] [PASSED] 54 VFs
[05:50:54] [PASSED] 55 VFs
[05:50:54] [PASSED] 56 VFs
[05:50:54] [PASSED] 57 VFs
[05:50:54] [PASSED] 58 VFs
[05:50:54] [PASSED] 59 VFs
[05:50:54] [PASSED] 60 VFs
[05:50:54] [PASSED] 61 VFs
[05:50:54] [PASSED] 62 VFs
[05:50:54] [PASSED] 63 VFs
[05:50:54] ================= [PASSED] fair_doorbells ==================
[05:50:54] ======================== fair_ggtt  ========================
[05:50:54] [PASSED] 1 VF
[05:50:54] [PASSED] 2 VFs
[05:50:54] [PASSED] 3 VFs
[05:50:54] [PASSED] 4 VFs
[05:50:54] [PASSED] 5 VFs
[05:50:54] [PASSED] 6 VFs
[05:50:54] [PASSED] 7 VFs
[05:50:54] [PASSED] 8 VFs
[05:50:54] [PASSED] 9 VFs
[05:50:54] [PASSED] 10 VFs
[05:50:54] [PASSED] 11 VFs
[05:50:54] [PASSED] 12 VFs
[05:50:54] [PASSED] 13 VFs
[05:50:54] [PASSED] 14 VFs
[05:50:54] [PASSED] 15 VFs
[05:50:54] [PASSED] 16 VFs
[05:50:54] [PASSED] 17 VFs
[05:50:54] [PASSED] 18 VFs
[05:50:54] [PASSED] 19 VFs
[05:50:54] [PASSED] 20 VFs
[05:50:54] [PASSED] 21 VFs
[05:50:54] [PASSED] 22 VFs
[05:50:54] [PASSED] 23 VFs
[05:50:54] [PASSED] 24 VFs
[05:50:54] [PASSED] 25 VFs
[05:50:54] [PASSED] 26 VFs
[05:50:54] [PASSED] 27 VFs
[05:50:54] [PASSED] 28 VFs
[05:50:54] [PASSED] 29 VFs
[05:50:54] [PASSED] 30 VFs
[05:50:54] [PASSED] 31 VFs
[05:50:54] [PASSED] 32 VFs
[05:50:54] [PASSED] 33 VFs
[05:50:54] [PASSED] 34 VFs
[05:50:54] [PASSED] 35 VFs
[05:50:54] [PASSED] 36 VFs
[05:50:54] [PASSED] 37 VFs
[05:50:54] [PASSED] 38 VFs
[05:50:54] [PASSED] 39 VFs
[05:50:54] [PASSED] 40 VFs
[05:50:54] [PASSED] 41 VFs
[05:50:54] [PASSED] 42 VFs
[05:50:54] [PASSED] 43 VFs
[05:50:54] [PASSED] 44 VFs
[05:50:54] [PASSED] 45 VFs
[05:50:54] [PASSED] 46 VFs
[05:50:54] [PASSED] 47 VFs
[05:50:54] [PASSED] 48 VFs
[05:50:54] [PASSED] 49 VFs
[05:50:54] [PASSED] 50 VFs
[05:50:54] [PASSED] 51 VFs
[05:50:54] [PASSED] 52 VFs
[05:50:54] [PASSED] 53 VFs
[05:50:54] [PASSED] 54 VFs
[05:50:54] [PASSED] 55 VFs
[05:50:54] [PASSED] 56 VFs
[05:50:54] [PASSED] 57 VFs
[05:50:54] [PASSED] 58 VFs
[05:50:54] [PASSED] 59 VFs
[05:50:54] [PASSED] 60 VFs
[05:50:54] [PASSED] 61 VFs
[05:50:54] [PASSED] 62 VFs
[05:50:54] [PASSED] 63 VFs
[05:50:54] ==================== [PASSED] fair_ggtt ====================
[05:50:54] ======================== fair_vram  ========================
[05:50:54] [PASSED] 1 VF
[05:50:54] [PASSED] 2 VFs
[05:50:54] [PASSED] 3 VFs
[05:50:54] [PASSED] 4 VFs
[05:50:54] [PASSED] 5 VFs
[05:50:54] [PASSED] 6 VFs
[05:50:54] [PASSED] 7 VFs
[05:50:54] [PASSED] 8 VFs
[05:50:54] [PASSED] 9 VFs
[05:50:54] [PASSED] 10 VFs
[05:50:54] [PASSED] 11 VFs
[05:50:54] [PASSED] 12 VFs
[05:50:54] [PASSED] 13 VFs
[05:50:54] [PASSED] 14 VFs
[05:50:54] [PASSED] 15 VFs
[05:50:54] [PASSED] 16 VFs
[05:50:54] [PASSED] 17 VFs
[05:50:54] [PASSED] 18 VFs
[05:50:54] [PASSED] 19 VFs
[05:50:54] [PASSED] 20 VFs
[05:50:54] [PASSED] 21 VFs
[05:50:54] [PASSED] 22 VFs
[05:50:54] [PASSED] 23 VFs
[05:50:54] [PASSED] 24 VFs
[05:50:54] [PASSED] 25 VFs
[05:50:54] [PASSED] 26 VFs
[05:50:54] [PASSED] 27 VFs
[05:50:54] [PASSED] 28 VFs
[05:50:54] [PASSED] 29 VFs
[05:50:54] [PASSED] 30 VFs
[05:50:54] [PASSED] 31 VFs
[05:50:54] [PASSED] 32 VFs
[05:50:54] [PASSED] 33 VFs
[05:50:54] [PASSED] 34 VFs
[05:50:54] [PASSED] 35 VFs
[05:50:54] [PASSED] 36 VFs
[05:50:54] [PASSED] 37 VFs
[05:50:54] [PASSED] 38 VFs
[05:50:54] [PASSED] 39 VFs
[05:50:54] [PASSED] 40 VFs
[05:50:54] [PASSED] 41 VFs
[05:50:54] [PASSED] 42 VFs
[05:50:54] [PASSED] 43 VFs
[05:50:54] [PASSED] 44 VFs
[05:50:54] [PASSED] 45 VFs
[05:50:54] [PASSED] 46 VFs
[05:50:54] [PASSED] 47 VFs
[05:50:54] [PASSED] 48 VFs
[05:50:54] [PASSED] 49 VFs
[05:50:54] [PASSED] 50 VFs
[05:50:54] [PASSED] 51 VFs
[05:50:54] [PASSED] 52 VFs
[05:50:54] [PASSED] 53 VFs
[05:50:54] [PASSED] 54 VFs
[05:50:54] [PASSED] 55 VFs
[05:50:54] [PASSED] 56 VFs
[05:50:54] [PASSED] 57 VFs
[05:50:54] [PASSED] 58 VFs
[05:50:54] [PASSED] 59 VFs
[05:50:54] [PASSED] 60 VFs
[05:50:54] [PASSED] 61 VFs
[05:50:54] [PASSED] 62 VFs
[05:50:54] [PASSED] 63 VFs
[05:50:54] ==================== [PASSED] fair_vram ====================
[05:50:54] ================== [PASSED] pf_gt_config ===================
[05:50:54] ===================== lmtt (1 subtest) =====================
[05:50:54] ======================== test_ops  =========================
[05:50:54] [PASSED] 2-level
[05:50:54] [PASSED] multi-level
[05:50:54] ==================== [PASSED] test_ops =====================
[05:50:54] ====================== [PASSED] lmtt =======================
[05:50:54] ================= pf_service (11 subtests) =================
[05:50:54] [PASSED] pf_negotiate_any
[05:50:54] [PASSED] pf_negotiate_base_match
[05:50:54] [PASSED] pf_negotiate_base_newer
[05:50:54] [PASSED] pf_negotiate_base_next
[05:50:54] [SKIPPED] pf_negotiate_base_older
[05:50:54] [PASSED] pf_negotiate_base_prev
[05:50:54] [PASSED] pf_negotiate_latest_match
[05:50:54] [PASSED] pf_negotiate_latest_newer
[05:50:54] [PASSED] pf_negotiate_latest_next
[05:50:54] [SKIPPED] pf_negotiate_latest_older
[05:50:54] [SKIPPED] pf_negotiate_latest_prev
[05:50:54] =================== [PASSED] pf_service ====================
[05:50:54] ================= xe_guc_g2g (2 subtests) ==================
[05:50:54] ============== xe_live_guc_g2g_kunit_default  ==============
[05:50:54] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[05:50:54] ============== xe_live_guc_g2g_kunit_allmem  ===============
[05:50:54] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[05:50:54] =================== [SKIPPED] xe_guc_g2g ===================
[05:50:54] =================== xe_mocs (2 subtests) ===================
[05:50:54] ================ xe_live_mocs_kernel_kunit  ================
[05:50:54] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[05:50:54] ================ xe_live_mocs_reset_kunit  =================
[05:50:54] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[05:50:54] ==================== [SKIPPED] xe_mocs =====================
[05:50:54] ================= xe_migrate (2 subtests) ==================
[05:50:54] ================= xe_migrate_sanity_kunit  =================
[05:50:54] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[05:50:54] ================== xe_validate_ccs_kunit  ==================
[05:50:54] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[05:50:54] =================== [SKIPPED] xe_migrate ===================
[05:50:54] ================== xe_dma_buf (1 subtest) ==================
[05:50:54] ==================== xe_dma_buf_kunit  =====================
[05:50:54] ================ [SKIPPED] xe_dma_buf_kunit ================
[05:50:54] =================== [SKIPPED] xe_dma_buf ===================
[05:50:54] ================= xe_bo_shrink (1 subtest) =================
[05:50:54] =================== xe_bo_shrink_kunit  ====================
[05:50:54] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[05:50:54] ================== [SKIPPED] xe_bo_shrink ==================
[05:50:54] ==================== xe_bo (2 subtests) ====================
[05:50:54] ================== xe_ccs_migrate_kunit  ===================
[05:50:54] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[05:50:54] ==================== xe_bo_evict_kunit  ====================
[05:50:54] =============== [SKIPPED] xe_bo_evict_kunit ================
[05:50:54] ===================== [SKIPPED] xe_bo ======================
[05:50:54] ==================== args (13 subtests) ====================
[05:50:54] [PASSED] count_args_test
[05:50:54] [PASSED] call_args_example
[05:50:54] [PASSED] call_args_test
[05:50:54] [PASSED] drop_first_arg_example
[05:50:54] [PASSED] drop_first_arg_test
[05:50:54] [PASSED] first_arg_example
[05:50:54] [PASSED] first_arg_test
[05:50:54] [PASSED] last_arg_example
[05:50:54] [PASSED] last_arg_test
[05:50:54] [PASSED] pick_arg_example
[05:50:54] [PASSED] if_args_example
[05:50:54] [PASSED] if_args_test
[05:50:54] [PASSED] sep_comma_example
[05:50:54] ====================== [PASSED] args =======================
[05:50:54] =================== xe_pci (3 subtests) ====================
[05:50:54] ==================== check_graphics_ip  ====================
[05:50:54] [PASSED] 12.00 Xe_LP
[05:50:54] [PASSED] 12.10 Xe_LP+
[05:50:54] [PASSED] 12.55 Xe_HPG
[05:50:54] [PASSED] 12.60 Xe_HPC
[05:50:54] [PASSED] 12.70 Xe_LPG
[05:50:54] [PASSED] 12.71 Xe_LPG
[05:50:54] [PASSED] 12.74 Xe_LPG+
[05:50:54] [PASSED] 20.01 Xe2_HPG
[05:50:54] [PASSED] 20.02 Xe2_HPG
[05:50:54] [PASSED] 20.04 Xe2_LPG
[05:50:54] [PASSED] 30.00 Xe3_LPG
[05:50:54] [PASSED] 30.01 Xe3_LPG
[05:50:54] [PASSED] 30.03 Xe3_LPG
[05:50:54] [PASSED] 30.04 Xe3_LPG
[05:50:54] [PASSED] 30.05 Xe3_LPG
[05:50:54] [PASSED] 35.10 Xe3p_LPG
[05:50:54] [PASSED] 35.11 Xe3p_XPC
[05:50:54] ================ [PASSED] check_graphics_ip ================
[05:50:54] ===================== check_media_ip  ======================
[05:50:54] [PASSED] 12.00 Xe_M
[05:50:54] [PASSED] 12.55 Xe_HPM
[05:50:54] [PASSED] 13.00 Xe_LPM+
[05:50:54] [PASSED] 13.01 Xe2_HPM
[05:50:54] [PASSED] 20.00 Xe2_LPM
[05:50:54] [PASSED] 30.00 Xe3_LPM
[05:50:54] [PASSED] 30.02 Xe3_LPM
[05:50:54] [PASSED] 35.00 Xe3p_LPM
[05:50:54] [PASSED] 35.03 Xe3p_HPM
[05:50:54] ================= [PASSED] check_media_ip ==================
[05:50:54] =================== check_platform_desc  ===================
[05:50:54] [PASSED] 0x9A60 (TIGERLAKE)
[05:50:54] [PASSED] 0x9A68 (TIGERLAKE)
[05:50:54] [PASSED] 0x9A70 (TIGERLAKE)
[05:50:54] [PASSED] 0x9A40 (TIGERLAKE)
[05:50:54] [PASSED] 0x9A49 (TIGERLAKE)
[05:50:54] [PASSED] 0x9A59 (TIGERLAKE)
[05:50:54] [PASSED] 0x9A78 (TIGERLAKE)
[05:50:54] [PASSED] 0x9AC0 (TIGERLAKE)
[05:50:54] [PASSED] 0x9AC9 (TIGERLAKE)
[05:50:54] [PASSED] 0x9AD9 (TIGERLAKE)
[05:50:54] [PASSED] 0x9AF8 (TIGERLAKE)
[05:50:54] [PASSED] 0x4C80 (ROCKETLAKE)
[05:50:54] [PASSED] 0x4C8A (ROCKETLAKE)
[05:50:54] [PASSED] 0x4C8B (ROCKETLAKE)
[05:50:54] [PASSED] 0x4C8C (ROCKETLAKE)
[05:50:54] [PASSED] 0x4C90 (ROCKETLAKE)
[05:50:54] [PASSED] 0x4C9A (ROCKETLAKE)
[05:50:54] [PASSED] 0x4680 (ALDERLAKE_S)
[05:50:54] [PASSED] 0x4682 (ALDERLAKE_S)
[05:50:54] [PASSED] 0x4688 (ALDERLAKE_S)
[05:50:54] [PASSED] 0x468A (ALDERLAKE_S)
[05:50:54] [PASSED] 0x468B (ALDERLAKE_S)
[05:50:54] [PASSED] 0x4690 (ALDERLAKE_S)
[05:50:54] [PASSED] 0x4692 (ALDERLAKE_S)
[05:50:54] [PASSED] 0x4693 (ALDERLAKE_S)
[05:50:54] [PASSED] 0x46A0 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46A1 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46A2 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46A3 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46A6 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46A8 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46AA (ALDERLAKE_P)
[05:50:54] [PASSED] 0x462A (ALDERLAKE_P)
[05:50:54] [PASSED] 0x4626 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x4628 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46B0 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46B1 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46B2 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46B3 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46C0 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46C1 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46C2 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46C3 (ALDERLAKE_P)
[05:50:54] [PASSED] 0x46D0 (ALDERLAKE_N)
[05:50:54] [PASSED] 0x46D1 (ALDERLAKE_N)
[05:50:54] [PASSED] 0x46D2 (ALDERLAKE_N)
[05:50:54] [PASSED] 0x46D3 (ALDERLAKE_N)
[05:50:54] [PASSED] 0x46D4 (ALDERLAKE_N)
[05:50:54] [PASSED] 0xA721 (ALDERLAKE_P)
[05:50:54] [PASSED] 0xA7A1 (ALDERLAKE_P)
[05:50:54] [PASSED] 0xA7A9 (ALDERLAKE_P)
[05:50:54] [PASSED] 0xA7AC (ALDERLAKE_P)
[05:50:54] [PASSED] 0xA7AD (ALDERLAKE_P)
[05:50:54] [PASSED] 0xA720 (ALDERLAKE_P)
[05:50:54] [PASSED] 0xA7A0 (ALDERLAKE_P)
[05:50:54] [PASSED] 0xA7A8 (ALDERLAKE_P)
[05:50:54] [PASSED] 0xA7AA (ALDERLAKE_P)
[05:50:54] [PASSED] 0xA7AB (ALDERLAKE_P)
[05:50:54] [PASSED] 0xA780 (ALDERLAKE_S)
[05:50:54] [PASSED] 0xA781 (ALDERLAKE_S)
[05:50:54] [PASSED] 0xA782 (ALDERLAKE_S)
[05:50:54] [PASSED] 0xA783 (ALDERLAKE_S)
[05:50:54] [PASSED] 0xA788 (ALDERLAKE_S)
[05:50:54] [PASSED] 0xA789 (ALDERLAKE_S)
[05:50:54] [PASSED] 0xA78A (ALDERLAKE_S)
[05:50:54] [PASSED] 0xA78B (ALDERLAKE_S)
[05:50:54] [PASSED] 0x4905 (DG1)
[05:50:54] [PASSED] 0x4906 (DG1)
[05:50:54] [PASSED] 0x4907 (DG1)
[05:50:54] [PASSED] 0x4908 (DG1)
[05:50:54] [PASSED] 0x4909 (DG1)
[05:50:54] [PASSED] 0x56C0 (DG2)
[05:50:54] [PASSED] 0x56C2 (DG2)
[05:50:54] [PASSED] 0x56C1 (DG2)
[05:50:54] [PASSED] 0x7D51 (METEORLAKE)
[05:50:54] [PASSED] 0x7DD1 (METEORLAKE)
[05:50:54] [PASSED] 0x7D41 (METEORLAKE)
[05:50:54] [PASSED] 0x7D67 (METEORLAKE)
[05:50:54] [PASSED] 0xB640 (METEORLAKE)
[05:50:54] [PASSED] 0x56A0 (DG2)
[05:50:54] [PASSED] 0x56A1 (DG2)
[05:50:54] [PASSED] 0x56A2 (DG2)
[05:50:54] [PASSED] 0x56BE (DG2)
[05:50:54] [PASSED] 0x56BF (DG2)
[05:50:54] [PASSED] 0x5690 (DG2)
[05:50:54] [PASSED] 0x5691 (DG2)
[05:50:54] [PASSED] 0x5692 (DG2)
[05:50:54] [PASSED] 0x56A5 (DG2)
[05:50:54] [PASSED] 0x56A6 (DG2)
[05:50:54] [PASSED] 0x56B0 (DG2)
[05:50:54] [PASSED] 0x56B1 (DG2)
[05:50:54] [PASSED] 0x56BA (DG2)
[05:50:54] [PASSED] 0x56BB (DG2)
[05:50:54] [PASSED] 0x56BC (DG2)
[05:50:54] [PASSED] 0x56BD (DG2)
[05:50:54] [PASSED] 0x5693 (DG2)
[05:50:54] [PASSED] 0x5694 (DG2)
[05:50:54] [PASSED] 0x5695 (DG2)
[05:50:54] [PASSED] 0x56A3 (DG2)
[05:50:54] [PASSED] 0x56A4 (DG2)
[05:50:54] [PASSED] 0x56B2 (DG2)
[05:50:54] [PASSED] 0x56B3 (DG2)
[05:50:54] [PASSED] 0x5696 (DG2)
[05:50:54] [PASSED] 0x5697 (DG2)
[05:50:54] [PASSED] 0xB69 (PVC)
[05:50:54] [PASSED] 0xB6E (PVC)
[05:50:54] [PASSED] 0xBD4 (PVC)
[05:50:54] [PASSED] 0xBD5 (PVC)
[05:50:54] [PASSED] 0xBD6 (PVC)
[05:50:54] [PASSED] 0xBD7 (PVC)
[05:50:54] [PASSED] 0xBD8 (PVC)
[05:50:54] [PASSED] 0xBD9 (PVC)
[05:50:54] [PASSED] 0xBDA (PVC)
[05:50:54] [PASSED] 0xBDB (PVC)
[05:50:54] [PASSED] 0xBE0 (PVC)
[05:50:54] [PASSED] 0xBE1 (PVC)
[05:50:54] [PASSED] 0xBE5 (PVC)
[05:50:54] [PASSED] 0x7D40 (METEORLAKE)
[05:50:54] [PASSED] 0x7D45 (METEORLAKE)
[05:50:54] [PASSED] 0x7D55 (METEORLAKE)
[05:50:54] [PASSED] 0x7D60 (METEORLAKE)
[05:50:54] [PASSED] 0x7DD5 (METEORLAKE)
[05:50:54] [PASSED] 0x6420 (LUNARLAKE)
[05:50:54] [PASSED] 0x64A0 (LUNARLAKE)
[05:50:54] [PASSED] 0x64B0 (LUNARLAKE)
[05:50:54] [PASSED] 0xE202 (BATTLEMAGE)
[05:50:54] [PASSED] 0xE209 (BATTLEMAGE)
[05:50:54] [PASSED] 0xE20B (BATTLEMAGE)
[05:50:54] [PASSED] 0xE20C (BATTLEMAGE)
[05:50:54] [PASSED] 0xE20D (BATTLEMAGE)
[05:50:54] [PASSED] 0xE210 (BATTLEMAGE)
[05:50:54] [PASSED] 0xE211 (BATTLEMAGE)
[05:50:54] [PASSED] 0xE212 (BATTLEMAGE)
[05:50:54] [PASSED] 0xE216 (BATTLEMAGE)
[05:50:54] [PASSED] 0xE220 (BATTLEMAGE)
[05:50:54] [PASSED] 0xE221 (BATTLEMAGE)
[05:50:54] [PASSED] 0xE222 (BATTLEMAGE)
[05:50:54] [PASSED] 0xE223 (BATTLEMAGE)
[05:50:54] [PASSED] 0xB080 (PANTHERLAKE)
[05:50:54] [PASSED] 0xB081 (PANTHERLAKE)
[05:50:54] [PASSED] 0xB082 (PANTHERLAKE)
[05:50:54] [PASSED] 0xB083 (PANTHERLAKE)
[05:50:54] [PASSED] 0xB084 (PANTHERLAKE)
[05:50:54] [PASSED] 0xB085 (PANTHERLAKE)
[05:50:54] [PASSED] 0xB086 (PANTHERLAKE)
[05:50:54] [PASSED] 0xB087 (PANTHERLAKE)
[05:50:54] [PASSED] 0xB08F (PANTHERLAKE)
[05:50:54] [PASSED] 0xB090 (PANTHERLAKE)
[05:50:54] [PASSED] 0xB0A0 (PANTHERLAKE)
[05:50:54] [PASSED] 0xB0B0 (PANTHERLAKE)
[05:50:54] [PASSED] 0xFD80 (PANTHERLAKE)
[05:50:54] [PASSED] 0xFD81 (PANTHERLAKE)
[05:50:54] [PASSED] 0xD740 (NOVALAKE_S)
[05:50:54] [PASSED] 0xD741 (NOVALAKE_S)
[05:50:54] [PASSED] 0xD742 (NOVALAKE_S)
[05:50:54] [PASSED] 0xD743 (NOVALAKE_S)
[05:50:54] [PASSED] 0xD744 (NOVALAKE_S)
[05:50:54] [PASSED] 0xD745 (NOVALAKE_S)
[05:50:54] [PASSED] 0x674C (CRESCENTISLAND)
[05:50:54] [PASSED] 0xD750 (NOVALAKE_P)
[05:50:54] [PASSED] 0xD751 (NOVALAKE_P)
[05:50:54] [PASSED] 0xD752 (NOVALAKE_P)
[05:50:54] [PASSED] 0xD753 (NOVALAKE_P)
[05:50:54] [PASSED] 0xD754 (NOVALAKE_P)
[05:50:54] [PASSED] 0xD755 (NOVALAKE_P)
[05:50:54] [PASSED] 0xD756 (NOVALAKE_P)
[05:50:54] [PASSED] 0xD757 (NOVALAKE_P)
[05:50:54] [PASSED] 0xD75F (NOVALAKE_P)
[05:50:54] =============== [PASSED] check_platform_desc ===============
[05:50:54] ===================== [PASSED] xe_pci ======================
[05:50:54] =================== xe_rtp (2 subtests) ====================
[05:50:54] =============== xe_rtp_process_to_sr_tests  ================
[05:50:54] [PASSED] coalesce-same-reg
[05:50:54] [PASSED] no-match-no-add
[05:50:54] [PASSED] match-or
[05:50:54] [PASSED] match-or-xfail
[05:50:54] [PASSED] no-match-no-add-multiple-rules
[05:50:54] [PASSED] two-regs-two-entries
[05:50:54] [PASSED] clr-one-set-other
[05:50:54] [PASSED] set-field
[05:50:54] [PASSED] conflict-duplicate
stty: 'standard input': Inappropriate ioctl for device
[05:50:54] [PASSED] conflict-not-disjoint
[05:50:54] [PASSED] conflict-reg-type
[05:50:54] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[05:50:54] ================== xe_rtp_process_tests  ===================
[05:50:54] [PASSED] active1
[05:50:54] [PASSED] active2
[05:50:54] [PASSED] active-inactive
[05:50:54] [PASSED] inactive-active
[05:50:54] [PASSED] inactive-1st_or_active-inactive
[05:50:54] [PASSED] inactive-2nd_or_active-inactive
[05:50:54] [PASSED] inactive-last_or_active-inactive
[05:50:54] [PASSED] inactive-no_or_active-inactive
[05:50:54] ============== [PASSED] xe_rtp_process_tests ===============
[05:50:54] ===================== [PASSED] xe_rtp ======================
[05:50:54] ==================== xe_wa (1 subtest) =====================
[05:50:54] ======================== xe_wa_gt  =========================
[05:50:54] [PASSED] TIGERLAKE B0
[05:50:54] [PASSED] DG1 A0
[05:50:54] [PASSED] DG1 B0
[05:50:54] [PASSED] ALDERLAKE_S A0
[05:50:54] [PASSED] ALDERLAKE_S B0
[05:50:54] [PASSED] ALDERLAKE_S C0
[05:50:54] [PASSED] ALDERLAKE_S D0
[05:50:54] [PASSED] ALDERLAKE_P A0
[05:50:54] [PASSED] ALDERLAKE_P B0
[05:50:54] [PASSED] ALDERLAKE_P C0
[05:50:54] [PASSED] ALDERLAKE_S RPLS D0
[05:50:54] [PASSED] ALDERLAKE_P RPLU E0
[05:50:54] [PASSED] DG2 G10 C0
[05:50:54] [PASSED] DG2 G11 B1
[05:50:54] [PASSED] DG2 G12 A1
[05:50:54] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[05:50:54] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[05:50:54] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[05:50:54] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[05:50:54] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[05:50:54] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[05:50:54] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[05:50:54] ==================== [PASSED] xe_wa_gt =====================
[05:50:54] ====================== [PASSED] xe_wa ======================
[05:50:54] ============================================================
[05:50:54] Testing complete. Ran 597 tests: passed: 579, skipped: 18
[05:50:54] Elapsed time: 36.239s total, 4.228s configuring, 31.393s building, 0.603s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [05:50:54] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[05:50:56] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[05:51:21] Starting KUnit Kernel (1/1)...
[05:51:21] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[05:51:21] ============ drm_test_pick_cmdline (2 subtests) ============
[05:51:21] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[05:51:21] =============== drm_test_pick_cmdline_named  ===============
[05:51:21] [PASSED] NTSC
[05:51:21] [PASSED] NTSC-J
[05:51:21] [PASSED] PAL
[05:51:21] [PASSED] PAL-M
[05:51:21] =========== [PASSED] drm_test_pick_cmdline_named ===========
[05:51:21] ============== [PASSED] drm_test_pick_cmdline ==============
[05:51:21] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[05:51:21] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[05:51:21] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[05:51:21] =========== drm_validate_clone_mode (2 subtests) ===========
[05:51:21] ============== drm_test_check_in_clone_mode  ===============
[05:51:21] [PASSED] in_clone_mode
[05:51:21] [PASSED] not_in_clone_mode
[05:51:21] ========== [PASSED] drm_test_check_in_clone_mode ===========
[05:51:21] =============== drm_test_check_valid_clones  ===============
[05:51:21] [PASSED] not_in_clone_mode
[05:51:21] [PASSED] valid_clone
[05:51:21] [PASSED] invalid_clone
[05:51:21] =========== [PASSED] drm_test_check_valid_clones ===========
[05:51:21] ============= [PASSED] drm_validate_clone_mode =============
[05:51:21] ============= drm_validate_modeset (1 subtest) =============
[05:51:21] [PASSED] drm_test_check_connector_changed_modeset
[05:51:21] ============== [PASSED] drm_validate_modeset ===============
[05:51:21] ====== drm_test_bridge_get_current_state (2 subtests) ======
[05:51:21] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[05:51:21] [PASSED] drm_test_drm_bridge_get_current_state_legacy
[05:51:21] ======== [PASSED] drm_test_bridge_get_current_state ========
[05:51:21] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[05:51:21] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[05:51:21] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[05:51:21] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy
[05:51:21] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[05:51:21] ============== drm_bridge_alloc (2 subtests) ===============
[05:51:21] [PASSED] drm_test_drm_bridge_alloc_basic
[05:51:21] [PASSED] drm_test_drm_bridge_alloc_get_put
[05:51:21] ================ [PASSED] drm_bridge_alloc =================
[05:51:21] ============= drm_cmdline_parser (40 subtests) =============
[05:51:21] [PASSED] drm_test_cmdline_force_d_only
[05:51:21] [PASSED] drm_test_cmdline_force_D_only_dvi
[05:51:21] [PASSED] drm_test_cmdline_force_D_only_hdmi
[05:51:21] [PASSED] drm_test_cmdline_force_D_only_not_digital
[05:51:21] [PASSED] drm_test_cmdline_force_e_only
[05:51:21] [PASSED] drm_test_cmdline_res
[05:51:21] [PASSED] drm_test_cmdline_res_vesa
[05:51:21] [PASSED] drm_test_cmdline_res_vesa_rblank
[05:51:21] [PASSED] drm_test_cmdline_res_rblank
[05:51:21] [PASSED] drm_test_cmdline_res_bpp
[05:51:21] [PASSED] drm_test_cmdline_res_refresh
[05:51:21] [PASSED] drm_test_cmdline_res_bpp_refresh
[05:51:21] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[05:51:21] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[05:51:21] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[05:51:21] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[05:51:21] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[05:51:21] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[05:51:21] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[05:51:21] [PASSED] drm_test_cmdline_res_margins_force_on
[05:51:21] [PASSED] drm_test_cmdline_res_vesa_margins
[05:51:21] [PASSED] drm_test_cmdline_name
[05:51:21] [PASSED] drm_test_cmdline_name_bpp
[05:51:21] [PASSED] drm_test_cmdline_name_option
[05:51:21] [PASSED] drm_test_cmdline_name_bpp_option
[05:51:21] [PASSED] drm_test_cmdline_rotate_0
[05:51:21] [PASSED] drm_test_cmdline_rotate_90
[05:51:21] [PASSED] drm_test_cmdline_rotate_180
[05:51:21] [PASSED] drm_test_cmdline_rotate_270
[05:51:21] [PASSED] drm_test_cmdline_hmirror
[05:51:21] [PASSED] drm_test_cmdline_vmirror
[05:51:21] [PASSED] drm_test_cmdline_margin_options
[05:51:21] [PASSED] drm_test_cmdline_multiple_options
[05:51:21] [PASSED] drm_test_cmdline_bpp_extra_and_option
[05:51:21] [PASSED] drm_test_cmdline_extra_and_option
[05:51:21] [PASSED] drm_test_cmdline_freestanding_options
[05:51:21] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[05:51:21] [PASSED] drm_test_cmdline_panel_orientation
[05:51:21] ================ drm_test_cmdline_invalid  =================
[05:51:21] [PASSED] margin_only
[05:51:21] [PASSED] interlace_only
[05:51:21] [PASSED] res_missing_x
[05:51:21] [PASSED] res_missing_y
[05:51:21] [PASSED] res_bad_y
[05:51:21] [PASSED] res_missing_y_bpp
[05:51:21] [PASSED] res_bad_bpp
[05:51:21] [PASSED] res_bad_refresh
[05:51:21] [PASSED] res_bpp_refresh_force_on_off
[05:51:21] [PASSED] res_invalid_mode
[05:51:21] [PASSED] res_bpp_wrong_place_mode
[05:51:21] [PASSED] name_bpp_refresh
[05:51:21] [PASSED] name_refresh
[05:51:21] [PASSED] name_refresh_wrong_mode
[05:51:21] [PASSED] name_refresh_invalid_mode
[05:51:21] [PASSED] rotate_multiple
[05:51:21] [PASSED] rotate_invalid_val
[05:51:21] [PASSED] rotate_truncated
[05:51:21] [PASSED] invalid_option
[05:51:21] [PASSED] invalid_tv_option
[05:51:21] [PASSED] truncated_tv_option
[05:51:21] ============ [PASSED] drm_test_cmdline_invalid =============
[05:51:21] =============== drm_test_cmdline_tv_options  ===============
[05:51:21] [PASSED] NTSC
[05:51:21] [PASSED] NTSC_443
[05:51:21] [PASSED] NTSC_J
[05:51:21] [PASSED] PAL
[05:51:21] [PASSED] PAL_M
[05:51:21] [PASSED] PAL_N
[05:51:21] [PASSED] SECAM
[05:51:21] [PASSED] MONO_525
[05:51:21] [PASSED] MONO_625
[05:51:21] =========== [PASSED] drm_test_cmdline_tv_options ===========
[05:51:21] =============== [PASSED] drm_cmdline_parser ================
[05:51:21] ========== drmm_connector_hdmi_init (20 subtests) ==========
[05:51:21] [PASSED] drm_test_connector_hdmi_init_valid
[05:51:21] [PASSED] drm_test_connector_hdmi_init_bpc_8
[05:51:21] [PASSED] drm_test_connector_hdmi_init_bpc_10
[05:51:21] [PASSED] drm_test_connector_hdmi_init_bpc_12
[05:51:21] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[05:51:21] [PASSED] drm_test_connector_hdmi_init_bpc_null
[05:51:21] [PASSED] drm_test_connector_hdmi_init_formats_empty
[05:51:21] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[05:51:21] === drm_test_connector_hdmi_init_formats_yuv420_allowed  ===
[05:51:21] [PASSED] supported_formats=0x9 yuv420_allowed=1
[05:51:21] [PASSED] supported_formats=0x9 yuv420_allowed=0
[05:51:21] [PASSED] supported_formats=0x5 yuv420_allowed=1
[05:51:21] [PASSED] supported_formats=0x5 yuv420_allowed=0
[05:51:21] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[05:51:21] [PASSED] drm_test_connector_hdmi_init_null_ddc
[05:51:21] [PASSED] drm_test_connector_hdmi_init_null_product
[05:51:21] [PASSED] drm_test_connector_hdmi_init_null_vendor
[05:51:21] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[05:51:21] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[05:51:21] [PASSED] drm_test_connector_hdmi_init_product_valid
[05:51:21] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[05:51:21] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[05:51:21] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[05:51:21] ========= drm_test_connector_hdmi_init_type_valid  =========
[05:51:21] [PASSED] HDMI-A
[05:51:21] [PASSED] HDMI-B
[05:51:21] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[05:51:21] ======== drm_test_connector_hdmi_init_type_invalid  ========
[05:51:21] [PASSED] Unknown
[05:51:21] [PASSED] VGA
[05:51:21] [PASSED] DVI-I
[05:51:21] [PASSED] DVI-D
[05:51:21] [PASSED] DVI-A
[05:51:21] [PASSED] Composite
[05:51:21] [PASSED] SVIDEO
[05:51:21] [PASSED] LVDS
[05:51:21] [PASSED] Component
[05:51:21] [PASSED] DIN
[05:51:21] [PASSED] DP
[05:51:21] [PASSED] TV
[05:51:21] [PASSED] eDP
[05:51:21] [PASSED] Virtual
[05:51:21] [PASSED] DSI
[05:51:21] [PASSED] DPI
[05:51:21] [PASSED] Writeback
[05:51:21] [PASSED] SPI
[05:51:21] [PASSED] USB
[05:51:21] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[05:51:21] ============ [PASSED] drmm_connector_hdmi_init =============
[05:51:21] ============= drmm_connector_init (3 subtests) =============
[05:51:21] [PASSED] drm_test_drmm_connector_init
[05:51:21] [PASSED] drm_test_drmm_connector_init_null_ddc
[05:51:21] ========= drm_test_drmm_connector_init_type_valid  =========
[05:51:21] [PASSED] Unknown
[05:51:21] [PASSED] VGA
[05:51:21] [PASSED] DVI-I
[05:51:21] [PASSED] DVI-D
[05:51:21] [PASSED] DVI-A
[05:51:21] [PASSED] Composite
[05:51:21] [PASSED] SVIDEO
[05:51:21] [PASSED] LVDS
[05:51:21] [PASSED] Component
[05:51:21] [PASSED] DIN
[05:51:21] [PASSED] DP
[05:51:21] [PASSED] HDMI-A
[05:51:21] [PASSED] HDMI-B
[05:51:21] [PASSED] TV
[05:51:21] [PASSED] eDP
[05:51:21] [PASSED] Virtual
[05:51:21] [PASSED] DSI
[05:51:21] [PASSED] DPI
[05:51:21] [PASSED] Writeback
[05:51:21] [PASSED] SPI
[05:51:21] [PASSED] USB
[05:51:21] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[05:51:21] =============== [PASSED] drmm_connector_init ===============
[05:51:21] ========= drm_connector_dynamic_init (6 subtests) ==========
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_init
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_init_properties
[05:51:21] ===== drm_test_drm_connector_dynamic_init_type_valid  ======
[05:51:21] [PASSED] Unknown
[05:51:21] [PASSED] VGA
[05:51:21] [PASSED] DVI-I
[05:51:21] [PASSED] DVI-D
[05:51:21] [PASSED] DVI-A
[05:51:21] [PASSED] Composite
[05:51:21] [PASSED] SVIDEO
[05:51:21] [PASSED] LVDS
[05:51:21] [PASSED] Component
[05:51:21] [PASSED] DIN
[05:51:21] [PASSED] DP
[05:51:21] [PASSED] HDMI-A
[05:51:21] [PASSED] HDMI-B
[05:51:21] [PASSED] TV
[05:51:21] [PASSED] eDP
[05:51:21] [PASSED] Virtual
[05:51:21] [PASSED] DSI
[05:51:21] [PASSED] DPI
[05:51:21] [PASSED] Writeback
[05:51:21] [PASSED] SPI
[05:51:21] [PASSED] USB
[05:51:21] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[05:51:21] ======== drm_test_drm_connector_dynamic_init_name  =========
[05:51:21] [PASSED] Unknown
[05:51:21] [PASSED] VGA
[05:51:21] [PASSED] DVI-I
[05:51:21] [PASSED] DVI-D
[05:51:21] [PASSED] DVI-A
[05:51:21] [PASSED] Composite
[05:51:21] [PASSED] SVIDEO
[05:51:21] [PASSED] LVDS
[05:51:21] [PASSED] Component
[05:51:21] [PASSED] DIN
[05:51:21] [PASSED] DP
[05:51:21] [PASSED] HDMI-A
[05:51:21] [PASSED] HDMI-B
[05:51:21] [PASSED] TV
[05:51:21] [PASSED] eDP
[05:51:21] [PASSED] Virtual
[05:51:21] [PASSED] DSI
[05:51:21] [PASSED] DPI
[05:51:21] [PASSED] Writeback
[05:51:21] [PASSED] SPI
[05:51:21] [PASSED] USB
[05:51:21] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[05:51:21] =========== [PASSED] drm_connector_dynamic_init ============
[05:51:21] ==== drm_connector_dynamic_register_early (4 subtests) =====
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[05:51:21] ====== [PASSED] drm_connector_dynamic_register_early =======
[05:51:21] ======= drm_connector_dynamic_register (7 subtests) ========
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[05:51:21] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[05:51:21] ========= [PASSED] drm_connector_dynamic_register ==========
[05:51:21] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[05:51:21] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[05:51:21] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[05:51:21] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[05:51:21] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[05:51:21] ========== drm_test_get_tv_mode_from_name_valid  ===========
[05:51:21] [PASSED] NTSC
[05:51:21] [PASSED] NTSC-443
[05:51:21] [PASSED] NTSC-J
[05:51:21] [PASSED] PAL
[05:51:21] [PASSED] PAL-M
[05:51:21] [PASSED] PAL-N
[05:51:21] [PASSED] SECAM
[05:51:21] [PASSED] Mono
[05:51:21] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[05:51:21] [PASSED] drm_test_get_tv_mode_from_name_truncated
[05:51:21] ============ [PASSED] drm_get_tv_mode_from_name ============
[05:51:21] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[05:51:21] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[05:51:21] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[05:51:21] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[05:51:21] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[05:51:21] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[05:51:21] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[05:51:21] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid  =
[05:51:21] [PASSED] VIC 96
[05:51:21] [PASSED] VIC 97
[05:51:21] [PASSED] VIC 101
[05:51:21] [PASSED] VIC 102
[05:51:21] [PASSED] VIC 106
[05:51:21] [PASSED] VIC 107
[05:51:21] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[05:51:21] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[05:51:21] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[05:51:21] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[05:51:21] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[05:51:21] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[05:51:21] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[05:51:21] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[05:51:21] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name  ====
[05:51:21] [PASSED] Automatic
[05:51:21] [PASSED] Full
[05:51:21] [PASSED] Limited 16:235
[05:51:21] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[05:51:21] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[05:51:21] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[05:51:21] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[05:51:21] === drm_test_drm_hdmi_connector_get_output_format_name  ====
[05:51:21] [PASSED] RGB
[05:51:21] [PASSED] YUV 4:2:0
[05:51:21] [PASSED] YUV 4:2:2
[05:51:21] [PASSED] YUV 4:4:4
[05:51:21] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[05:51:21] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[05:51:21] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[05:51:21] ============= drm_damage_helper (21 subtests) ==============
[05:51:21] [PASSED] drm_test_damage_iter_no_damage
[05:51:21] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[05:51:21] [PASSED] drm_test_damage_iter_no_damage_src_moved
[05:51:21] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[05:51:21] [PASSED] drm_test_damage_iter_no_damage_not_visible
[05:51:21] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[05:51:21] [PASSED] drm_test_damage_iter_no_damage_no_fb
[05:51:21] [PASSED] drm_test_damage_iter_simple_damage
[05:51:21] [PASSED] drm_test_damage_iter_single_damage
[05:51:21] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[05:51:21] [PASSED] drm_test_damage_iter_single_damage_outside_src
[05:51:21] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[05:51:21] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[05:51:21] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[05:51:21] [PASSED] drm_test_damage_iter_single_damage_src_moved
[05:51:21] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[05:51:21] [PASSED] drm_test_damage_iter_damage
[05:51:21] [PASSED] drm_test_damage_iter_damage_one_intersect
[05:51:21] [PASSED] drm_test_damage_iter_damage_one_outside
[05:51:21] [PASSED] drm_test_damage_iter_damage_src_moved
[05:51:21] [PASSED] drm_test_damage_iter_damage_not_visible
[05:51:21] ================ [PASSED] drm_damage_helper ================
[05:51:21] ============== drm_dp_mst_helper (3 subtests) ==============
[05:51:21] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[05:51:21] [PASSED] Clock 154000 BPP 30 DSC disabled
[05:51:21] [PASSED] Clock 234000 BPP 30 DSC disabled
[05:51:21] [PASSED] Clock 297000 BPP 24 DSC disabled
[05:51:21] [PASSED] Clock 332880 BPP 24 DSC enabled
[05:51:21] [PASSED] Clock 324540 BPP 24 DSC enabled
[05:51:21] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[05:51:21] ============== drm_test_dp_mst_calc_pbn_div  ===============
[05:51:21] [PASSED] Link rate 2000000 lane count 4
[05:51:21] [PASSED] Link rate 2000000 lane count 2
[05:51:21] [PASSED] Link rate 2000000 lane count 1
[05:51:21] [PASSED] Link rate 1350000 lane count 4
[05:51:21] [PASSED] Link rate 1350000 lane count 2
[05:51:21] [PASSED] Link rate 1350000 lane count 1
[05:51:21] [PASSED] Link rate 1000000 lane count 4
[05:51:21] [PASSED] Link rate 1000000 lane count 2
[05:51:21] [PASSED] Link rate 1000000 lane count 1
[05:51:21] [PASSED] Link rate 810000 lane count 4
[05:51:21] [PASSED] Link rate 810000 lane count 2
[05:51:21] [PASSED] Link rate 810000 lane count 1
[05:51:21] [PASSED] Link rate 540000 lane count 4
[05:51:21] [PASSED] Link rate 540000 lane count 2
[05:51:21] [PASSED] Link rate 540000 lane count 1
[05:51:21] [PASSED] Link rate 270000 lane count 4
[05:51:21] [PASSED] Link rate 270000 lane count 2
[05:51:21] [PASSED] Link rate 270000 lane count 1
[05:51:21] [PASSED] Link rate 162000 lane count 4
[05:51:21] [PASSED] Link rate 162000 lane count 2
[05:51:21] [PASSED] Link rate 162000 lane count 1
[05:51:21] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[05:51:21] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[05:51:21] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[05:51:21] [PASSED] DP_POWER_UP_PHY with port number
[05:51:21] [PASSED] DP_POWER_DOWN_PHY with port number
[05:51:21] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[05:51:21] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[05:51:21] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[05:51:21] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[05:51:21] [PASSED] DP_QUERY_PAYLOAD with port number
[05:51:21] [PASSED] DP_QUERY_PAYLOAD with VCPI
[05:51:21] [PASSED] DP_REMOTE_DPCD_READ with port number
[05:51:21] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[05:51:21] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[05:51:21] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[05:51:21] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[05:51:21] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[05:51:21] [PASSED] DP_REMOTE_I2C_READ with port number
[05:51:21] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[05:51:21] [PASSED] DP_REMOTE_I2C_READ with transactions array
[05:51:21] [PASSED] DP_REMOTE_I2C_WRITE with port number
[05:51:21] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[05:51:21] [PASSED] DP_REMOTE_I2C_WRITE with data array
[05:51:21] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[05:51:21] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[05:51:21] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[05:51:21] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[05:51:21] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[05:51:21] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[05:51:21] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[05:51:21] ================ [PASSED] drm_dp_mst_helper ================
[05:51:21] ================== drm_exec (7 subtests) ===================
[05:51:21] [PASSED] sanitycheck
[05:51:21] [PASSED] test_lock
[05:51:21] [PASSED] test_lock_unlock
[05:51:21] [PASSED] test_duplicates
[05:51:21] [PASSED] test_prepare
[05:51:21] [PASSED] test_prepare_array
[05:51:21] [PASSED] test_multiple_loops
[05:51:21] ==================== [PASSED] drm_exec =====================
[05:51:21] =========== drm_format_helper_test (17 subtests) ===========
[05:51:21] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[05:51:21] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[05:51:21] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[05:51:21] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[05:51:21] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[05:51:21] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[05:51:21] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[05:51:21] ============= drm_test_fb_xrgb8888_to_bgr888  ==============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[05:51:21] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[05:51:21] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[05:51:21] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[05:51:21] ============== drm_test_fb_xrgb8888_to_mono  ===============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[05:51:21] ==================== drm_test_fb_swab  =====================
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ================ [PASSED] drm_test_fb_swab =================
[05:51:21] ============ drm_test_fb_xrgb8888_to_xbgr8888  =============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[05:51:21] ============ drm_test_fb_xrgb8888_to_abgr8888  =============
[05:51:21] [PASSED] single_pixel_source_buffer
[05:51:21] [PASSED] single_pixel_clip_rectangle
[05:51:21] [PASSED] well_known_colors
[05:51:21] [PASSED] destination_pitch
[05:51:21] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[05:51:21] ================= drm_test_fb_clip_offset  =================
[05:51:21] [PASSED] pass through
[05:51:21] [PASSED] horizontal offset
[05:51:21] [PASSED] vertical offset
[05:51:21] [PASSED] horizontal and vertical offset
[05:51:21] [PASSED] horizontal offset (custom pitch)
[05:51:21] [PASSED] vertical offset (custom pitch)
[05:51:21] [PASSED] horizontal and vertical offset (custom pitch)
[05:51:21] ============= [PASSED] drm_test_fb_clip_offset =============
[05:51:21] =================== drm_test_fb_memcpy  ====================
[05:51:21] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[05:51:21] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[05:51:21] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[05:51:21] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[05:51:21] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[05:51:21] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[05:51:21] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[05:51:21] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[05:51:21] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[05:51:21] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[05:51:21] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[05:51:21] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[05:51:21] =============== [PASSED] drm_test_fb_memcpy ================
[05:51:21] ============= [PASSED] drm_format_helper_test ==============
[05:51:21] ================= drm_format (18 subtests) =================
[05:51:21] [PASSED] drm_test_format_block_width_invalid
[05:51:21] [PASSED] drm_test_format_block_width_one_plane
[05:51:21] [PASSED] drm_test_format_block_width_two_plane
[05:51:21] [PASSED] drm_test_format_block_width_three_plane
[05:51:21] [PASSED] drm_test_format_block_width_tiled
[05:51:21] [PASSED] drm_test_format_block_height_invalid
[05:51:21] [PASSED] drm_test_format_block_height_one_plane
[05:51:21] [PASSED] drm_test_format_block_height_two_plane
[05:51:21] [PASSED] drm_test_format_block_height_three_plane
[05:51:21] [PASSED] drm_test_format_block_height_tiled
[05:51:21] [PASSED] drm_test_format_min_pitch_invalid
[05:51:21] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[05:51:21] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[05:51:21] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[05:51:21] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[05:51:21] [PASSED] drm_test_format_min_pitch_two_plane
[05:51:21] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[05:51:21] [PASSED] drm_test_format_min_pitch_tiled
[05:51:21] =================== [PASSED] drm_format ====================
[05:51:21] ============== drm_framebuffer (10 subtests) ===============
[05:51:21] ========== drm_test_framebuffer_check_src_coords  ==========
[05:51:21] [PASSED] Success: source fits into fb
[05:51:21] [PASSED] Fail: overflowing fb with x-axis coordinate
[05:51:21] [PASSED] Fail: overflowing fb with y-axis coordinate
[05:51:21] [PASSED] Fail: overflowing fb with source width
[05:51:21] [PASSED] Fail: overflowing fb with source height
[05:51:21] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[05:51:21] [PASSED] drm_test_framebuffer_cleanup
[05:51:21] =============== drm_test_framebuffer_create  ===============
[05:51:21] [PASSED] ABGR8888 normal sizes
[05:51:21] [PASSED] ABGR8888 max sizes
[05:51:21] [PASSED] ABGR8888 pitch greater than min required
[05:51:21] [PASSED] ABGR8888 pitch less than min required
[05:51:21] [PASSED] ABGR8888 Invalid width
[05:51:21] [PASSED] ABGR8888 Invalid buffer handle
[05:51:21] [PASSED] No pixel format
[05:51:21] [PASSED] ABGR8888 Width 0
[05:51:21] [PASSED] ABGR8888 Height 0
[05:51:21] [PASSED] ABGR8888 Out of bound height * pitch combination
[05:51:21] [PASSED] ABGR8888 Large buffer offset
[05:51:21] [PASSED] ABGR8888 Buffer offset for inexistent plane
[05:51:21] [PASSED] ABGR8888 Invalid flag
[05:51:21] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[05:51:21] [PASSED] ABGR8888 Valid buffer modifier
[05:51:21] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[05:51:21] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[05:51:21] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[05:51:21] [PASSED] NV12 Normal sizes
[05:51:21] [PASSED] NV12 Max sizes
[05:51:21] [PASSED] NV12 Invalid pitch
[05:51:21] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[05:51:21] [PASSED] NV12 different  modifier per-plane
[05:51:21] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[05:51:21] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[05:51:21] [PASSED] NV12 Modifier for inexistent plane
[05:51:21] [PASSED] NV12 Handle for inexistent plane
[05:51:21] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[05:51:21] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[05:51:21] [PASSED] YVU420 Normal sizes
[05:51:21] [PASSED] YVU420 Max sizes
[05:51:21] [PASSED] YVU420 Invalid pitch
[05:51:21] [PASSED] YVU420 Different pitches
[05:51:21] [PASSED] YVU420 Different buffer offsets/pitches
[05:51:21] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[05:51:21] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[05:51:21] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[05:51:21] [PASSED] YVU420 Valid modifier
[05:51:21] [PASSED] YVU420 Different modifiers per plane
[05:51:21] [PASSED] YVU420 Modifier for inexistent plane
[05:51:21] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[05:51:21] [PASSED] X0L2 Normal sizes
[05:51:21] [PASSED] X0L2 Max sizes
[05:51:21] [PASSED] X0L2 Invalid pitch
[05:51:21] [PASSED] X0L2 Pitch greater than minimum required
[05:51:21] [PASSED] X0L2 Handle for inexistent plane
[05:51:21] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[05:51:21] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[05:51:21] [PASSED] X0L2 Valid modifier
[05:51:21] [PASSED] X0L2 Modifier for inexistent plane
[05:51:21] =========== [PASSED] drm_test_framebuffer_create ===========
[05:51:21] [PASSED] drm_test_framebuffer_free
[05:51:21] [PASSED] drm_test_framebuffer_init
[05:51:21] [PASSED] drm_test_framebuffer_init_bad_format
[05:51:21] [PASSED] drm_test_framebuffer_init_dev_mismatch
[05:51:21] [PASSED] drm_test_framebuffer_lookup
[05:51:21] [PASSED] drm_test_framebuffer_lookup_inexistent
[05:51:21] [PASSED] drm_test_framebuffer_modifiers_not_supported
[05:51:21] ================= [PASSED] drm_framebuffer =================
[05:51:21] ================ drm_gem_shmem (8 subtests) ================
[05:51:21] [PASSED] drm_gem_shmem_test_obj_create
[05:51:21] [PASSED] drm_gem_shmem_test_obj_create_private
[05:51:21] [PASSED] drm_gem_shmem_test_pin_pages
[05:51:21] [PASSED] drm_gem_shmem_test_vmap
[05:51:21] [PASSED] drm_gem_shmem_test_get_sg_table
[05:51:21] [PASSED] drm_gem_shmem_test_get_pages_sgt
[05:51:21] [PASSED] drm_gem_shmem_test_madvise
[05:51:21] [PASSED] drm_gem_shmem_test_purge
[05:51:21] ================== [PASSED] drm_gem_shmem ==================
[05:51:21] === drm_atomic_helper_connector_hdmi_check (27 subtests) ===
[05:51:21] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[05:51:21] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[05:51:21] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[05:51:21] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[05:51:21] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[05:51:21] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[05:51:21] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420  =======
[05:51:21] [PASSED] Automatic
[05:51:21] [PASSED] Full
[05:51:21] [PASSED] Limited 16:235
[05:51:21] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[05:51:21] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[05:51:21] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[05:51:21] [PASSED] drm_test_check_disable_connector
[05:51:21] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[05:51:21] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[05:51:21] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[05:51:21] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[05:51:21] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[05:51:21] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[05:51:21] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[05:51:21] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[05:51:21] [PASSED] drm_test_check_output_bpc_dvi
[05:51:21] [PASSED] drm_test_check_output_bpc_format_vic_1
[05:51:21] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[05:51:21] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[05:51:21] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[05:51:21] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[05:51:21] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[05:51:21] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[05:51:21] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[05:51:21] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[05:51:21] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[05:51:21] [PASSED] drm_test_check_broadcast_rgb_value
[05:51:21] [PASSED] drm_test_check_bpc_8_value
[05:51:21] [PASSED] drm_test_check_bpc_10_value
[05:51:21] [PASSED] drm_test_check_bpc_12_value
[05:51:21] [PASSED] drm_test_check_format_value
[05:51:21] [PASSED] drm_test_check_tmds_char_value
[05:51:21] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[05:51:21] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) =
[05:51:21] [PASSED] drm_test_check_mode_valid
[05:51:21] [PASSED] drm_test_check_mode_valid_reject
[05:51:21] [PASSED] drm_test_check_mode_valid_reject_rate
[05:51:21] [PASSED] drm_test_check_mode_valid_reject_max_clock
[05:51:21] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[05:51:21] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) =
[05:51:21] [PASSED] drm_test_check_infoframes
[05:51:21] [PASSED] drm_test_check_reject_avi_infoframe
[05:51:21] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8
[05:51:21] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10
[05:51:21] [PASSED] drm_test_check_reject_audio_infoframe
[05:51:21] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes ===
[05:51:21] ================= drm_managed (2 subtests) =================
[05:51:21] [PASSED] drm_test_managed_release_action
[05:51:21] [PASSED] drm_test_managed_run_action
[05:51:21] =================== [PASSED] drm_managed ===================
[05:51:21] =================== drm_mm (6 subtests) ====================
[05:51:21] [PASSED] drm_test_mm_init
[05:51:21] [PASSED] drm_test_mm_debug
[05:51:21] [PASSED] drm_test_mm_align32
[05:51:21] [PASSED] drm_test_mm_align64
[05:51:21] [PASSED] drm_test_mm_lowest
[05:51:21] [PASSED] drm_test_mm_highest
[05:51:21] ===================== [PASSED] drm_mm ======================
[05:51:21] ============= drm_modes_analog_tv (5 subtests) =============
[05:51:21] [PASSED] drm_test_modes_analog_tv_mono_576i
[05:51:21] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[05:51:21] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[05:51:21] [PASSED] drm_test_modes_analog_tv_pal_576i
[05:51:21] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[05:51:21] =============== [PASSED] drm_modes_analog_tv ===============
[05:51:21] ============== drm_plane_helper (2 subtests) ===============
[05:51:21] =============== drm_test_check_plane_state  ================
[05:51:21] [PASSED] clipping_simple
[05:51:21] [PASSED] clipping_rotate_reflect
[05:51:21] [PASSED] positioning_simple
[05:51:21] [PASSED] upscaling
[05:51:21] [PASSED] downscaling
[05:51:21] [PASSED] rounding1
[05:51:21] [PASSED] rounding2
[05:51:21] [PASSED] rounding3
[05:51:21] [PASSED] rounding4
[05:51:21] =========== [PASSED] drm_test_check_plane_state ============
[05:51:21] =========== drm_test_check_invalid_plane_state  ============
[05:51:21] [PASSED] positioning_invalid
[05:51:21] [PASSED] upscaling_invalid
[05:51:21] [PASSED] downscaling_invalid
[05:51:21] ======= [PASSED] drm_test_check_invalid_plane_state ========
[05:51:21] ================ [PASSED] drm_plane_helper =================
[05:51:21] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[05:51:21] ====== drm_test_connector_helper_tv_get_modes_check  =======
[05:51:21] [PASSED] None
[05:51:21] [PASSED] PAL
[05:51:21] [PASSED] NTSC
[05:51:21] [PASSED] Both, NTSC Default
[05:51:21] [PASSED] Both, PAL Default
[05:51:21] [PASSED] Both, NTSC Default, with PAL on command-line
[05:51:21] [PASSED] Both, PAL Default, with NTSC on command-line
[05:51:21] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[05:51:21] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[05:51:21] ================== drm_rect (9 subtests) ===================
[05:51:21] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[05:51:21] [PASSED] drm_test_rect_clip_scaled_not_clipped
[05:51:21] [PASSED] drm_test_rect_clip_scaled_clipped
[05:51:21] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[05:51:21] ================= drm_test_rect_intersect  =================
[05:51:21] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[05:51:21] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[05:51:21] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[05:51:21] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[05:51:21] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[05:51:21] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[05:51:21] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[05:51:21] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[05:51:21] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[05:51:21] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[05:51:21] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[05:51:21] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[05:51:21] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[05:51:21] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[05:51:21] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[05:51:21] ============= [PASSED] drm_test_rect_intersect =============
[05:51:21] ================ drm_test_rect_calc_hscale  ================
[05:51:21] [PASSED] normal use
[05:51:21] [PASSED] out of max range
[05:51:21] [PASSED] out of min range
[05:51:21] [PASSED] zero dst
[05:51:21] [PASSED] negative src
[05:51:21] [PASSED] negative dst
[05:51:21] ============ [PASSED] drm_test_rect_calc_hscale ============
[05:51:21] ================ drm_test_rect_calc_vscale  ================
[05:51:21] [PASSED] normal use
[05:51:21] [PASSED] out of max range
[05:51:21] [PASSED] out of min range
[05:51:21] [PASSED] zero dst
[05:51:21] [PASSED] negative src
[05:51:21] [PASSED] negative dst
stty: 'standard input': Inappropriate ioctl for device
[05:51:21] ============ [PASSED] drm_test_rect_calc_vscale ============
[05:51:21] ================== drm_test_rect_rotate  ===================
[05:51:21] [PASSED] reflect-x
[05:51:21] [PASSED] reflect-y
[05:51:21] [PASSED] rotate-0
[05:51:21] [PASSED] rotate-90
[05:51:21] [PASSED] rotate-180
[05:51:21] [PASSED] rotate-270
[05:51:21] ============== [PASSED] drm_test_rect_rotate ===============
[05:51:21] ================ drm_test_rect_rotate_inv  =================
[05:51:21] [PASSED] reflect-x
[05:51:21] [PASSED] reflect-y
[05:51:21] [PASSED] rotate-0
[05:51:21] [PASSED] rotate-90
[05:51:21] [PASSED] rotate-180
[05:51:21] [PASSED] rotate-270
[05:51:21] ============ [PASSED] drm_test_rect_rotate_inv =============
[05:51:21] ==================== [PASSED] drm_rect =====================
[05:51:21] ============ drm_sysfb_modeset_test (1 subtest) ============
[05:51:21] ============ drm_test_sysfb_build_fourcc_list  =============
[05:51:21] [PASSED] no native formats
[05:51:21] [PASSED] XRGB8888 as native format
[05:51:21] [PASSED] remove duplicates
[05:51:21] [PASSED] convert alpha formats
[05:51:21] [PASSED] random formats
[05:51:21] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[05:51:21] ============= [PASSED] drm_sysfb_modeset_test ==============
[05:51:21] ================== drm_fixp (2 subtests) ===================
[05:51:21] [PASSED] drm_test_int2fixp
[05:51:21] [PASSED] drm_test_sm2fixp
[05:51:21] ==================== [PASSED] drm_fixp =====================
[05:51:21] ============================================================
[05:51:21] Testing complete. Ran 621 tests: passed: 621
[05:51:21] Elapsed time: 26.518s total, 1.739s configuring, 24.611s building, 0.118s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
stty: 'standard input': Inappropriate ioctl for device
[05:51:21] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[05:51:23] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[05:51:32] Starting KUnit Kernel (1/1)...
[05:51:32] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[05:51:32] ================= ttm_device (5 subtests) ==================
[05:51:32] [PASSED] ttm_device_init_basic
[05:51:32] [PASSED] ttm_device_init_multiple
[05:51:32] [PASSED] ttm_device_fini_basic
[05:51:32] [PASSED] ttm_device_init_no_vma_man
[05:51:32] ================== ttm_device_init_pools  ==================
[05:51:32] [PASSED] No DMA allocations, no DMA32 required
[05:51:32] # ttm_device_init_pools: ASSERTION FAILED at drivers/gpu/drm/ttm/tests/ttm_device_test.c:178
[05:51:32] Expected !list_lru_count(&pt.pages) to be false, but is true
[05:51:32] [FAILED] DMA allocations, DMA32 required
[05:51:32] [PASSED] No DMA allocations, DMA32 required
[05:51:32]     # ttm_device_init_pools: ASSERTION FAILED at drivers/gpu/drm/ttm/tests/ttm_device_test.c:178
[05:51:32]     Expected !list_lru_count(&pt.pages) to be false, but is true
[05:51:32] ------------[ cut here ]------------
[05:51:32] WARNING: lib/refcount.c:28 at devres_release_all+0xaa/0x100, CPU#0: kunit_try_catch/46
[05:51:32] refcount_t: underflow; use-after-free.
[05:51:32] CPU: 0 UID: 0 PID: 46 Comm: kunit_try_catch Tainted: G        W        N  7.0.0-rc7-gef12e65781ef #3 VOLUNTARY
[05:51:32] Tainted: [W]=WARN, [N]=TEST
[05:51:32] Stack:
[05:51:32]  6044eeae 00000000 00000000 00000001
[05:51:32]  ffffff00 6044eeae 603238ba 00000009
[05:51:32]  0000001c 60043eec 6002381c ae0cbd40
[05:51:32] Call Trace:
[05:51:32]  [<603238ba>] ? devres_release_all+0xaa/0x100
[05:51:32]  [<60043eec>] ? dump_stack_lvl+0x5e/0x7a
[05:51:32]  [<6002381c>] ? _printk+0x0/0x65
[05:51:32]  [<6001f09f>] ? __warn.cold+0x79/0x11f
[05:51:32]  [<6001f1d9>] ? warn_slowpath_fmt+0x94/0xa1
[05:51:32]  [<601ef1a0>] ? kernfs_free_rcu+0x0/0x70
[05:51:32]  [<60052e36>] ? um_set_signals+0x36/0x60
[05:51:32]  [<600c5a42>] ? call_rcu+0x52/0x90
[05:51:32]  [<6001f145>] ? warn_slowpath_fmt+0x0/0xa1
[05:51:32]  [<60147f50>] ? kfree+0x0/0x250
[05:51:32]  [<603238ba>] ? devres_release_all+0xaa/0x100
[05:51:32]  [<60396df0>] ? mutex_unlock+0x0/0x30
[05:51:32]  [<6031c600>] ? bus_notify+0x0/0x60
[05:51:32]  [<60396df0>] ? mutex_unlock+0x0/0x30
[05:51:32]  [<60398860>] ? mutex_lock+0x0/0x40
[05:51:32]  [<6031cc64>] ? device_unbind_cleanup+0x14/0xb0
[05:51:32]  [<6031e436>] ? device_release_driver_internal+0x256/0x2b0
[05:51:32]  [<60372450>] ? kobject_put+0x0/0x150
[05:51:32]  [<601f3d40>] ? sysfs_remove_file_ns+0x0/0x20
[05:51:32]  [<6031c24f>] ? bus_remove_device+0x10f/0x1a0
[05:51:32]  [<601f3d40>] ? sysfs_remove_file_ns+0x0/0x20
[05:51:32]  [<601f17b8>] ? kernfs_remove_by_name_ns+0x98/0x130
[05:51:32]  [<60315ccc>] ? device_del+0x1bc/0x600
[05:51:32]  [<60052e00>] ? um_set_signals+0x0/0x60
[05:51:32]  [<6025b2a0>] ? device_unregister_wrapper+0x0/0x10
[05:51:32]  [<60052e00>] ? um_set_signals+0x0/0x60
[05:51:32]  [<60316124>] ? device_unregister+0x14/0x40
[05:51:32]  [<60257e66>] ? kunit_release_action+0xf6/0x170
[05:51:32]  [<60257d70>] ? kunit_release_action+0x0/0x170
[05:51:32]  [<6025b2e2>] ? kunit_device_unregister+0x32/0x80
[05:51:32]  [<60259890>] ? kunit_generic_run_threadfn_adapter+0x0/0x30
[05:51:32]  [<6025748e>] ? kunit_try_run_case_cleanup+0x2e/0x40
[05:51:32]  [<602598a6>] ? kunit_generic_run_threadfn_adapter+0x16/0x30
[05:51:32]  [<60081e36>] ? kthread+0xe6/0x150
[05:51:32]  [<60046435>] ? new_thread_handler+0x45/0x60
[05:51:32] ---[ end trace 0000000000000000 ]---
[05:51:32] [FAILED] DMA allocations, no DMA32 required
[05:51:32] # ttm_device_init_pools: pass:2 fail:2 skip:0 total:4
[05:51:32] ============== [FAILED] ttm_device_init_pools ==============
[05:51:32]     # module: ttm_device_test
[05:51:32] # ttm_device: pass:4 fail:1 skip:0 total:5
[05:51:32] # Totals: pass:6 fail:2 skip:0 total:8
[05:51:32] =================== [FAILED] ttm_device ====================
[05:51:32] ================== ttm_pool (8 subtests) ===================
[05:51:32] ================== ttm_pool_alloc_basic  ===================
[05:51:32] [PASSED] One page
[05:51:32] [PASSED] More than one page
[05:51:32] [PASSED] Above the allocation limit
[05:51:32] [PASSED] One page, with coherent DMA mappings enabled
[05:51:32] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[05:51:32] ============== [PASSED] ttm_pool_alloc_basic ===============
[05:51:32] ============== ttm_pool_alloc_basic_dma_addr  ==============
[05:51:32] [PASSED] One page
[05:51:32] [PASSED] More than one page
[05:51:32] [PASSED] Above the allocation limit
[05:51:32] [PASSED] One page, with coherent DMA mappings enabled
[05:51:32] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[05:51:32] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[05:51:32] [PASSED] ttm_pool_alloc_order_caching_match
[05:51:32] [PASSED] ttm_pool_alloc_caching_mismatch
[05:51:32] [PASSED] ttm_pool_alloc_order_mismatch
[05:51:32] [PASSED] ttm_pool_free_dma_alloc
[05:51:32] [ERROR] Test: ttm_pool: missing expected subtest!
[05:51:32] 
[05:51:32] Pid: 75, comm: kunit_try_catch Tainted: G        W        N  7.0.0-rc7-gef12e65781ef
[05:51:32] RIP: 0033:list_lru_count_node+0xe/0x20
[05:51:32] RSP: 00000000ae0cbed8  EFLAGS: 00010246
[05:51:32] RAX: 0000000000000000 RBX: 00000000ae003c90 RCX: 000000006e64c7d8
[05:51:32] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000006e486880
[05:51:32] RBP: 000000006e486800 R08: 00000000acc4fc28 R09: 000000006e450c80
[05:51:32] R10: 0000000000000000 R11: 0000000000000000 R12: 000000006e450c80
[05:51:32] R13: 0000000060440898 R14: 000000006010eb50 R15: 000000006e486880
[05:51:32] Kernel panic - not syncing: Segfault with no mm
[05:51:32] [CRASHED] 
[05:51:32] [ERROR] Test: ttm_pool: missing expected subtest!
[05:51:32] [CRASHED] 
[05:51:32] [ERROR] Test: ttm_pool: missing subtest result line!
[05:51:32] # module: ttm_pool_test
[05:51:32] ==================== [CRASHED] ttm_pool ====================
[05:51:32] [ERROR] Test: main: missing expected subtest!
[05:51:32] [CRASHED] 
[05:51:32] [ERROR] Test: main: missing expected subtest!
[05:51:32] [CRASHED] 
[05:51:32] [ERROR] Test: main: missing expected subtest!
[05:51:32] [CRASHED] 
[05:51:32] [ERROR] Test: main: missing expected subtest!
[05:51:32] [CRASHED] 
[05:51:32] ============================================================
[05:51:32] Testing complete. Ran 28 tests: passed: 20, failed: 2, crashed: 6, errors: 7
The kernel seems to have crashed; you can decode the stack traces with:
$ scripts/decode_stacktrace.sh .kunit/vmlinux .kunit < .kunit/test.log | tee .kunit/decoded.log | /kernel/tools/testing/kunit/kunit.py parse
[05:51:32] Elapsed time: 11.526s total, 1.720s configuring, 9.488s building, 0.318s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel

#23 lore raw

✗ i915.CI.BAT: failure for drm/i915/color: Enable SDR plane color pipeline (rev2)

In reply to Chaitanya Kumar Borah
== Series Details ==

== Series Details ==

Series: drm/i915/color: Enable SDR plane color pipeline (rev2)
URL : https://patchwork.freedesktop.org/series/162788/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_18292 -> Patchwork_162788v2
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_162788v2 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_162788v2, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162788v2/index.html

Participating hosts (42 -> 40)
------------------------------

Missing (2): bat-dg2-13 fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_162788v2:

### IGT changes ###

#### Possible regressions ####

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-a-hdmi-a-2:
- fi-glk-j4005: [PASS][1] -> [FAIL][2] +3 other tests fail
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18292/fi-glk-j4005/igt@kms_pipe_crc_basic@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162788v2/fi-glk-j4005/igt@kms_pipe_crc_basic@[email protected]

Known issues
------------

Here are the changes found in Patchwork_162788v2 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@core_debugfs@read-all-entries:
- bat-adlp-9: [PASS][3] -> [DMESG-WARN][4] ([i915#15673])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18292/bat-adlp-9/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162788v2/bat-adlp-9/igt@[email protected]

[i915#15673]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15673

Build changes
-------------

* Linux: CI_DRM_18292 -> Patchwork_162788v2

CI-20190529: 20190529
CI_DRM_18292: f074368a55893ee121ba2920497b6c25e265d190 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8850: 8850
Patchwork_162788v2: f074368a55893ee121ba2920497b6c25e265d190 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162788v2/index.html