Skip to contentSkip to conversation

Add IGT support for plane color management

PATCH Superseded Bhanuprakash Modem 3 participants 21 messages Jan 7, 2022 – May 6, 2022 Library code

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover Add IGT support for plane color management

From the Plane Color Management feature design, userspace can take the smart blending decisions based on hardware supported plane color features to obtain an accurate color profile.

These IGT patches extend the existing pipe color management tests to the plane level.

Kernel implementation:
https://patchwork.freedesktop.org/series/90825/

Bhanuprakash Modem (12):
HAX: Get uapi headers to compile the IGT
lib/igt_kms: Add plane color mgmt properties
kms_color_helper: Add helper functions for plane color mgmt tests/kms_color: New subtests for Plane gamma tests/kms_color: New subtests for Plane degamma tests/kms_color: New subtests for Plane CTM tests/kms_color: New negative tests for plane level color mgmt tests/kms_color_chamelium: New subtests for Plane gamma tests/kms_color_chamelium: New subtests for Plane degamma tests/kms_color_chamelium: New subtests for Plane CTM tests/kms_color_chamelium: Extended IGT tests to support logarithmic
gamma mode
HAX: Add color mgmt tests to BAT

Mukunda Pramodh Kumar (3):
lib/igt_kms: Add pipe color mgmt properties
kms_color_helper: Add helper functions to support logarithmic gamma
mode
tests/kms_color: Extended IGT tests to support logarithmic gamma mode

 include/drm-uapi/drm.h                |  10 +
 include/drm-uapi/drm_mode.h           |  28 ++
 lib/igt_kms.c                         |   6 +
 lib/igt_kms.h                         |   6 +
 tests/intel-ci/fast-feedback.testlist | 112 +++++
 tests/kms_color.c                     | 672 +++++++++++++++++++++++++-
 tests/kms_color_chamelium.c           | 597 ++++++++++++++++++++++-
 tests/kms_color_helper.c              | 303 +++++++++++-
 tests/kms_color_helper.h              |  44 ++
 9 files changed, 1761 insertions(+), 17 deletions(-)

--
2.32.0

#1 lore raw

PATCH v3 1/15 HAX: Get uapi headers to compile the IGT

---
 include/drm-uapi/drm.h      | 10 ++++++++++
 include/drm-uapi/drm_mode.h | 28 ++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)
include/drm-uapi/drm.h +10 -0
index 5e54c3aa4c..9ca3dbe8e5 100644
@@ -830,6 +830,16 @@ struct drm_get_cap {
  */
 #define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS	5
 
+/**
+ * DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES
+ *
+ * Add support for advance gamma mode UAPI
+ * If set to 1, DRM will enable advance gamma mode
+ * UAPI to process the gamma mode based on extended
+ * range and segments.
+ */
+#define DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES     6
+
 /* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
 struct drm_set_client_cap {
 	__u64 capability;
include/drm-uapi/drm_mode.h +28 -0
index e4a2570a60..97198609a5 100644
@@ -817,6 +817,34 @@ struct drm_color_lut {
 	__u16 reserved;
 };
 
+/*
+ * Creating 64 bit palette entries for better data
+ * precision. This will be required for HDR and
+ * similar color processing usecases.
+ */
+struct drm_color_lut_ext {
+    /*
+     * Data is U32.32 fixed point format.
+     */
+    __u64 red;
+    __u64 green;
+    __u64 blue;
+    __u64 reserved;
+};
+
+struct drm_color_lut_range {
+    /* DRM_MODE_LUT_* */
+    __u32 flags;
+    /* number of points on the curve */
+    __u16 count;
+    /* input/output bits per component */
+    __u8 input_bpc, output_bpc;
+    /* input start/end values */
+    __s32 start, end;
+    /* output min/max values */
+    __s32 min, max;
+};
+
 /**
  * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data.
  *
Signature · 1 line
2.32.0
#2 lore raw

PATCH v3 2/15 lib/igt_kms: Add plane color mgmt properties

In reply to Bhanuprakash Modem

Add support for Plane color management properties.

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
---
 lib/igt_kms.c | 5 +++++
 lib/igt_kms.h | 5 +++++
 2 files changed, 10 insertions(+)
lib/igt_kms.c +5 -0
index 34a2aa00ea..fdb83e0f91 100644
@@ -581,6 +581,11 @@ const char * const igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
 	[IGT_PLANE_ALPHA] = "alpha",
 	[IGT_PLANE_ZPOS] = "zpos",
 	[IGT_PLANE_FB_DAMAGE_CLIPS] = "FB_DAMAGE_CLIPS",
+	[IGT_PLANE_CTM] = "PLANE_CTM",
+	[IGT_PLANE_GAMMA_MODE] = "PLANE_GAMMA_MODE",
+	[IGT_PLANE_GAMMA_LUT] = "PLANE_GAMMA_LUT",
+	[IGT_PLANE_DEGAMMA_MODE] = "PLANE_DEGAMMA_MODE",
+	[IGT_PLANE_DEGAMMA_LUT] = "PLANE_DEGAMMA_LUT",
 };
 
 const char * const igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
lib/igt_kms.h +5 -0
index e9ecd21e98..3a1f7243ad 100644
@@ -301,6 +301,11 @@ enum igt_atomic_plane_properties {
        IGT_PLANE_ALPHA,
        IGT_PLANE_ZPOS,
        IGT_PLANE_FB_DAMAGE_CLIPS,
+       IGT_PLANE_CTM,
+       IGT_PLANE_GAMMA_MODE,
+       IGT_PLANE_GAMMA_LUT,
+       IGT_PLANE_DEGAMMA_MODE,
+       IGT_PLANE_DEGAMMA_LUT,
        IGT_NUM_PLANE_PROPS
 };
 
Signature · 1 line
2.32.0
#3 lore raw

PATCH v3 3/15 kms_color_helper: Add helper functions for plane color mgmt

In reply to Bhanuprakash Modem

Add helper functions to support Plane color management properties.

v2: (Pekka)
* Rename linear LUT to unity LUT
* Remove Intel specific logic from helper functions
* New function to fill ctm matrix
* Zero LUT for invalid lut_size tests
v3:
* Commit 'no (de)gamma' without LUT (Bhanu)

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
---
 tests/kms_color_helper.c | 180 +++++++++++++++++++++++++++++++++++++--
 tests/kms_color_helper.h |  29 +++++++
 2 files changed, 203 insertions(+), 6 deletions(-)
tests/kms_color_helper.c +174 -6
index d71e7bb2e6..1bde58b8f2 100644
@@ -215,23 +215,31 @@ void set_gamma(data_t *data,
 	free(lut);
 }
 
-void set_ctm(igt_pipe_t *pipe, const double *coefficients)
+static void
+fill_ctm_matrix(struct drm_color_ctm *ctm, const double *coefficients)
 {
-	struct drm_color_ctm ctm;
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(ctm.matrix); i++) {
+	igt_assert(ctm && coefficients);
+
+	for (i = 0; i < ARRAY_SIZE(ctm->matrix); i++) {
 		if (coefficients[i] < 0) {
-			ctm.matrix[i] =
+			ctm->matrix[i] =
 				(int64_t) (-coefficients[i] *
 				((int64_t) 1L << 32));
-			ctm.matrix[i] |= 1ULL << 63;
+			ctm->matrix[i] |= 1ULL << 63;
 		} else
-			ctm.matrix[i] =
+			ctm->matrix[i] =
 				(int64_t) (coefficients[i] *
 				((int64_t) 1L << 32));
 	}
+}
+
+void set_ctm(igt_pipe_t *pipe, const double *coefficients)
+{
+	struct drm_color_ctm ctm;
 
+	fill_ctm_matrix(&ctm, coefficients);
 	igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_CTM, &ctm, sizeof(ctm));
 }
 
@@ -241,6 +249,136 @@ void disable_prop(igt_pipe_t *pipe, enum igt_atomic_crtc_properties prop)
 		igt_pipe_obj_replace_prop_blob(pipe, prop, NULL, 0);
 }
 
+drmModePropertyPtr get_plane_gamma_degamma_mode(igt_plane_t *plane,
+				enum igt_atomic_plane_properties prop)
+{
+	igt_display_t *display = plane->pipe->display;
+	uint32_t prop_id = plane->props[prop];
+	drmModePropertyPtr drmProp;
+
+	igt_assert(prop_id);
+
+	drmProp = drmModeGetProperty(display->drm_fd, prop_id);
+
+	igt_assert(drmProp);
+	igt_assert(drmProp->count_enums);
+
+	return drmProp;
+}
+
+struct drm_color_lut_ext *create_unity_lut(segment_data_t *info)
+{
+	uint32_t val, segment, entry, index = 0;
+	uint32_t max_val = 0xffffffff;
+	struct drm_color_lut_ext *lut = malloc(sizeof(struct drm_color_lut_ext) * info->entries_count);
+	igt_assert(lut);
+
+	for (segment = 0; segment < info->segment_count; segment++) {
+		uint32_t entry_count = info->segment_data[segment].count;
+		uint32_t start = info->segment_data[segment].start;
+		uint32_t end = info->segment_data[segment].end;
+
+		for (entry = 1; entry <= entry_count; entry++) {
+			val = start + entry * ((end - start) * 1.0 / entry_count);
+			lut[index].red = lut[index].green = lut[index].blue = MIN(val, max_val);
+
+			index++;
+		}
+	}
+
+	return lut;
+}
+
+struct drm_color_lut_ext *create_max_lut(segment_data_t *info)
+{
+	int i;
+	struct drm_color_lut_ext *lut;
+	uint32_t max_val = 0xffffffff;
+
+	lut = malloc(sizeof(struct drm_color_lut_ext) * info->entries_count);
+	igt_assert(lut);
+
+	for (i = 0; i < info->entries_count; i++)
+		lut[i].red = lut[i].green = lut[i].blue = max_val;
+
+	return lut;
+}
+
+void clear_segment_data(segment_data_t *info)
+{
+	if (!info)
+		return;
+
+	free(info->segment_data);
+	free(info);
+}
+
+segment_data_t *get_segment_data(data_t *data,
+				uint64_t blob_id, char *mode)
+{
+	drmModePropertyBlobPtr blob;
+	struct drm_color_lut_range *lut_range = NULL;
+	segment_data_t *info = NULL;
+	uint32_t i;
+
+	blob = drmModeGetPropertyBlob(data->drm_fd, blob_id);
+	igt_assert(blob);
+	igt_assert(blob->length);
+
+	info = malloc(sizeof(segment_data_t));
+	igt_assert(info);
+
+	lut_range = (struct drm_color_lut_range *) blob->data;
+	info->segment_count = blob->length / sizeof(lut_range[0]);
+	igt_assert(info->segment_count);
+
+	info->segment_data = malloc(sizeof(struct drm_color_lut_range) * info->segment_count);
+	igt_assert(info->segment_data);
+
+	for (i = 0; i < info->segment_count; i++) {
+		info->entries_count += lut_range[i].count;
+		info->segment_data[i] = lut_range[i];
+	}
+
+	drmModeFreePropertyBlob(blob);
+
+	return info;
+}
+
+void set_plane_gamma(igt_plane_t *plane,
+		char *mode,
+		struct drm_color_lut_ext *lut,
+		uint32_t size)
+{
+	igt_plane_set_prop_enum(plane, IGT_PLANE_GAMMA_MODE, mode);
+	if (size)
+		igt_plane_replace_prop_blob(plane, IGT_PLANE_GAMMA_LUT, lut, size);
+}
+
+void set_plane_degamma(igt_plane_t *plane,
+		char *mode,
+		struct drm_color_lut_ext *lut,
+		uint32_t size)
+{
+	igt_plane_set_prop_enum(plane, IGT_PLANE_DEGAMMA_MODE, mode);
+	if (size)
+		igt_plane_replace_prop_blob(plane, IGT_PLANE_DEGAMMA_LUT, lut, size);
+}
+
+void set_plane_ctm(igt_plane_t *plane, const double *coefficients)
+{
+	struct drm_color_ctm ctm;
+
+	fill_ctm_matrix(&ctm, coefficients);
+	igt_plane_replace_prop_blob(plane, IGT_PLANE_CTM, &ctm, sizeof(ctm));
+}
+
+void disable_plane_prop(igt_plane_t *plane, enum igt_atomic_plane_properties prop)
+{
+	if (igt_plane_has_prop(plane, prop))
+		igt_plane_replace_prop_blob(plane, prop, NULL, 0);
+}
+
 drmModePropertyBlobPtr
 get_blob(data_t *data, igt_pipe_t *pipe, enum igt_atomic_crtc_properties prop)
 {
@@ -274,6 +412,19 @@ pipe_set_property_blob_id(igt_pipe_t *pipe,
 	return ret;
 }
 
+static int
+plane_set_property_blob(igt_display_t *display,
+			igt_plane_t *plane,
+			enum igt_atomic_plane_properties prop,
+			void *ptr, size_t length)
+{
+	igt_plane_replace_prop_blob(plane, prop, ptr, length);
+
+	return igt_display_try_commit2(display,
+				       display->is_atomic ?
+				       COMMIT_ATOMIC : COMMIT_LEGACY);
+}
+
 int
 pipe_set_property_blob(igt_pipe_t *pipe,
 		       enum igt_atomic_crtc_properties prop,
@@ -319,6 +470,23 @@ invalid_lut_sizes(data_t *data, enum pipe p,
 	free(lut);
 }
 
+void
+invalid_plane_lut_sizes(igt_display_t *display,
+			igt_plane_t *plane,
+			enum igt_atomic_plane_properties prop,
+			size_t lut_size)
+{
+	void *lut = malloc(lut_size * 2);
+	igt_assert(lut);
+
+	memset(lut, 0, (lut_size * 2));
+	igt_assert_eq(plane_set_property_blob(display, plane, prop, lut, 1), -EINVAL);
+	igt_assert_eq(plane_set_property_blob(display, plane, prop, lut, lut_size + 1), -EINVAL);
+	igt_assert_eq(plane_set_property_blob(display, plane, prop, lut, lut_size - 1), -EINVAL);
+
+	free(lut);
+}
+
 void
 invalid_gamma_lut_sizes(data_t *data, enum pipe p)
 {
tests/kms_color_helper.h +29 -0
index bb6f0054f3..06c0dc22c4 100644
@@ -64,6 +64,14 @@ typedef struct {
 	color_t coeffs[];
 } gamma_lut_t;
 
+typedef struct {
+	uint32_t segment_count;
+	struct drm_color_lut_range *segment_data;
+	uint32_t entries_count;
+} segment_data_t;
+
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
 void paint_gradient_rectangles(data_t *data,
 			       drmModeModeInfo *mode,
 			       color_t *colors,
@@ -90,10 +98,31 @@ void set_gamma(data_t *data,
 void set_ctm(igt_pipe_t *pipe, const double *coefficients);
 void disable_prop(igt_pipe_t *pipe, enum igt_atomic_crtc_properties prop);
 
+drmModePropertyPtr get_plane_gamma_degamma_mode(igt_plane_t *plane,
+	enum igt_atomic_plane_properties prop);
+void clear_segment_data(segment_data_t *info);
+struct drm_color_lut_ext *create_unity_lut(segment_data_t *info);
+struct drm_color_lut_ext *create_max_lut(segment_data_t *info);
+segment_data_t *get_segment_data(data_t *data, uint64_t blob_id, char *mode);
+void set_plane_gamma(igt_plane_t *plane,
+	char *mode, struct drm_color_lut_ext *lut, uint32_t size);
+void set_plane_degamma(igt_plane_t *plane,
+	char *mode, struct drm_color_lut_ext *lut, uint32_t size);
+void set_plane_ctm(igt_plane_t *plane, const double *coefficients);
+void disable_plane_prop(igt_plane_t *plane, enum igt_atomic_plane_properties prop);
+void invalid_plane_lut_sizes(igt_display_t *display,
+			   igt_plane_t *plane,
+			   enum igt_atomic_plane_properties prop,
+			   size_t lut_size);
+
 #define disable_degamma(pipe) disable_prop(pipe, IGT_CRTC_DEGAMMA_LUT)
 #define disable_gamma(pipe) disable_prop(pipe, IGT_CRTC_GAMMA_LUT)
 #define disable_ctm(pipe) disable_prop(pipe, IGT_CRTC_CTM)
 
+#define disable_plane_degamma(plane) disable_plane_prop(plane, IGT_PLANE_DEGAMMA_LUT)
+#define disable_plane_gamma(plane) disable_plane_prop(plane, IGT_PLANE_GAMMA_LUT)
+#define disable_plane_ctm(plane) disable_plane_prop(plane, IGT_PLANE_CTM)
+
 drmModePropertyBlobPtr get_blob(data_t *data, igt_pipe_t *pipe,
 				enum igt_atomic_crtc_properties prop);
 bool crc_equal(igt_crc_t *a, igt_crc_t *b);
Signature · 1 line
2.32.0
#4 lore raw

PATCH v3 4/15 tests/kms_color: New subtests for Plane gamma

In reply to Bhanuprakash Modem

To verify Plane gamma, draw 3 gradient rectangles in red, green and blue, with a maxed out gamma LUT and verify we have the same CRC as drawing solid color rectangles.

v2:
* Drop Intel specific logic (Pekka)
* Add a support for extended mode (Bhanu)
v3:
* Add support to validate 'no gamma' mode (Harry)

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
---
 tests/kms_color.c | 180 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 178 insertions(+), 2 deletions(-)
tests/kms_color.c +178 -2
index 854b8f3c31..913cec0f79 100644
@@ -24,7 +24,10 @@
 
 #include "kms_color_helper.h"
 
-IGT_TEST_DESCRIPTION("Test Color Features at Pipe level");
+IGT_TEST_DESCRIPTION("Test Color Features at Pipe & Plane level");
+
+typedef bool (*test_t)(data_t*, igt_plane_t*);
+static bool extended = false;
 
 static void test_pipe_degamma(data_t *data,
 			      igt_plane_t *primary)
@@ -638,6 +641,128 @@ static void test_pipe_limited_range_ctm(data_t *data,
 }
 #endif
 
+static bool plane_gamma_test(data_t *data, igt_plane_t *plane)
+{
+	igt_output_t *output;
+	igt_display_t *display = &data->display;
+	drmModeModeInfo *mode;
+	struct igt_fb fb;
+	drmModePropertyPtr gamma_mode = NULL;
+	uint32_t i;
+	bool ret = true;
+	igt_pipe_crc_t *pipe_crc = NULL;
+	color_t red_green_blue[] = {
+		{ 1.0, 0.0, 0.0 },
+		{ 0.0, 1.0, 0.0 },
+		{ 0.0, 0.0, 1.0 }
+	};
+
+	igt_info("Plane gamma test is running on pipe-%s plane-%d(%s)\n",
+			kmstest_pipe_name(plane->pipe->pipe), plane->index,
+			kmstest_plane_type_name(plane->type));
+
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_GAMMA_MODE));
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_GAMMA_LUT));
+
+	pipe_crc = igt_pipe_crc_new(data->drm_fd,
+				  plane->pipe->pipe,
+				  INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	output = igt_get_single_output_for_pipe(display, plane->pipe->pipe);
+	igt_assert(output);
+
+	igt_output_set_pipe(output, plane->pipe->pipe);
+	mode = igt_output_get_mode(output);
+
+	/* Create a framebuffer at the size of the output. */
+	igt_assert(igt_create_fb(data->drm_fd,
+			      mode->hdisplay,
+			      mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      DRM_FORMAT_MOD_LINEAR,
+			      &fb));
+	igt_plane_set_fb(plane, &fb);
+
+	/* Disable Pipe color props. */
+	disable_ctm(plane->pipe);
+	disable_degamma(plane->pipe);
+	disable_gamma(plane->pipe);
+
+	disable_plane_ctm(plane);
+	disable_plane_degamma(plane);
+	igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	gamma_mode = get_plane_gamma_degamma_mode(plane, IGT_PLANE_GAMMA_MODE);
+
+	/* Iterate all supported gamma modes. */
+	for (i = 0; i < gamma_mode->count_enums; i++) {
+		igt_crc_t crc_gamma, crc_fullcolors;
+		segment_data_t *segment_info = NULL;
+		struct drm_color_lut_ext *lut = NULL;
+		uint32_t lut_size = 0;
+
+		igt_info("Trying to use gamma mode: \'%s\'\n", gamma_mode->enums[i].name);
+
+		/* Draw solid colors with no gamma transformation. */
+		disable_plane_gamma(plane);
+		paint_rectangles(data, mode, red_green_blue, &fb);
+		igt_plane_set_fb(plane, &fb);
+		igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+		igt_wait_for_vblank(data->drm_fd,
+			display->pipes[plane->pipe->pipe].crtc_offset);
+		igt_pipe_crc_collect_crc(pipe_crc, &crc_fullcolors);
+
+		/* 'no gamma' is intended to disable the gamma.
+		 * Hence, setting GAMMA_LUT to NULL (i.e disable_plane_gamma())
+		 * and setting GAMMA_MODE as 'no gamma' (i.e set_plane_gamma())
+		 * should produce the same result.
+		 */
+		if (strcmp(gamma_mode->enums[i].name, "no gamma")) {
+			segment_info = get_segment_data(data,
+							gamma_mode->enums[i].value,
+							gamma_mode->enums[i].name);
+			lut_size = sizeof(struct drm_color_lut_ext) * segment_info->entries_count;
+			lut = create_max_lut(segment_info);
+			if (is_i915_device(data->drm_fd))
+				lut[0].red = lut[0].green = lut[0].blue = 0; /* First entry is 0 for Intel h/w. */
+
+			/* Draw gradient colors with gamma LUT to remap all
+			 * values to max red/green/blue.
+			 */
+			paint_gradient_rectangles(data, mode, red_green_blue, &fb);
+			igt_plane_set_fb(plane, &fb);
+		}
+
+		set_plane_gamma(plane, gamma_mode->enums[i].name, lut, lut_size);
+		igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+		igt_wait_for_vblank(data->drm_fd,
+			display->pipes[plane->pipe->pipe].crtc_offset);
+		igt_pipe_crc_collect_crc(pipe_crc, &crc_gamma);
+
+		/* Verify that the CRC of the software computed output is
+		 * equal to the CRC of the gamma LUT transformation output.
+		 */
+		ret &= igt_check_crc_equal(&crc_gamma, &crc_fullcolors);
+
+		free(lut);
+		clear_segment_data(segment_info);
+	}
+
+	disable_plane_gamma(plane);
+	igt_plane_set_fb(plane, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	igt_pipe_crc_free(pipe_crc);
+	drmModeFreeProperty(gamma_mode);
+
+	return ret;
+}
+
 static void
 prep_pipe(data_t *data, enum pipe p)
 {
@@ -896,7 +1021,55 @@ run_invalid_tests_for_pipe(data_t *data, enum pipe p)
 		invalid_ctm_matrix_sizes(data, p);
 }
 
-igt_main
+static void run_plane_color_test(data_t *data, enum pipe pipe, test_t test)
+{
+	igt_plane_t *plane;
+	int count = 0;
+	int last_plane = (&data->display)->pipes[pipe].n_planes - 1;
+
+	for_each_plane_on_pipe(&data->display, pipe, plane) {
+		if (!extended && j__ != 0 && j__ != last_plane)
+			continue;
+
+		igt_assert(test(data, plane));
+
+		count++;
+	}
+
+	igt_require_f(count, "No valid planes found.\n");
+}
+
+static void run_tests_for_plane(data_t *data, enum pipe pipe)
+{
+	igt_fixture {
+		igt_require_pipe(&data->display, pipe);
+		igt_require_pipe_crc(data->drm_fd);
+		igt_require(data->display.pipes[pipe].n_planes > 0);
+		igt_display_require_output_on_pipe(&data->display, pipe);
+	}
+
+	igt_describe("Compare maxed out plane gamma LUT and solid color linear LUT");
+	igt_subtest_f("pipe-%s-plane-gamma", kmstest_pipe_name(pipe))
+		run_plane_color_test(data, pipe, plane_gamma_test);
+}
+
+static int opt_handler(int opt, int opt_index, void *data)
+{
+	switch (opt) {
+		case 'e':
+			extended = true;
+			break;
+		default:
+			return IGT_OPT_HANDLER_ERROR;
+	}
+
+	return IGT_OPT_HANDLER_SUCCESS;
+}
+
+const char *help_str =
+	"  -e \tExtended plane tests.\n";
+
+igt_main_args("e", NULL, help_str, opt_handler, NULL)
 {
 	data_t data = {};
 	enum pipe pipe;
@@ -916,6 +1089,9 @@ igt_main
 
 		igt_subtest_group
 			run_invalid_tests_for_pipe(&data, pipe);
+
+		igt_subtest_group
+			run_tests_for_plane(&data, pipe);
 	}
 
 	igt_fixture {
Signature · 1 line
2.32.0
#5 lore raw

PATCH v3 5/15 tests/kms_color: New subtests for Plane degamma

In reply to Bhanuprakash Modem

To verify Plane degamma, draw 3 gradient rectangles in red, green and blue, with a maxed out degamma LUT and verify we have the same CRC as drawing solid color rectangles without degamma.

v2:
* Add support to validate 'no degamma' mode (Harry)

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
---
 tests/kms_color.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 129 insertions(+)
tests/kms_color.c +129 -0
index 913cec0f79..ac93a0a6cb 100644
@@ -763,6 +763,130 @@ static bool plane_gamma_test(data_t *data, igt_plane_t *plane)
 	return ret;
 }
 
+static bool plane_degamma_test(data_t *data, igt_plane_t *plane)
+{
+	igt_output_t *output;
+	igt_display_t *display = &data->display;
+	drmModeModeInfo *mode;
+	drmModePropertyPtr degamma_mode;
+	struct igt_fb fb;
+	uint32_t i;
+	bool ret = true;
+	igt_pipe_crc_t *pipe_crc = NULL;
+	color_t red_green_blue[] = {
+		{ 1.0, 0.0, 0.0 },
+		{ 0.0, 1.0, 0.0 },
+		{ 0.0, 0.0, 1.0 }
+	};
+
+	igt_info("Plane degamma test is running on pipe-%s plane-%d(%s)\n",
+			kmstest_pipe_name(plane->pipe->pipe), plane->index,
+			kmstest_plane_type_name(plane->type));
+
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_DEGAMMA_MODE));
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_DEGAMMA_LUT));
+
+	pipe_crc = igt_pipe_crc_new(data->drm_fd,
+				    plane->pipe->pipe,
+				    INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	output = igt_get_single_output_for_pipe(display, plane->pipe->pipe);
+	igt_assert(output);
+
+	igt_output_set_pipe(output, plane->pipe->pipe);
+	mode = igt_output_get_mode(output);
+
+	/* Create a framebuffer at the size of the output. */
+	igt_assert(igt_create_fb(data->drm_fd,
+			      mode->hdisplay,
+			      mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      DRM_FORMAT_MOD_LINEAR,
+			      &fb));
+
+	igt_plane_set_fb(plane, &fb);
+
+	/* Disable Pipe color props. */
+	disable_ctm(plane->pipe);
+	disable_degamma(plane->pipe);
+	disable_gamma(plane->pipe);
+
+	disable_plane_ctm(plane);
+	disable_plane_gamma(plane);
+	igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	degamma_mode = get_plane_gamma_degamma_mode(plane, IGT_PLANE_DEGAMMA_MODE);
+
+	/* Iterate all supported degamma modes. */
+	for (i = 0; i < degamma_mode->count_enums; i++) {
+		igt_crc_t crc_degamma, crc_fullcolors;
+		segment_data_t *segment_info = NULL;
+		struct drm_color_lut_ext *lut = NULL;
+		uint32_t lut_size = 0;
+
+		igt_info("Trying to use degamma mode: \'%s\'\n", degamma_mode->enums[i].name);
+
+		/* Draw solid colors with no degamma. */
+		disable_plane_degamma(plane);
+		paint_rectangles(data, mode, red_green_blue, &fb);
+		igt_plane_set_fb(plane, &fb);
+		igt_display_commit2(display, display->is_atomic ?
+				COMMIT_ATOMIC : COMMIT_LEGACY);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[plane->pipe->pipe].crtc_offset);
+		igt_pipe_crc_collect_crc(pipe_crc, &crc_fullcolors);
+
+		/* 'no degamma' is intended to disable the degamma.
+		 * Hence, setting DEGAMMA_LUT to NULL (i.e disable_plane_degamma())
+		 * and setting DEGAMMA_MODE as 'no degamma' (i.e set_plane_degamma())
+		 * should produce the same result.
+		 */
+		if (strcmp(degamma_mode->enums[i].name, "no degamma")) {
+			segment_info = get_segment_data(data,
+							degamma_mode->enums[i].value,
+							degamma_mode->enums[i].name);
+			lut_size = sizeof(struct drm_color_lut_ext) * segment_info->entries_count;
+			lut = create_max_lut(segment_info);
+			if (is_i915_device(data->drm_fd))
+				lut[0].red = lut[0].green = lut[0].blue = 0; /* First entry is 0 for Intel h/w. */
+
+			/* Draw gradient colors with degamma LUT to remap all
+			 * values to max red/green/blue.
+			 */
+			paint_gradient_rectangles(data, mode, red_green_blue, &fb);
+			igt_plane_set_fb(plane, &fb);
+		}
+
+		set_plane_degamma(plane, degamma_mode->enums[i].name, lut, lut_size);
+		igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[plane->pipe->pipe].crtc_offset);
+		igt_pipe_crc_collect_crc(pipe_crc, &crc_degamma);
+
+		/* Verify that the CRC of the software computed output
+		 * is equal to the CRC of the degamma LUT transformation
+		 * output.
+		 */
+		ret &= igt_check_crc_equal(&crc_degamma, &crc_fullcolors);
+
+		free(lut);
+		clear_segment_data(segment_info);
+	}
+
+	disable_plane_degamma(plane);
+	igt_plane_set_fb(plane, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	igt_pipe_crc_free(pipe_crc);
+	drmModeFreeProperty(degamma_mode);
+
+	return ret;
+}
+
 static void
 prep_pipe(data_t *data, enum pipe p)
 {
@@ -1051,6 +1175,11 @@ static void run_tests_for_plane(data_t *data, enum pipe pipe)
 	igt_describe("Compare maxed out plane gamma LUT and solid color linear LUT");
 	igt_subtest_f("pipe-%s-plane-gamma", kmstest_pipe_name(pipe))
 		run_plane_color_test(data, pipe, plane_gamma_test);
+
+	igt_describe("Compare maxed out plane degamma LUT and solid color linear LUT");
+	igt_subtest_f("pipe-%s-plane-degamma",
+			kmstest_pipe_name(pipe))
+		run_plane_color_test(data, pipe, plane_degamma_test);
 }
 
 static int opt_handler(int opt, int opt_index, void *data)
Signature · 1 line
2.32.0
#6 lore raw

PATCH v3 6/15 tests/kms_color: New subtests for Plane CTM

In reply to Bhanuprakash Modem

To verify plane CTM, draw 3 rectangles using before colors with the ctm matrix applied and verify the CRC is equal to using after colors with an identify ctm matrix.

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
---
 tests/kms_color.c | 226 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 226 insertions(+)
tests/kms_color.c +226 -0
index ac93a0a6cb..50a613ab62 100644
@@ -29,6 +29,77 @@ IGT_TEST_DESCRIPTION("Test Color Features at Pipe & Plane level");
 typedef bool (*test_t)(data_t*, igt_plane_t*);
 static bool extended = false;
 
+struct {
+	const char *test_name;
+	int iter;
+	color_t expected_colors[3];
+	double ctm[9];
+} ctm_tests[] = {
+	{"plane-ctm-red-to-blue", 0,
+					{{ 0.0, 0.0, 1.0 },
+					 { 0.0, 1.0, 0.0 },
+					 { 0.0, 0.0, 1.0 }},
+		{ 0.0, 0.0, 0.0,
+		  0.0, 1.0, 0.0,
+		  1.0, 0.0, 1.0 },
+	},
+	{"plane-ctm-green-to-red", 0,
+					{{ 1.0, 0.0, 0.0 },
+					 { 1.0, 0.0, 0.0 },
+					 { 0.0, 0.0, 1.0 }},
+		{ 1.0, 1.0, 0.0,
+		  0.0, 0.0, 0.0,
+		  0.0, 0.0, 1.0 },
+	},
+	{"plane-ctm-blue-to-red", 0,
+					{{ 1.0, 0.0, 0.0 },
+					 { 0.0, 1.0, 0.0 },
+					 { 1.0, 0.0, 0.0 }},
+		{ 1.0, 0.0, 1.0,
+		  0.0, 1.0, 0.0,
+		  0.0, 0.0, 0.0 },
+	},
+	{"plane-ctm-max", 0,
+					{{ 1.0, 0.0, 0.0 },
+					 { 0.0, 1.0, 0.0 },
+					 { 0.0, 0.0, 1.0 }},
+		{ 100.0, 0.0, 0.0,
+		  0.0, 100.0, 0.0,
+		  0.0, 0.0, 100.0 },
+	},
+	{"plane-ctm-negative", 0,
+					{{ 0.0, 0.0, 0.0 },
+					 { 0.0, 0.0, 0.0 },
+					 { 0.0, 0.0, 0.0 }},
+		{ -1.0, 0.0, 0.0,
+		   0.0, -1.0, 0.0,
+		   0.0, 0.0, -1.0 },
+	},
+	/* We tests a few values around the expected result because
+	 * it depends on the hardware we're dealing with, we can
+	 * either get clamped or rounded values and we also need to
+	 * account for odd number of items in the LUTs.
+	 */
+	{"plane-ctm-0-25", 5,
+					{{ 0.0, }, { 0.0, }, { 0.0, }},
+		{ 0.25, 0.0,  0.0,
+		  0.0,  0.25, 0.0,
+		  0.0,  0.0,  0.25 },
+	},
+	{"plane-ctm-0-50", 5,
+					{{ 0.0, }, { 0.0, }, { 0.0, }},
+		{ 0.5,  0.0,  0.0,
+		  0.0,  0.5,  0.0,
+		  0.0,  0.0,  0.5 },
+	},
+	{"plane-ctm-0-75", 7,
+					{{ 0.0, }, { 0.0, }, { 0.0, }},
+		{ 0.75, 0.0,  0.0,
+		  0.0,  0.75, 0.0,
+		  0.0,  0.0,  0.75 },
+	},
+};
+
 static void test_pipe_degamma(data_t *data,
 			      igt_plane_t *primary)
 {
@@ -887,6 +958,98 @@ static bool plane_degamma_test(data_t *data, igt_plane_t *plane)
 	return ret;
 }
 
+static bool test_plane_ctm(data_t *data,
+			  igt_plane_t *plane,
+			  color_t *before,
+			  color_t *after,
+			  double *ctm_matrix)
+{
+	const double ctm_identity[] = {
+		1.0, 0.0, 0.0,
+		0.0, 1.0, 0.0,
+		0.0, 0.0, 1.0
+	};
+	igt_output_t *output;
+	igt_display_t *display = &data->display;
+	drmModeModeInfo *mode;
+	struct igt_fb fb;
+	igt_crc_t crc_software, crc_hardware;
+	igt_pipe_crc_t *pipe_crc = NULL;
+	bool ret = true;
+
+	igt_info("Plane CTM test is running on pipe-%s plane-%d(%s)\n",
+			kmstest_pipe_name(plane->pipe->pipe), plane->index,
+			kmstest_plane_type_name(plane->type));
+
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_CTM));
+
+	pipe_crc = igt_pipe_crc_new(data->drm_fd,
+				  plane->pipe->pipe,
+				  INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	output = igt_get_single_output_for_pipe(display, plane->pipe->pipe);
+	igt_assert(output);
+
+	igt_output_set_pipe(output, plane->pipe->pipe);
+	mode = igt_output_get_mode(output);
+
+	/* Create a framebuffer at the size of the output. */
+	igt_assert(igt_create_fb(data->drm_fd,
+			      mode->hdisplay,
+			      mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      DRM_FORMAT_MOD_LINEAR,
+			      &fb));
+
+	igt_plane_set_fb(plane, &fb);
+
+	/* Disable Pipe color props. */
+	disable_degamma(plane->pipe);
+	disable_gamma(plane->pipe);
+	disable_ctm(plane->pipe);
+
+	disable_plane_gamma(plane);
+	disable_plane_degamma(plane);
+	igt_display_commit2(display, display->is_atomic ?
+				COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	/* Without CTM transformation. */
+	paint_rectangles(data, mode, after, &fb);
+	igt_plane_set_fb(plane, &fb);
+	set_plane_ctm(plane, ctm_identity);
+	igt_display_commit2(display, display->is_atomic ?
+				COMMIT_ATOMIC : COMMIT_LEGACY);
+	igt_wait_for_vblank(data->drm_fd,
+			display->pipes[plane->pipe->pipe].crtc_offset);
+	igt_pipe_crc_collect_crc(pipe_crc, &crc_software);
+
+	/* With CTM transformation. */
+	paint_rectangles(data, mode, before, &fb);
+	igt_plane_set_fb(plane, &fb);
+	set_plane_ctm(plane, ctm_matrix);
+	igt_display_commit2(display, display->is_atomic ?
+				COMMIT_ATOMIC : COMMIT_LEGACY);
+	igt_wait_for_vblank(data->drm_fd,
+			display->pipes[plane->pipe->pipe].crtc_offset);
+	igt_pipe_crc_collect_crc(pipe_crc, &crc_hardware);
+
+	/* Verify that the CRC of the software computed ouutput
+	 * is equal to the CRC of the CTM matrix transformation
+	 * output.
+	 */
+	ret = igt_check_crc_equal(&crc_software, &crc_hardware);
+
+	disable_plane_ctm(plane);
+	igt_plane_set_fb(plane, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	igt_pipe_crc_free(pipe_crc);
+
+	return ret;
+}
+
 static void
 prep_pipe(data_t *data, enum pipe p)
 {
@@ -1163,8 +1326,59 @@ static void run_plane_color_test(data_t *data, enum pipe pipe, test_t test)
 	igt_require_f(count, "No valid planes found.\n");
 }
 
+static void run_plane_ctm_test(data_t *data,
+				enum pipe pipe,
+				color_t *expected,
+				double *ctm,
+				int iter)
+{
+	igt_plane_t *plane;
+	bool result;
+	int i, count = 0;
+	double delta = 1.0 / (1 << 8);
+	color_t red_green_blue[] = {
+		{ 1.0, 0.0, 0.0 },
+		{ 0.0, 1.0, 0.0 },
+		{ 0.0, 0.0, 1.0 }
+	};
+	int last_plane = (&data->display)->pipes[pipe].n_planes - 1;
+
+	for_each_plane_on_pipe(&data->display, pipe, plane) {
+		if (!extended && j__ != 0 && j__ != last_plane)
+			continue;
+
+		result = false;
+
+		if (!iter)
+			result = test_plane_ctm(data, plane,
+						red_green_blue, expected,
+						ctm);
+
+		for (i = 0; i < iter; i++) {
+			expected[0].r =
+			expected[1].g =
+			expected[2].b =
+				ctm[0] + delta * (i - (iter/2));
+
+			if (test_plane_ctm(data, plane,
+					   red_green_blue, expected,
+					   ctm)) {
+				result = true;
+				break;
+			}
+		}
+
+		igt_assert(result);
+		count++;
+	}
+
+	igt_require_f(count, "No valid planes found.\n");
+}
+
 static void run_tests_for_plane(data_t *data, enum pipe pipe)
 {
+	int i;
+
 	igt_fixture {
 		igt_require_pipe(&data->display, pipe);
 		igt_require_pipe_crc(data->drm_fd);
@@ -1180,6 +1394,18 @@ static void run_tests_for_plane(data_t *data, enum pipe pipe)
 	igt_subtest_f("pipe-%s-plane-degamma",
 			kmstest_pipe_name(pipe))
 		run_plane_color_test(data, pipe, plane_degamma_test);
+
+	for (i = 0; i < ARRAY_SIZE(ctm_tests); i++) {
+		igt_describe("Compare after applying ctm matrix & identity matrix");
+		igt_subtest_f("pipe-%s-%s",
+				kmstest_pipe_name(pipe),
+				ctm_tests[i].test_name) {
+			run_plane_ctm_test(data, pipe,
+					ctm_tests[i].expected_colors,
+					ctm_tests[i].ctm,
+					ctm_tests[i].iter);
+		}
+	}
 }
 
 static int opt_handler(int opt, int opt_index, void *data)
Signature · 1 line
2.32.0
#7 lore raw

PATCH v3 7/15 tests/kms_color: New negative tests for plane level color mgmt

In reply to Bhanuprakash Modem

Negative check for:
* plane gamma lut sizes
* plane degamma lut sizes
* plane ctm matrix sizes

v2:
* Run subtests for all enums (Pekka)

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
---
 tests/kms_color.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 118 insertions(+)
tests/kms_color.c +118 -0
index 50a613ab62..212442fb42 100644
@@ -712,6 +712,109 @@ static void test_pipe_limited_range_ctm(data_t *data,
 }
 #endif
 
+static bool invalid_plane_gamma_test(data_t *data, igt_plane_t *plane)
+{
+	igt_display_t *display = &data->display;
+	drmModePropertyPtr gamma_mode = NULL;
+	uint32_t i;
+
+	igt_info("Plane invalid gamma test is running on pipe-%s plane-%d(%s)\n",
+			kmstest_pipe_name(plane->pipe->pipe), plane->index,
+			kmstest_plane_type_name(plane->type));
+
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_GAMMA_MODE));
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_GAMMA_LUT));
+
+	gamma_mode = get_plane_gamma_degamma_mode(plane, IGT_PLANE_GAMMA_MODE);
+
+	/* Iterate all supported gamma modes. */
+	for (i = 0; i < gamma_mode->count_enums; i++) {
+		segment_data_t *segment_info = NULL;
+		size_t lut_size = 0;
+
+		/* Ignore 'no gamma' from enum list. */
+		if (!strcmp(gamma_mode->enums[i].name, "no gamma"))
+			continue;
+
+		igt_info("Trying to use gamma mode: \'%s\'\n", gamma_mode->enums[i].name);
+
+		segment_info = get_segment_data(data, gamma_mode->enums[i].value,
+				gamma_mode->enums[i].name);
+		lut_size = sizeof(struct drm_color_lut_ext) * segment_info->entries_count;
+
+		igt_plane_set_prop_enum(plane, IGT_PLANE_GAMMA_MODE, gamma_mode->enums[i].name);
+		invalid_plane_lut_sizes(display, plane,
+					IGT_PLANE_GAMMA_LUT,
+					lut_size);
+
+		clear_segment_data(segment_info);
+	}
+
+	drmModeFreeProperty(gamma_mode);
+
+	return true;
+}
+
+static bool invalid_plane_degamma_test(data_t *data, igt_plane_t *plane)
+{
+	igt_display_t *display = &data->display;
+	drmModePropertyPtr degamma_mode = NULL;
+	uint32_t i;
+
+	igt_info("Plane invalid degamma test is running on pipe-%s plane-%d(%s)\n",
+			kmstest_pipe_name(plane->pipe->pipe), plane->index,
+			kmstest_plane_type_name(plane->type));
+
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_DEGAMMA_MODE));
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_DEGAMMA_LUT));
+
+	degamma_mode = get_plane_gamma_degamma_mode(plane, IGT_PLANE_DEGAMMA_MODE);
+
+	/* Iterate all supported degamma modes. */
+	for (i = 0; i < degamma_mode->count_enums; i++) {
+		segment_data_t *segment_info = NULL;
+		size_t lut_size = 0;
+
+		/* Ignore 'no degamma' from enum list. */
+		if (!strcmp(degamma_mode->enums[i].name, "no degamma"))
+			continue;
+
+		igt_info("Trying to use degamma mode: \'%s\'\n", degamma_mode->enums[i].name);
+
+		segment_info = get_segment_data(data,
+						degamma_mode->enums[i].value,
+						degamma_mode->enums[i].name);
+		lut_size = sizeof(struct drm_color_lut_ext) * segment_info->entries_count * 2;
+
+		igt_plane_set_prop_enum(plane,
+					IGT_PLANE_DEGAMMA_MODE,
+					degamma_mode->enums[i].name);
+		invalid_plane_lut_sizes(display, plane,
+					IGT_PLANE_DEGAMMA_LUT,
+					lut_size);
+
+		clear_segment_data(segment_info);
+	}
+
+	drmModeFreeProperty(degamma_mode);
+
+	return true;
+}
+
+static bool invalid_plane_ctm_test(data_t *data, igt_plane_t *plane)
+{
+	igt_info("Plane invalid CTM test is running on pipe-%s plane-%d(%s)\n",
+			kmstest_pipe_name(plane->pipe->pipe), plane->index,
+			kmstest_plane_type_name(plane->type));
+
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_CTM));
+	invalid_plane_lut_sizes(&data->display, plane,
+				IGT_PLANE_CTM,
+				sizeof(struct drm_color_ctm));
+
+	return true;
+}
+
 static bool plane_gamma_test(data_t *data, igt_plane_t *plane)
 {
 	igt_output_t *output;
@@ -1406,6 +1509,21 @@ static void run_tests_for_plane(data_t *data, enum pipe pipe)
 					ctm_tests[i].iter);
 		}
 	}
+
+	igt_describe("Negative check for invalid plane gamma lut sizes");
+	igt_subtest_f("pipe-%s-invalid-plane-gamma-lut-sizes",
+			kmstest_pipe_name(pipe))
+		run_plane_color_test(data, pipe, invalid_plane_gamma_test);
+
+	igt_describe("Negative check for invalid plane degamma lut sizes");
+	igt_subtest_f("pipe-%s-invalid-plane-degamma-lut-sizes",
+			kmstest_pipe_name(pipe))
+		run_plane_color_test(data, pipe, invalid_plane_degamma_test);
+
+	igt_describe("Negative check for invalid plane ctm matrix sizes");
+	igt_subtest_f("pipe-%s-invalid-plane-ctm-matrix-sizes",
+			kmstest_pipe_name(pipe))
+		run_plane_color_test(data, pipe, invalid_plane_ctm_test);
 }
 
 static int opt_handler(int opt, int opt_index, void *data)
Signature · 1 line
2.32.0
#8 lore raw

PATCH v3 8/15 tests/kms_color_chamelium: New subtests for Plane gamma

In reply to Bhanuprakash Modem

To verify Plane gamma, draw 3 gradient rectangles in red, green and blue, with a maxed out gamma LUT and verify we have the same frame dump as drawing solid color rectangles.

v2:
* Drop Intel specific logic (Pekka)
* Add a support for extended mode (Bhanu)
v3:
* Add support to validate 'no gamma' mode (Harry)

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
Cc Kunal Joshi <[email protected]>
---
 tests/kms_color_chamelium.c | 191 +++++++++++++++++++++++++++++++++++-
 1 file changed, 189 insertions(+), 2 deletions(-)
tests/kms_color_chamelium.c +189 -2
index 76f82d6d35..9e306e2fac 100644
@@ -24,7 +24,10 @@
 
 #include "kms_color_helper.h"
 
-IGT_TEST_DESCRIPTION("Test Color Features at Pipe level using Chamelium to verify instead of CRC");
+IGT_TEST_DESCRIPTION("Test Color Features at Pipe & Plane level using Chamelium to verify instead of CRC");
+
+typedef bool (*test_t)(data_t*, igt_plane_t*);
+static bool extended = false;
 
 /*
  * Draw 3 gradient rectangles in red, green and blue, with a maxed out
@@ -723,7 +726,187 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 	}
 }
 
-igt_main
+static bool plane_gamma_test(data_t *data, igt_plane_t *plane)
+{
+	igt_output_t *output;
+	igt_display_t *display = &data->display;
+	drmModeModeInfo *mode;
+	struct igt_fb fb, fbref;
+	drmModePropertyPtr gamma_mode = NULL;
+	uint32_t i;
+	bool ret = true;
+	struct chamelium_port *port = NULL;
+	color_t red_green_blue[] = {
+		{ 1.0, 0.0, 0.0 },
+		{ 0.0, 1.0, 0.0 },
+		{ 0.0, 0.0, 1.0 }
+	};
+
+	igt_info("Plane gamma test is running on pipe-%s plane-%d(%s)\n",
+			kmstest_pipe_name(plane->pipe->pipe), plane->index,
+			kmstest_plane_type_name(plane->type));
+
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_GAMMA_MODE));
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_GAMMA_LUT));
+
+	for_each_valid_output_on_pipe(display, plane->pipe->pipe, output) {
+		for (i = 0; i < data->port_count; i++)
+			if (strcmp(output->name, chamelium_port_get_name(data->ports[i])) == 0) {
+				port = data->ports[i];
+				break;
+			}
+
+		if (port)
+			break;
+	}
+	igt_require(port);
+	igt_assert(output);
+
+	igt_output_set_pipe(output, plane->pipe->pipe);
+	mode = igt_output_get_mode(output);
+
+	/* Create a framebuffer at the size of the output. */
+	igt_assert(igt_create_fb(data->drm_fd,
+			      mode->hdisplay,
+			      mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      DRM_FORMAT_MOD_LINEAR,
+			      &fb));
+
+	igt_assert(igt_create_fb(data->drm_fd,
+			      mode->hdisplay,
+			      mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      DRM_FORMAT_MOD_LINEAR,
+			      &fbref));
+
+	disable_degamma(plane->pipe);
+	disable_ctm(plane->pipe);
+	disable_gamma(plane->pipe);
+
+	disable_plane_degamma(plane);
+	disable_plane_ctm(plane);
+	disable_plane_gamma(plane);
+
+	igt_plane_set_fb(plane, &fbref);
+	igt_display_commit2(display, display->is_atomic ?
+				COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	/* Draw solid colors with no gamma transformation. */
+	paint_rectangles(data, mode, red_green_blue, &fbref);
+
+	gamma_mode = get_plane_gamma_degamma_mode(plane, IGT_PLANE_GAMMA_MODE);
+	/* Iterate all supported gamma modes. */
+	for (i = 0; i < gamma_mode->count_enums; i++) {
+		struct chamelium_frame_dump *frame_fullcolors;
+		segment_data_t *segment_info = NULL;
+		struct drm_color_lut_ext *lut = NULL;
+		uint32_t lut_size = 0;
+
+		igt_info("Trying to use gamma mode: \'%s\'\n", gamma_mode->enums[i].name);
+
+		/* 'no gamma' is intended to disable the gamma.
+		 * Hence, setting GAMMA_LUT to NULL (i.e disable_plane_gamma())
+		 * and setting GAMMA_MODE as 'no gamma' (i.e set_plane_gamma())
+		 * should produce the same result.
+		 */
+		if (!strcmp(gamma_mode->enums[i].name, "no gamma")) {
+			paint_rectangles(data, mode, red_green_blue, &fb);
+		} else {
+			segment_info = get_segment_data(data,
+							gamma_mode->enums[i].value,
+							gamma_mode->enums[i].name);
+			lut_size = sizeof(struct drm_color_lut_ext) * segment_info->entries_count;
+			lut = create_max_lut(segment_info);
+			if (is_i915_device(data->drm_fd))
+				lut[0].red = lut[0].green = lut[0].blue = 0; /* First entry is 0 for Intel h/w. */
+
+			/* Draw a gradient with gamma LUT to remap all
+			 * values to max red/green/blue.
+			 */
+			paint_gradient_rectangles(data, mode, red_green_blue, &fb);
+		}
+
+		igt_plane_set_fb(plane, &fb);
+		set_plane_gamma(plane, gamma_mode->enums[i].name, lut, lut_size);
+		igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+		chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 1);
+		frame_fullcolors =
+			chamelium_read_captured_frame(data->chamelium, 0);
+
+		/* Verify that the framebuffer reference of the software computed
+		 * output is equal to the frame dump of the gamma LUT
+		 * transformation output.
+		 */
+		ret &= chamelium_frame_match_or_dump(data->chamelium, port,
+					      frame_fullcolors, &fbref,
+					      CHAMELIUM_CHECK_ANALOG);
+		free(lut);
+		clear_segment_data(segment_info);
+	}
+
+	disable_plane_gamma(plane);
+	igt_plane_set_fb(plane, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	drmModeFreeProperty(gamma_mode);
+
+	return ret;
+}
+
+static void run_plane_color_test(data_t *data, enum pipe pipe, test_t test)
+{
+	igt_plane_t *plane;
+	int count = 0;
+	int last_plane = (&data->display)->pipes[pipe].n_planes - 1;
+
+	for_each_plane_on_pipe(&data->display, pipe, plane) {
+		if (!extended && j__ != 0 && j__ != last_plane)
+			continue;
+
+		igt_assert(test(data, plane));
+
+		count++;
+	}
+
+	igt_require_f(count, "No valid planes found.\n");
+}
+
+static void run_tests_for_plane(data_t *data, enum pipe pipe)
+{
+	igt_fixture {
+		igt_require_pipe(&data->display, pipe);
+		igt_require(data->display.pipes[pipe].n_planes > 0);
+		igt_display_require_output_on_pipe(&data->display, pipe);
+	}
+
+	igt_describe("Compare maxed out plane gamma LUT and solid color linear LUT");
+	igt_subtest_f("pipe-%s-plane-gamma",
+			kmstest_pipe_name(pipe))
+		run_plane_color_test(data, pipe, plane_gamma_test);
+}
+
+static int opt_handler(int opt, int opt_index, void *data)
+{
+	switch (opt) {
+		case 'e':
+			extended = true;
+			break;
+		default:
+			return IGT_OPT_HANDLER_ERROR;
+	}
+
+	return IGT_OPT_HANDLER_SUCCESS;
+}
+
+const char *help_str =
+	"  -e \tExtended plane tests.\n";
+
+igt_main_args("e", NULL, help_str, opt_handler, NULL)
 {
 	data_t data = {};
 	enum pipe pipe;
@@ -755,6 +938,10 @@ igt_main
 		igt_subtest_group
 			run_tests_for_pipe(&data, pipe);
 
+	for_each_pipe_static(pipe)
+		igt_subtest_group
+			run_tests_for_plane(&data, pipe);
+
 	igt_fixture {
 		igt_display_fini(&data.display);
 	}
Signature · 1 line
2.32.0
#9 lore raw

PATCH v3 9/15 tests/kms_color_chamelium: New subtests for Plane degamma

In reply to Bhanuprakash Modem

To verify Plane degamma, draw 3 gradient rectangles in red, green and blue, with a maxed out degamma LUT and verify we have the same frame dump as drawing solid color rectangles with linear gamma LUT.

v2:
* Add support to validate 'no degamma' mode (Harry)

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
Cc Kunal Joshi <[email protected]>
---
 tests/kms_color_chamelium.c | 138 ++++++++++++++++++++++++++++++++++++
 1 file changed, 138 insertions(+)
tests/kms_color_chamelium.c +138 -0
index 9e306e2fac..c9dc656b9a 100644
@@ -858,6 +858,139 @@ static bool plane_gamma_test(data_t *data, igt_plane_t *plane)
 	return ret;
 }
 
+static bool plane_degamma_test(data_t *data, igt_plane_t *plane)
+{
+	igt_output_t *output;
+	igt_display_t *display = &data->display;
+	drmModeModeInfo *mode;
+	drmModePropertyPtr degamma_mode;
+	struct igt_fb fb, fbref;
+	struct chamelium_port *port;
+	uint32_t i;
+	bool ret = true;
+	color_t red_green_blue[] = {
+		{ 1.0, 0.0, 0.0 },
+		{ 0.0, 1.0, 0.0 },
+		{ 0.0, 0.0, 1.0 }
+	};
+
+	igt_info("Plane degamma test is running on pipe-%s plane-%d(%s)\n",
+			kmstest_pipe_name(plane->pipe->pipe), plane->index,
+			kmstest_plane_type_name(plane->type));
+
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_DEGAMMA_MODE));
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_DEGAMMA_LUT));
+
+	for_each_valid_output_on_pipe(display, plane->pipe->pipe, output) {
+		for (i = 0; i < data->port_count; i++)
+			if (strcmp(output->name, chamelium_port_get_name(data->ports[i])) == 0) {
+				port = data->ports[i];
+				break;
+			}
+
+		if (port)
+			break;
+	}
+	igt_require(port);
+	igt_assert(output);
+
+	igt_output_set_pipe(output, plane->pipe->pipe);
+	mode = igt_output_get_mode(output);
+
+	/* Create a framebuffer at the size of the output. */
+	igt_assert(igt_create_fb(data->drm_fd,
+			      mode->hdisplay,
+			      mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      DRM_FORMAT_MOD_LINEAR,
+			      &fb));
+
+	igt_assert(igt_create_fb(data->drm_fd,
+			      mode->hdisplay,
+			      mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      DRM_FORMAT_MOD_LINEAR,
+			      &fbref));
+
+	disable_degamma(plane->pipe);
+	disable_ctm(plane->pipe);
+	disable_gamma(plane->pipe);
+
+	disable_plane_degamma(plane);
+	disable_plane_ctm(plane);
+	disable_plane_gamma(plane);
+
+	igt_plane_set_fb(plane, &fbref);
+	igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	/* Draw solid colors with no degamma. */
+	paint_rectangles(data, mode, red_green_blue, &fbref);
+
+	degamma_mode = get_plane_gamma_degamma_mode(plane, IGT_PLANE_DEGAMMA_MODE);
+	/* Iterate all supported degamma modes. */
+	for (i = 0; i < degamma_mode->count_enums; i++) {
+		struct chamelium_frame_dump *frame_fullcolors;
+		segment_data_t *segment_info = NULL;
+		struct drm_color_lut_ext *lut = NULL;
+		uint32_t lut_size = 0;
+
+		igt_info("Trying to use degamma mode: \'%s\'\n", degamma_mode->enums[i].name);
+
+		/* 'no degamma' is intended to disable the degamma.
+		 * Hence, setting DEGAMMA_LUT to NULL (i.e disable_plane_degamma())
+		 * and setting DEGAMMA_MODE as 'no degamma' (i.e set_plane_degamma())
+		 * should produce the same result.
+		 */
+		if (!strcmp(degamma_mode->enums[i].name, "no degamma")) {
+			paint_rectangles(data, mode, red_green_blue, &fb);
+		} else {
+			segment_info = get_segment_data(data,
+							degamma_mode->enums[i].value,
+							degamma_mode->enums[i].name);
+			lut_size = sizeof(struct drm_color_lut_ext) * segment_info->entries_count;
+			lut = create_max_lut(segment_info);
+			if (is_i915_device(data->drm_fd))
+				lut[0].red = lut[0].green = lut[0].blue = 0; /* First entry is 0 for Intel h/w. */
+
+			/* Draw a gradient with degamma LUT to remap all
+			 * values to max red/green/blue.
+			 */
+			paint_gradient_rectangles(data, mode, red_green_blue, &fb);
+		}
+
+		igt_plane_set_fb(plane, &fb);
+		set_plane_degamma(plane, degamma_mode->enums[i].name, lut, lut_size);
+		igt_display_commit2(display, display->is_atomic ?
+						COMMIT_ATOMIC : COMMIT_LEGACY);
+
+		chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 1);
+		frame_fullcolors =
+			chamelium_read_captured_frame(data->chamelium, 0);
+
+		/* Verify that the framebuffer reference of the software computed
+		 * output is equal to the frame dump of the gamma LUT
+		 * transformation output.
+		 */
+		ret &= chamelium_frame_match_or_dump(data->chamelium, port,
+				frame_fullcolors, &fbref,
+				CHAMELIUM_CHECK_ANALOG);
+
+		free(lut);
+		clear_segment_data(segment_info);
+	}
+
+	disable_plane_degamma(plane);
+	igt_plane_set_fb(plane, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	drmModeFreeProperty(degamma_mode);
+
+	return ret;
+}
+
 static void run_plane_color_test(data_t *data, enum pipe pipe, test_t test)
 {
 	igt_plane_t *plane;
@@ -888,6 +1021,11 @@ static void run_tests_for_plane(data_t *data, enum pipe pipe)
 	igt_subtest_f("pipe-%s-plane-gamma",
 			kmstest_pipe_name(pipe))
 		run_plane_color_test(data, pipe, plane_gamma_test);
+
+	igt_describe("Compare maxed out plane degamma LUT and solid color linear LUT");
+	igt_subtest_f("pipe-%s-plane-degamma",
+			kmstest_pipe_name(pipe))
+		run_plane_color_test(data, pipe, plane_degamma_test);
 }
 
 static int opt_handler(int opt, int opt_index, void *data)
Signature · 1 line
2.32.0
#10 lore raw

PATCH v3 10/15 tests/kms_color_chamelium: New subtests for Plane CTM

In reply to Bhanuprakash Modem

To verify plane CTM, draw 3 rectangles using before colors with the ctm matrix applied and verify the frame dump is equal to using after colors with an identify ctm matrix.

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
Cc Kunal Joshi <[email protected]>
---
 tests/kms_color_chamelium.c | 228 ++++++++++++++++++++++++++++++++++++
 1 file changed, 228 insertions(+)
tests/kms_color_chamelium.c +228 -0
index c9dc656b9a..6285100643 100644
@@ -29,6 +29,77 @@ IGT_TEST_DESCRIPTION("Test Color Features at Pipe & Plane level using Chamelium
 typedef bool (*test_t)(data_t*, igt_plane_t*);
 static bool extended = false;
 
+struct {
+	const char *test_name;
+	int iter;
+	color_t expected_colors[3];
+	double ctm[9];
+} ctm_tests[] = {
+	{"plane-ctm-red-to-blue", 0,
+					{{ 0.0, 0.0, 1.0 },
+					 { 0.0, 1.0, 0.0 },
+					 { 0.0, 0.0, 1.0 }},
+		{ 0.0, 0.0, 0.0,
+		  0.0, 1.0, 0.0,
+		  1.0, 0.0, 1.0 },
+	},
+	{"plane-ctm-green-to-red", 0,
+					{{ 1.0, 0.0, 0.0 },
+					 { 1.0, 0.0, 0.0 },
+					 { 0.0, 0.0, 1.0 }},
+		{ 1.0, 1.0, 0.0,
+		  0.0, 0.0, 0.0,
+		  0.0, 0.0, 1.0 },
+	},
+	{"plane-ctm-blue-to-red", 0,
+					{{ 1.0, 0.0, 0.0 },
+					 { 0.0, 1.0, 0.0 },
+					 { 1.0, 0.0, 0.0 }},
+		{ 1.0, 0.0, 1.0,
+		  0.0, 1.0, 0.0,
+		  0.0, 0.0, 0.0 },
+	},
+	{"plane-ctm-max", 0,
+					{{ 1.0, 0.0, 0.0 },
+					 { 0.0, 1.0, 0.0 },
+					 { 0.0, 0.0, 1.0 }},
+		{ 100.0, 0.0, 0.0,
+		  0.0, 100.0, 0.0,
+		  0.0, 0.0, 100.0 },
+	},
+	{"plane-ctm-negative", 0,
+					{{ 0.0, 0.0, 0.0 },
+					 { 0.0, 0.0, 0.0 },
+					 { 0.0, 0.0, 0.0 }},
+		{ -1.0, 0.0, 0.0,
+		   0.0, -1.0, 0.0,
+		   0.0, 0.0, -1.0 },
+	},
+	/* We tests a few values around the expected result because
+	 * it depends on the hardware we're dealing with, we can
+	 * either get clamped or rounded values and we also need to
+	 * account for odd number of items in the LUTs.
+	 */
+	{"plane-ctm-0-25", 5,
+					{{ 0.0, }, { 0.0, }, { 0.0, }},
+		{ 0.25, 0.0,  0.0,
+		  0.0,  0.25, 0.0,
+		  0.0,  0.0,  0.25 },
+	},
+	{"plane-ctm-0-50", 5,
+					{{ 0.0, }, { 0.0, }, { 0.0, }},
+		{ 0.5,  0.0,  0.0,
+		  0.0,  0.5,  0.0,
+		  0.0,  0.0,  0.5 },
+	},
+	{"plane-ctm-0-75", 7,
+					{{ 0.0, }, { 0.0, }, { 0.0, }},
+		{ 0.75, 0.0,  0.0,
+		  0.0,  0.75, 0.0,
+		  0.0,  0.0,  0.75 },
+	},
+};
+
 /*
  * Draw 3 gradient rectangles in red, green and blue, with a maxed out
  * degamma LUT and verify we have the same frame dump as drawing solid color
@@ -991,6 +1062,102 @@ static bool plane_degamma_test(data_t *data, igt_plane_t *plane)
 	return ret;
 }
 
+static bool test_plane_ctm(data_t *data,
+			  igt_plane_t *plane,
+			  color_t *before,
+			  color_t *after,
+			  double *ctm_matrix)
+{
+	igt_output_t *output;
+	igt_display_t *display = &data->display;
+	drmModeModeInfo *mode;
+	struct igt_fb fb, fbref;
+	struct chamelium_port *port;
+	struct chamelium_frame_dump *frame_hardware;
+	uint32_t i;
+	bool ret = true;
+
+	igt_info("Plane CTM test is running on pipe-%s plane-%d(%s)\n",
+			kmstest_pipe_name(plane->pipe->pipe), plane->index,
+			kmstest_plane_type_name(plane->type));
+
+	igt_require(igt_plane_has_prop(plane, IGT_PLANE_CTM));
+
+	for_each_valid_output_on_pipe(display, plane->pipe->pipe, output) {
+		for (i = 0; i < data->port_count; i++)
+			if (strcmp(output->name, chamelium_port_get_name(data->ports[i])) == 0) {
+				port = data->ports[i];
+				break;
+			}
+
+		if (port)
+			break;
+	}
+	igt_require(port);
+	igt_assert(output);
+
+	igt_output_set_pipe(output, plane->pipe->pipe);
+	mode = igt_output_get_mode(output);
+
+	/* Create a framebuffer at the size of the output. */
+	igt_assert(igt_create_fb(data->drm_fd,
+			      mode->hdisplay,
+			      mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      DRM_FORMAT_MOD_LINEAR,
+			      &fb));
+
+	igt_assert(igt_create_fb(data->drm_fd,
+			      mode->hdisplay,
+			      mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      DRM_FORMAT_MOD_LINEAR,
+			      &fbref));
+
+	disable_degamma(plane->pipe);
+	disable_ctm(plane->pipe);
+	disable_gamma(plane->pipe);
+
+	disable_plane_degamma(plane);
+	disable_plane_ctm(plane);
+	disable_plane_gamma(plane);
+
+	igt_plane_set_fb(plane, &fbref);
+	igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	/* Without CTM transformation. */
+	paint_rectangles(data, mode, after, &fbref);
+
+	/* With CTM transformation. */
+	paint_rectangles(data, mode, before, &fb);
+	igt_plane_set_fb(plane, &fb);
+	set_plane_ctm(plane, ctm_matrix);
+	igt_display_commit2(display, display->is_atomic ?
+				COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 1);
+	frame_hardware =
+		chamelium_read_captured_frame(data->chamelium, 0);
+
+	/* Verify that the framebuffer reference of the software
+	 * computed output is equal to the frame dump of the CTM
+	 * matrix transformation output.
+	 */
+	ret = chamelium_frame_match_or_dump(data->chamelium, port,
+					     frame_hardware,
+					     &fbref,
+					     CHAMELIUM_CHECK_ANALOG);
+
+	disable_plane_ctm(plane);
+	igt_plane_set_fb(plane, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, display->is_atomic ?
+					COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	return ret;
+}
+
 static void run_plane_color_test(data_t *data, enum pipe pipe, test_t test)
 {
 	igt_plane_t *plane;
@@ -1009,8 +1176,57 @@ static void run_plane_color_test(data_t *data, enum pipe pipe, test_t test)
 	igt_require_f(count, "No valid planes found.\n");
 }
 
+static void run_plane_ctm_test(data_t *data,
+				enum pipe pipe,
+				color_t *expected,
+				double *ctm,
+				int iter)
+{
+	igt_plane_t *plane;
+	bool result;
+	int i, count = 0;
+	double delta = 1.0 / (1 << 8);
+	color_t red_green_blue[] = {
+		{ 1.0, 0.0, 0.0 },
+		{ 0.0, 1.0, 0.0 },
+		{ 0.0, 0.0, 1.0 }
+	};
+	int last_plane = (&data->display)->pipes[pipe].n_planes - 1;
+
+	for_each_plane_on_pipe(&data->display, pipe, plane) {
+		if (!extended && j__ != 0 && j__ != last_plane)
+			continue;
+
+		result = false;
+
+		if (!iter)
+			result = test_plane_ctm(data, plane, red_green_blue,
+						expected, ctm);
+
+		for (i = 0; i < iter; i++) {
+			expected[0].r =
+			expected[1].g =
+			expected[2].b =
+				ctm[0] + delta * (i - (iter/2));
+
+			if (test_plane_ctm(data, plane, red_green_blue,
+						expected, ctm)) {
+				result = true;
+				break;
+			}
+		}
+
+		igt_assert(result);
+		count++;
+	}
+
+	igt_require_f(count, "No valid planes found.\n");
+}
+
 static void run_tests_for_plane(data_t *data, enum pipe pipe)
 {
+	int i;
+
 	igt_fixture {
 		igt_require_pipe(&data->display, pipe);
 		igt_require(data->display.pipes[pipe].n_planes > 0);
@@ -1026,6 +1242,18 @@ static void run_tests_for_plane(data_t *data, enum pipe pipe)
 	igt_subtest_f("pipe-%s-plane-degamma",
 			kmstest_pipe_name(pipe))
 		run_plane_color_test(data, pipe, plane_degamma_test);
+
+	for (i = 0; i < ARRAY_SIZE(ctm_tests); i++) {
+		igt_describe("Compare after applying ctm matrix & identity matrix");
+		igt_subtest_f("pipe-%s-%s",
+				kmstest_pipe_name(pipe),
+				ctm_tests[i].test_name) {
+			run_plane_ctm_test(data, pipe,
+					ctm_tests[i].expected_colors,
+					ctm_tests[i].ctm,
+					ctm_tests[i].iter);
+		}
+	}
 }
 
 static int opt_handler(int opt, int opt_index, void *data)
Signature · 1 line
2.32.0
#11 lore raw

PATCH v3 11/15 lib/igt_kms: Add pipe color mgmt properties

In reply to Bhanuprakash Modem

From: Mukunda Pramodh Kumar <[email protected]>

Add IGT support to read CRTC GAMMA_MODE property.

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
---
 lib/igt_kms.c | 1 +
 lib/igt_kms.h | 1 +
 2 files changed, 2 insertions(+)
lib/igt_kms.c +1 -0
index fdb83e0f91..677d26fedb 100644
@@ -592,6 +592,7 @@ const char * const igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
 	[IGT_CRTC_CTM] = "CTM",
 	[IGT_CRTC_GAMMA_LUT] = "GAMMA_LUT",
 	[IGT_CRTC_GAMMA_LUT_SIZE] = "GAMMA_LUT_SIZE",
+	[IGT_CRTC_GAMMA_MODE] = "GAMMA_MODE",
 	[IGT_CRTC_DEGAMMA_LUT] = "DEGAMMA_LUT",
 	[IGT_CRTC_DEGAMMA_LUT_SIZE] = "DEGAMMA_LUT_SIZE",
 	[IGT_CRTC_MODE_ID] = "MODE_ID",
lib/igt_kms.h +1 -0
index 3a1f7243ad..5fac651fa3 100644
@@ -119,6 +119,7 @@ enum igt_atomic_crtc_properties {
        IGT_CRTC_CTM = 0,
        IGT_CRTC_GAMMA_LUT,
        IGT_CRTC_GAMMA_LUT_SIZE,
+       IGT_CRTC_GAMMA_MODE,
        IGT_CRTC_DEGAMMA_LUT,
        IGT_CRTC_DEGAMMA_LUT_SIZE,
        IGT_CRTC_MODE_ID,
Signature · 1 line
2.32.0
#12 lore raw

PATCH v3 12/15 kms_color_helper: Add helper functions to support logarithmic gamma mode

In reply to Bhanuprakash Modem

From: Mukunda Pramodh Kumar <[email protected]>

Add helper functions to support logarithmic gamma mode

v2:
* Refactor the logic (Bhanu)

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
---
 tests/kms_color_helper.c | 123 +++++++++++++++++++++++++++++++++++++++
 tests/kms_color_helper.h |  15 +++++
 2 files changed, 138 insertions(+)
tests/kms_color_helper.c +123 -0
index 1bde58b8f2..90ec5ce633 100644
@@ -120,6 +120,30 @@ gamma_lut_t *generate_table(int lut_size, double exp)
 	return gamma;
 }
 
+gamma_lut_t *generate_table_unity(segment_data_t *info)
+{
+	uint32_t segment, entry, index = 0;
+	double val;
+	int i = 0;
+	gamma_lut_t *gamma = alloc_lut(info->entries_count);
+	igt_assert(gamma);
+
+	for (segment = 0; segment < info->segment_count; segment++) {
+		uint32_t entry_count = info->segment_data[segment].count;
+		uint32_t start = (segment == 0) ? 0 : (1 << (segment - 1));
+		uint32_t end = 1 << segment;
+
+		for (entry = 0; entry < entry_count; entry++) {
+			val = start + entry * ((end - start) * 1.0 / entry_count);
+
+			set_rgb(&gamma->coeffs[i++], val);
+			index++;
+		}
+	}
+
+	return gamma;
+}
+
 gamma_lut_t *generate_table_max(int lut_size)
 {
 	gamma_lut_t *gamma = alloc_lut(lut_size);
@@ -190,6 +214,31 @@ struct drm_color_lut *coeffs_to_lut(data_t *data,
 	return lut;
 }
 
+struct drm_color_lut *coeffs_to_lut_adv(data_t *data,
+					const gamma_lut_t *gamma,
+					int max_hw_value)
+{
+	struct drm_color_lut *lut;
+	int i, lut_size = gamma->size;
+	uint32_t max_value = (1 << 16) - 1;
+
+	lut = malloc(sizeof(struct drm_color_lut) * lut_size);
+	igt_assert(lut);
+
+	for (i = 0; i < lut_size; i++) {
+		double scaling_factor = (double)max_value / (double)max_hw_value;
+		uint32_t r = MIN((gamma->coeffs[i].r * scaling_factor), max_value);
+		uint32_t g = MIN((gamma->coeffs[i].g * scaling_factor), max_value);
+		uint32_t b = MIN((gamma->coeffs[i].b * scaling_factor), max_value);
+
+		lut[i].red = r;
+		lut[i].green = g;
+		lut[i].blue = b;
+	}
+
+	return lut;
+}
+
 void set_degamma(data_t *data,
 		 igt_pipe_t *pipe,
 		 const gamma_lut_t *gamma)
@@ -203,6 +252,15 @@ void set_degamma(data_t *data,
 	free(lut);
 }
 
+void set_pipe_gamma(igt_pipe_t *pipe,
+		    uint64_t value,
+		    struct drm_color_lut *lut,
+		    uint32_t size)
+{
+	igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_GAMMA_MODE, value);
+	igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_GAMMA_LUT, lut, size);
+}
+
 void set_gamma(data_t *data,
 	       igt_pipe_t *pipe, const gamma_lut_t *gamma)
 {
@@ -249,6 +307,23 @@ void disable_prop(igt_pipe_t *pipe, enum igt_atomic_crtc_properties prop)
 		igt_pipe_obj_replace_prop_blob(pipe, prop, NULL, 0);
 }
 
+drmModePropertyPtr get_pipe_gamma_degamma_mode(igt_pipe_t *pipe,
+					       enum igt_atomic_crtc_properties prop)
+{
+	igt_display_t *display = pipe->display;
+	uint32_t prop_id = pipe->props[prop];
+	drmModePropertyPtr drmProp;
+
+	igt_assert(prop_id);
+
+	drmProp = drmModeGetProperty(display->drm_fd, prop_id);
+
+	igt_assert(drmProp);
+	igt_assert(drmProp->count_enums);
+
+	return drmProp;
+}
+
 drmModePropertyPtr get_plane_gamma_degamma_mode(igt_plane_t *plane,
 				enum igt_atomic_plane_properties prop)
 {
@@ -335,6 +410,7 @@ segment_data_t *get_segment_data(data_t *data,
 	info->segment_data = malloc(sizeof(struct drm_color_lut_range) * info->segment_count);
 	igt_assert(info->segment_data);
 
+	info->entries_count = 0;
 	for (i = 0; i < info->segment_count; i++) {
 		info->entries_count += lut_range[i].count;
 		info->segment_data[i] = lut_range[i];
@@ -345,6 +421,53 @@ segment_data_t *get_segment_data(data_t *data,
 	return info;
 }
 
+void set_advance_gamma(data_t *data, igt_pipe_t *pipe, enum gamma_type type)
+{
+	igt_display_t *display = &data->display;
+	gamma_lut_t *gamma_log;
+	drmModePropertyPtr gamma_mode = NULL;
+	segment_data_t *segment_info = NULL;
+	struct drm_color_lut *lut = NULL;
+	int lut_size = 0;
+	int max_hw_value = 0;
+
+	drmSetClientCap(data->drm_fd, DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES, 1);
+	gamma_mode = get_pipe_gamma_degamma_mode(pipe, IGT_CRTC_GAMMA_MODE);
+
+	for (int i = 0; i < gamma_mode->count_enums; i++) {
+		if (!strcmp(gamma_mode->enums[i].name, "logarithmic gamma")) {
+			segment_info = get_segment_data(data,
+							gamma_mode->enums[i].value,
+							gamma_mode->enums[i].name);
+			lut_size = sizeof(struct drm_color_lut) *
+					  segment_info->entries_count;
+			max_hw_value = segment_info->segment_data[segment_info->segment_count - 1].end;
+			gamma_log->size = segment_info->entries_count;
+
+			if (type == UNITY_GAMMA) {
+				gamma_log = generate_table_unity(segment_info);
+				lut = coeffs_to_lut_adv(data, gamma_log, max_hw_value);
+			} else if (type == MAX_GAMMA) {
+				gamma_log = generate_table_max(segment_info->entries_count);
+				lut = coeffs_to_lut(data, gamma_log, data->color_depth, 0);
+			}
+			if (is_i915_device(data->drm_fd))
+				lut[0].red = lut[0].green = lut[0].blue = 0;
+
+			set_pipe_gamma(pipe, gamma_mode->enums[i].value,
+				       lut, lut_size);
+			igt_display_commit2(display, display->is_atomic
+					    ? COMMIT_ATOMIC : COMMIT_LEGACY);
+			break;
+		}
+	}
+	drmSetClientCap(data->drm_fd, DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES, 0);
+	free(gamma_log);
+	free(lut);
+	clear_segment_data(segment_info);
+	drmModeFreeProperty(gamma_mode);
+}
+
 void set_plane_gamma(igt_plane_t *plane,
 		char *mode,
 		struct drm_color_lut_ext *lut,
tests/kms_color_helper.h +15 -0
index 06c0dc22c4..3bb4076957 100644
@@ -70,6 +70,11 @@ typedef struct {
 	uint32_t entries_count;
 } segment_data_t;
 
+enum gamma_type {
+	UNITY_GAMMA,
+	MAX_GAMMA
+};
+
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
 
 void paint_gradient_rectangles(data_t *data,
@@ -85,10 +90,14 @@ void free_lut(gamma_lut_t *gamma);
 gamma_lut_t *generate_table(int lut_size, double exp);
 gamma_lut_t *generate_table_max(int lut_size);
 gamma_lut_t *generate_table_zero(int lut_size);
+gamma_lut_t *generate_table_unity(segment_data_t *info);
 struct drm_color_lut *coeffs_to_lut(data_t *data,
 				    const gamma_lut_t *gamma,
 				    uint32_t color_depth,
 				    int off);
+struct drm_color_lut *coeffs_to_lut_adv(data_t *data,
+						const gamma_lut_t *gamma,
+						int max_hw_value);
 void set_degamma(data_t *data,
 		 igt_pipe_t *pipe,
 		 const gamma_lut_t *gamma);
@@ -98,12 +107,18 @@ void set_gamma(data_t *data,
 void set_ctm(igt_pipe_t *pipe, const double *coefficients);
 void disable_prop(igt_pipe_t *pipe, enum igt_atomic_crtc_properties prop);
 
+drmModePropertyPtr get_pipe_gamma_degamma_mode(igt_pipe_t *pipe,
+					       enum igt_atomic_crtc_properties
+					       prop);
 drmModePropertyPtr get_plane_gamma_degamma_mode(igt_plane_t *plane,
 	enum igt_atomic_plane_properties prop);
 void clear_segment_data(segment_data_t *info);
 struct drm_color_lut_ext *create_unity_lut(segment_data_t *info);
 struct drm_color_lut_ext *create_max_lut(segment_data_t *info);
 segment_data_t *get_segment_data(data_t *data, uint64_t blob_id, char *mode);
+void set_pipe_gamma(igt_pipe_t *pipe, uint64_t value,
+		    struct drm_color_lut *lut, uint32_t size);
+void set_advance_gamma(data_t *data, igt_pipe_t *pipe, enum gamma_type type);
 void set_plane_gamma(igt_plane_t *plane,
 	char *mode, struct drm_color_lut_ext *lut, uint32_t size);
 void set_plane_degamma(igt_plane_t *plane,
Signature · 1 line
2.32.0
#13 lore raw

PATCH v3 13/15 tests/kms_color: Extended IGT tests to support logarithmic gamma mode

In reply to Bhanuprakash Modem

From: Mukunda Pramodh Kumar <[email protected]>

Extended IGT tests to support logarithmic gamma mode on pipe

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Uma Shankar <[email protected]>
---
 tests/kms_color.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
tests/kms_color.c +15 -4
index 212442fb42..d4b251efb1 100644
@@ -208,8 +208,6 @@ static void test_pipe_gamma(data_t *data,
 
 	igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT));
 
-	gamma_full = generate_table_max(data->gamma_lut_size);
-
 	output = igt_get_single_output_for_pipe(&data->display, primary->pipe->pipe);
 	igt_require(output);
 
@@ -234,10 +232,13 @@ static void test_pipe_gamma(data_t *data,
 	igt_assert(fb_modeset_id);
 
 	igt_plane_set_fb(primary, &fb_modeset);
+	/* Reset Color properties */
 	disable_ctm(primary->pipe);
 	disable_degamma(primary->pipe);
-	set_gamma(data, primary->pipe, gamma_full);
+	disable_gamma(primary->pipe);
 	igt_display_commit(&data->display);
+	igt_wait_for_vblank(data->drm_fd,
+			    display->pipes[primary->pipe->pipe].crtc_offset);
 
 	/* Draw solid colors with no gamma transformation. */
 	paint_rectangles(data, mode, red_green_blue, &fb);
@@ -250,6 +251,13 @@ static void test_pipe_gamma(data_t *data,
 	/* Draw a gradient with gamma LUT to remap all values
 	 * to max red/green/blue.
 	 */
+	if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_MODE)) {
+		set_advance_gamma(data, primary->pipe, MAX_GAMMA);
+	} else {
+		gamma_full = generate_table_max(data->gamma_lut_size);
+		set_gamma(data, primary->pipe, gamma_full);
+		igt_display_commit(&data->display);
+	}
 	paint_gradient_rectangles(data, mode, red_green_blue, &fb);
 	igt_plane_set_fb(primary, &fb);
 	igt_display_commit(&data->display);
@@ -557,7 +565,10 @@ static bool test_pipe_ctm(data_t *data,
 	 */
 	if (memcmp(before, after, sizeof(color_t))) {
 		set_degamma(data, primary->pipe, degamma_linear);
-		set_gamma(data, primary->pipe, gamma_linear);
+		if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_MODE))
+			disable_gamma(primary->pipe);
+		else
+			set_gamma(data, primary->pipe, gamma_linear);
 	} else {
 		/* Disable Degamma and Gamma for ctm max test */
 		disable_degamma(primary->pipe);
Signature · 1 line
2.32.0
#14 lore raw

PATCH v3 14/15 tests/kms_color_chamelium: Extended IGT tests to support logarithmic gamma mode

In reply to Bhanuprakash Modem

Extended IGT tests to support logarithmic gamma mode on pipe

Cc Harry Wentland <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Kunal Joshi <[email protected]>
Cc Uma Shankar <[email protected]>
---
 tests/kms_color_chamelium.c | 40 ++++++++++++++++++++++++++++++++++---
 1 file changed, 37 insertions(+), 3 deletions(-)
tests/kms_color_chamelium.c +37 -3
index 6285100643..000f5d05ac 100644
@@ -293,10 +293,21 @@ static void test_pipe_gamma(data_t *data,
 		igt_assert(fbref_id);
 
 		igt_plane_set_fb(primary, &fb_modeset);
+
+		/* Reset the color properties */
 		disable_ctm(primary->pipe);
 		disable_degamma(primary->pipe);
-		set_gamma(data, primary->pipe, gamma_full);
+		disable_gamma(primary->pipe);
 		igt_display_commit(&data->display);
+		igt_wait_for_vblank(data->drm_fd,
+				    data->display.pipes[primary->pipe->pipe].crtc_offset);
+
+		if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_MODE)) {
+			set_advance_gamma(data, primary->pipe, MAX_GAMMA);
+		} else {
+			set_gamma(data, primary->pipe, gamma_full);
+			igt_display_commit(&data->display);
+		}
 
 		/* Draw solid colors with no gamma transformation. */
 		paint_rectangles(data, mode, red_green_blue, &fbref);
@@ -319,6 +330,7 @@ static void test_pipe_gamma(data_t *data,
 					      frame_fullcolors, &fbref,
 					      CHAMELIUM_CHECK_ANALOG);
 
+		/* Cleanup */
 		disable_gamma(primary->pipe);
 		igt_plane_set_fb(primary, NULL);
 		igt_output_set_pipe(output, PIPE_NONE);
@@ -407,7 +419,10 @@ static bool test_pipe_ctm(data_t *data,
 
 		if (memcmp(before, after, sizeof(color_t))) {
 			set_degamma(data, primary->pipe, degamma_linear);
-			set_gamma(data, primary->pipe, gamma_linear);
+			if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_MODE))
+				disable_gamma(primary->pipe);
+			else
+				set_gamma(data, primary->pipe, gamma_linear);
 		} else {
 			/* Disable Degamma and Gamma for ctm max test */
 			disable_degamma(primary->pipe);
@@ -441,6 +456,12 @@ static bool test_pipe_ctm(data_t *data,
 		igt_output_set_pipe(output, PIPE_NONE);
 	}
 
+	/* Cleanup */
+	disable_gamma(primary->pipe);
+	disable_degamma(primary->pipe);
+	disable_ctm(primary->pipe);
+	igt_display_commit(&data->display);
+
 	free_lut(degamma_linear);
 	free_lut(gamma_linear);
 
@@ -537,7 +558,14 @@ static void test_pipe_limited_range_ctm(data_t *data,
 		igt_plane_set_fb(primary, &fb_modeset);
 
 		set_degamma(data, primary->pipe, degamma_linear);
-		set_gamma(data, primary->pipe, gamma_linear);
+		/*
+		 * No need of linear gamma for limited range ctm test
+		 * Not extending for new API interface.
+		 */
+		if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_MODE))
+			disable_gamma(primary->pipe);
+		else
+			set_gamma(data, primary->pipe, gamma_linear);
 		set_ctm(primary->pipe, ctm);
 
 		igt_output_set_prop_value(output,
@@ -574,6 +602,12 @@ static void test_pipe_limited_range_ctm(data_t *data,
 
 	}
 
+	/* Cleanup */
+	disable_gamma(primary->pipe);
+	disable_degamma(primary->pipe);
+	disable_ctm(primary->pipe);
+	igt_display_commit(&data->display);
+
 	free_lut(gamma_linear);
 	free_lut(degamma_linear);
 
Signature · 1 line
2.32.0
#15 lore raw

PATCH v3 15/15 HAX: Add color mgmt tests to BAT

In reply to Bhanuprakash Modem
---
 tests/intel-ci/fast-feedback.testlist | 112 ++++++++++++++++++++++++++
 1 file changed, 112 insertions(+)
tests/intel-ci/fast-feedback.testlist +112 -0
index de1c6cb46c..0bdd82f9bc 100644
@@ -102,6 +102,118 @@ igt@kms_chamelium@hdmi-crc-fast
 igt@kms_chamelium@vga-hpd-fast
 igt@kms_chamelium@vga-edid-read
 igt@kms_chamelium@common-hpd-after-suspend
+igt@kms_color@pipe-A-ctm-red-to-blue
+igt@kms_color@pipe-A-ctm-green-to-red
+igt@kms_color@pipe-A-ctm-blue-to-red
+igt@kms_color@pipe-A-ctm-0-25
+igt@kms_color@pipe-A-ctm-0-5
+igt@kms_color@pipe-A-ctm-0-75
+igt@kms_color@pipe-A-ctm-max
+igt@kms_color@pipe-A-ctm-negative
+igt@kms_color@pipe-A-degamma
+igt@kms_color@pipe-A-gamma
+igt@kms_color@pipe-A-legacy-gamma
+igt@kms_color@pipe-A-legacy-gamma-reset
+igt@kms_color@pipe-A-invalid-gamma-lut-sizes
+igt@kms_color@pipe-A-invalid-degamma-lut-sizes
+igt@kms_color@pipe-A-invalid-ctm-matrix-sizes
+igt@kms_color@pipe-A-plane-gamma
+igt@kms_color@pipe-A-plane-degamma
+igt@kms_color@pipe-A-plane-ctm-red-to-blue
+igt@kms_color@pipe-A-plane-ctm-green-to-red
+igt@kms_color@pipe-A-plane-ctm-blue-to-red
+igt@kms_color@pipe-A-plane-ctm-max
+igt@kms_color@pipe-A-plane-ctm-negative
+igt@kms_color@pipe-A-plane-ctm-0-25
+igt@kms_color@pipe-A-plane-ctm-0-50
+igt@kms_color@pipe-A-plane-ctm-0-75
+igt@kms_color@pipe-A-invalid-plane-gamma-lut-sizes
+igt@kms_color@pipe-A-invalid-plane-degamma-lut-sizes
+igt@kms_color@pipe-A-invalid-plane-ctm-matrix-sizes
+igt@kms_color@pipe-B-ctm-red-to-blue
+igt@kms_color@pipe-B-ctm-green-to-red
+igt@kms_color@pipe-B-ctm-blue-to-red
+igt@kms_color@pipe-B-ctm-0-25
+igt@kms_color@pipe-B-ctm-0-5
+igt@kms_color@pipe-B-ctm-0-75
+igt@kms_color@pipe-B-ctm-max
+igt@kms_color@pipe-B-ctm-negative
+igt@kms_color@pipe-B-degamma
+igt@kms_color@pipe-B-gamma
+igt@kms_color@pipe-B-legacy-gamma
+igt@kms_color@pipe-B-legacy-gamma-reset
+igt@kms_color@pipe-B-invalid-gamma-lut-sizes
+igt@kms_color@pipe-B-invalid-degamma-lut-sizes
+igt@kms_color@pipe-B-invalid-ctm-matrix-sizes
+igt@kms_color@pipe-B-plane-gamma
+igt@kms_color@pipe-B-plane-degamma
+igt@kms_color@pipe-B-plane-ctm-red-to-blue
+igt@kms_color@pipe-B-plane-ctm-green-to-red
+igt@kms_color@pipe-B-plane-ctm-blue-to-red
+igt@kms_color@pipe-B-plane-ctm-max
+igt@kms_color@pipe-B-plane-ctm-negative
+igt@kms_color@pipe-B-plane-ctm-0-25
+igt@kms_color@pipe-B-plane-ctm-0-50
+igt@kms_color@pipe-B-plane-ctm-0-75
+igt@kms_color@pipe-B-invalid-plane-gamma-lut-sizes
+igt@kms_color@pipe-B-invalid-plane-degamma-lut-sizes
+igt@kms_color@pipe-B-invalid-plane-ctm-matrix-sizes
+igt@kms_color@pipe-C-ctm-red-to-blue
+igt@kms_color@pipe-C-ctm-green-to-red
+igt@kms_color@pipe-C-ctm-blue-to-red
+igt@kms_color@pipe-C-ctm-0-25
+igt@kms_color@pipe-C-ctm-0-5
+igt@kms_color@pipe-C-ctm-0-75
+igt@kms_color@pipe-C-ctm-max
+igt@kms_color@pipe-C-ctm-negative
+igt@kms_color@pipe-C-degamma
+igt@kms_color@pipe-C-gamma
+igt@kms_color@pipe-C-legacy-gamma
+igt@kms_color@pipe-C-legacy-gamma-reset
+igt@kms_color@pipe-C-invalid-gamma-lut-sizes
+igt@kms_color@pipe-C-invalid-degamma-lut-sizes
+igt@kms_color@pipe-C-invalid-ctm-matrix-sizes
+igt@kms_color@pipe-C-plane-gamma
+igt@kms_color@pipe-C-plane-degamma
+igt@kms_color@pipe-C-plane-ctm-red-to-blue
+igt@kms_color@pipe-C-plane-ctm-green-to-red
+igt@kms_color@pipe-C-plane-ctm-blue-to-red
+igt@kms_color@pipe-C-plane-ctm-max
+igt@kms_color@pipe-C-plane-ctm-negative
+igt@kms_color@pipe-C-plane-ctm-0-25
+igt@kms_color@pipe-C-plane-ctm-0-50
+igt@kms_color@pipe-C-plane-ctm-0-75
+igt@kms_color@pipe-C-invalid-plane-gamma-lut-sizes
+igt@kms_color@pipe-C-invalid-plane-degamma-lut-sizes
+igt@kms_color@pipe-C-invalid-plane-ctm-matrix-sizes
+igt@kms_color@pipe-D-ctm-red-to-blue
+igt@kms_color@pipe-D-ctm-green-to-red
+igt@kms_color@pipe-D-ctm-blue-to-red
+igt@kms_color@pipe-D-ctm-0-25
+igt@kms_color@pipe-D-ctm-0-5
+igt@kms_color@pipe-D-ctm-0-75
+igt@kms_color@pipe-D-ctm-max
+igt@kms_color@pipe-D-ctm-negative
+igt@kms_color@pipe-D-degamma
+igt@kms_color@pipe-D-gamma
+igt@kms_color@pipe-D-legacy-gamma
+igt@kms_color@pipe-D-legacy-gamma-reset
+igt@kms_color@pipe-D-invalid-gamma-lut-sizes
+igt@kms_color@pipe-D-invalid-degamma-lut-sizes
+igt@kms_color@pipe-D-invalid-ctm-matrix-sizes
+igt@kms_color@pipe-D-plane-gamma
+igt@kms_color@pipe-D-plane-degamma
+igt@kms_color@pipe-D-plane-ctm-red-to-blue
+igt@kms_color@pipe-D-plane-ctm-green-to-red
+igt@kms_color@pipe-D-plane-ctm-blue-to-red
+igt@kms_color@pipe-D-plane-ctm-max
+igt@kms_color@pipe-D-plane-ctm-negative
+igt@kms_color@pipe-D-plane-ctm-0-25
+igt@kms_color@pipe-D-plane-ctm-0-50
+igt@kms_color@pipe-D-plane-ctm-0-75
+igt@kms_color@pipe-D-invalid-plane-gamma-lut-sizes
+igt@kms_color@pipe-D-invalid-plane-degamma-lut-sizes
+igt@kms_color@pipe-D-invalid-plane-ctm-matrix-sizes
 igt@kms_prop_blob@basic
 igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic
 igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy
Signature · 1 line
2.32.0
#16 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for Add IGT support for plane color management (rev3)

In reply to Bhanuprakash Modem
== Series Details ==

== Series Details ==

Series: Add IGT support for plane color management (rev3)
URL : https://patchwork.freedesktop.org/series/96895/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11053 -> IGTPW_6543
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in IGTPW_6543, please notify your bug team 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/IGTPW_6543/index.html

Participating hosts (43 -> 36)
------------------------------

Additional (1): fi-pnv-d510
Missing (8): fi-kbl-soraka bat-dg1-6 bat-dg1-5 bat-adlp-6 bat-adlp-4 bat-rpls-1 fi-bdw-samus bat-jsl-1

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_color@pipe-a-gamma:
- fi-cfl-guc: NOTRUN -> [FAIL][1] +2 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-cfl-guc/igt@[email protected]
- fi-ilk-650: NOTRUN -> [FAIL][2] +1 similar issue
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-ilk-650/igt@[email protected]
- fi-elk-e7500: NOTRUN -> [FAIL][3] +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-elk-e7500/igt@[email protected]
- fi-glk-dsi: NOTRUN -> [FAIL][4] +2 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-glk-dsi/igt@[email protected]
- fi-kbl-7500u: NOTRUN -> [FAIL][5] +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-kbl-7500u/igt@[email protected]

* {igt@kms_color@pipe-a-invalid-plane-degamma-lut-sizes} (NEW):
- {fi-tgl-dsi}: NOTRUN -> [SKIP][6] +51 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-tgl-dsi/igt@[email protected]

* igt@kms_color@pipe-b-gamma:
- fi-snb-2600: NOTRUN -> [FAIL][7] +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-snb-2600/igt@[email protected]
- fi-kbl-x1275: NOTRUN -> [FAIL][8] +2 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-kbl-x1275/igt@[email protected]
- fi-bwr-2160: NOTRUN -> [FAIL][9] +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bwr-2160/igt@[email protected]
- fi-skl-guc: NOTRUN -> [FAIL][10] +2 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-skl-guc/igt@[email protected]
- fi-snb-2520m: NOTRUN -> [FAIL][11] +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-snb-2520m/igt@[email protected]
- fi-cfl-8700k: NOTRUN -> [FAIL][12] +2 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-cfl-8700k/igt@[email protected]
- fi-bdw-5557u: NOTRUN -> [FAIL][13] +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bdw-5557u/igt@[email protected]
- fi-glk-j4005: NOTRUN -> [FAIL][14] +2 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-glk-j4005/igt@[email protected]

* {igt@kms_color@pipe-b-plane-ctm-0-50} (NEW):
- fi-tgl-1115g4: NOTRUN -> [SKIP][15] +51 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-tgl-1115g4/igt@[email protected]

* {igt@kms_color@pipe-b-plane-ctm-red-to-blue} (NEW):
- fi-rkl-guc: NOTRUN -> [SKIP][16] +51 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-rkl-guc/igt@[email protected]

* igt@kms_color@pipe-c-gamma:
- fi-ivb-3770: NOTRUN -> [FAIL][17] +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-ivb-3770/igt@[email protected]
- fi-hsw-4770: NOTRUN -> [FAIL][18] +2 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-hsw-4770/igt@[email protected]
- fi-bxt-dsi: NOTRUN -> [FAIL][19] +2 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bxt-dsi/igt@[email protected]
- fi-cml-u2: NOTRUN -> [FAIL][20] +2 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-cml-u2/igt@[email protected]
- fi-cfl-8109u: NOTRUN -> [FAIL][21] +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-cfl-8109u/igt@[email protected]
- fi-skl-6600u: NOTRUN -> [FAIL][22] +2 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-skl-6600u/igt@[email protected]
- fi-skl-6700k2: NOTRUN -> [FAIL][23] +2 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-skl-6700k2/igt@[email protected]

* {igt@kms_color@pipe-c-invalid-plane-gamma-lut-sizes} (NEW):
- {fi-jsl-1}: NOTRUN -> [SKIP][24] +51 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-jsl-1/igt@[email protected]

* {igt@kms_color@pipe-d-plane-ctm-blue-to-red} (NEW):
- fi-rkl-11600: NOTRUN -> [SKIP][25] +51 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-rkl-11600/igt@[email protected]

New tests
---------

New tests have been introduced between CI_DRM_11053 and IGTPW_6543:

### New IGT tests (52) ###

* igt@kms_color@pipe-a-invalid-plane-ctm-matrix-sizes:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-a-invalid-plane-degamma-lut-sizes:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-a-invalid-plane-gamma-lut-sizes:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-a-plane-ctm-0-25:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-a-plane-ctm-0-50:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-a-plane-ctm-0-75:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-a-plane-ctm-blue-to-red:
- Statuses : 34 skip(s)
- Exec time: [0.0, 0.00] s

* igt@kms_color@pipe-a-plane-ctm-green-to-red:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-a-plane-ctm-max:
- Statuses : 34 skip(s)
- Exec time: [0.0, 0.00] s

* igt@kms_color@pipe-a-plane-ctm-negative:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-a-plane-ctm-red-to-blue:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-a-plane-degamma:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-a-plane-gamma:
- Statuses : 34 skip(s)
- Exec time: [0.0, 0.00] s

* igt@kms_color@pipe-b-invalid-plane-ctm-matrix-sizes:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-invalid-plane-degamma-lut-sizes:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-invalid-plane-gamma-lut-sizes:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-plane-ctm-0-25:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-plane-ctm-0-50:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-plane-ctm-0-75:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-plane-ctm-blue-to-red:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-plane-ctm-green-to-red:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-plane-ctm-max:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-plane-ctm-negative:
- Statuses : 34 skip(s)
- Exec time: [0.0, 0.00] s

* igt@kms_color@pipe-b-plane-ctm-red-to-blue:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-plane-degamma:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-b-plane-gamma:
- Statuses : 34 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-c-invalid-plane-ctm-matrix-sizes:
- Statuses : 33 skip(s)
- Exec time: [0.0, 0.00] s

* igt@kms_color@pipe-c-invalid-plane-degamma-lut-sizes:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-c-invalid-plane-gamma-lut-sizes:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-c-plane-ctm-0-25:
- Statuses : 33 skip(s)
- Exec time: [0.0, 0.00] s

* igt@kms_color@pipe-c-plane-ctm-0-50:
- Statuses : 33 skip(s)
- Exec time: [0.0, 0.01] s

* igt@kms_color@pipe-c-plane-ctm-0-75:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-c-plane-ctm-blue-to-red:
- Statuses : 33 skip(s)
- Exec time: [0.0, 0.00] s

* igt@kms_color@pipe-c-plane-ctm-green-to-red:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-c-plane-ctm-max:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-c-plane-ctm-negative:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-c-plane-ctm-red-to-blue:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-c-plane-degamma:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-c-plane-gamma:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-invalid-plane-ctm-matrix-sizes:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-invalid-plane-degamma-lut-sizes:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-invalid-plane-gamma-lut-sizes:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-plane-ctm-0-25:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-plane-ctm-0-50:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-plane-ctm-0-75:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-plane-ctm-blue-to-red:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-plane-ctm-green-to-red:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-plane-ctm-max:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-plane-ctm-negative:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-plane-ctm-red-to-blue:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-plane-degamma:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

* igt@kms_color@pipe-d-plane-gamma:
- Statuses : 33 skip(s)
- Exec time: [0.0] s

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@mman:
- fi-snb-2520m: [PASS][26] -> [DMESG-FAIL][27] ([i915#4610])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11053/fi-snb-2520m/igt@i915_selftest@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-snb-2520m/igt@i915_selftest@[email protected]

* igt@kms_chamelium@vga-edid-read:
- fi-bdw-5557u: NOTRUN -> [SKIP][28] ([fdo#109271] / [fdo#111827]) +8 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bdw-5557u/igt@[email protected]

* igt@kms_color@pipe-a-ctm-max:
- fi-kbl-7567u: NOTRUN -> [SKIP][29] ([fdo#109271]) +102 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-kbl-7567u/igt@[email protected]
- fi-kbl-guc: NOTRUN -> [SKIP][30] ([fdo#109271]) +49 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-kbl-guc/igt@[email protected]

* {igt@kms_color@pipe-a-plane-ctm-blue-to-red} (NEW):
- fi-kbl-7500u: NOTRUN -> [SKIP][31] ([fdo#109271]) +66 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-kbl-7500u/igt@[email protected]

* {igt@kms_color@pipe-a-plane-ctm-green-to-red} (NEW):
- fi-bsw-nick: NOTRUN -> [SKIP][32] ([fdo#109271]) +102 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bsw-nick/igt@[email protected]

* {igt@kms_color@pipe-a-plane-ctm-negative} (NEW):
- fi-blb-e6850: NOTRUN -> [SKIP][33] ([fdo#109271]) +103 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-blb-e6850/igt@[email protected]

* {igt@kms_color@pipe-a-plane-ctm-red-to-blue} (NEW):
- fi-bwr-2160: NOTRUN -> [SKIP][34] ([fdo#109271]) +103 similar issues
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bwr-2160/igt@[email protected]
- {fi-ehl-2}: NOTRUN -> [SKIP][35] ([fdo#109278]) +51 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-ehl-2/igt@[email protected]

* {igt@kms_color@pipe-a-plane-degamma} (NEW):
- fi-skl-6700k2: NOTRUN -> [SKIP][36] ([fdo#109271]) +66 similar issues
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-skl-6700k2/igt@[email protected]
- fi-bsw-n3050: NOTRUN -> [SKIP][37] ([fdo#109271]) +91 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bsw-n3050/igt@[email protected]

* igt@kms_color@pipe-b-ctm-0-75:
- fi-bsw-kefka: NOTRUN -> [DMESG-WARN][38] ([i915#89]) +1 similar issue
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bsw-kefka/igt@[email protected]

* igt@kms_color@pipe-b-ctm-negative:
- fi-ilk-650: NOTRUN -> [SKIP][39] ([fdo#109271]) +103 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-ilk-650/igt@[email protected]

* igt@kms_color@pipe-b-degamma:
- fi-bsw-kefka: NOTRUN -> [FAIL][40] ([i915#71]) +1 similar issue
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bsw-kefka/igt@[email protected]

* igt@kms_color@pipe-b-gamma:
- fi-tgl-1115g4: NOTRUN -> [FAIL][41] ([i915#1149]) +3 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-tgl-1115g4/igt@[email protected]
- fi-rkl-guc: NOTRUN -> [FAIL][42] ([i915#1149]) +2 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-rkl-guc/igt@[email protected]

* {igt@kms_color@pipe-b-invalid-plane-degamma-lut-sizes} (NEW):
- fi-bdw-5557u: NOTRUN -> [SKIP][43] ([fdo#109271]) +98 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bdw-5557u/igt@[email protected]
- fi-skl-guc: NOTRUN -> [SKIP][44] ([fdo#109271]) +66 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-skl-guc/igt@[email protected]

* igt@kms_color@pipe-c-degamma:
- fi-snb-2600: NOTRUN -> [SKIP][45] ([fdo#109271]) +103 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-snb-2600/igt@[email protected]

* igt@kms_color@pipe-c-gamma:
- fi-rkl-11600: NOTRUN -> [FAIL][46] ([i915#1149]) +2 similar issues
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-rkl-11600/igt@[email protected]
- fi-bsw-n3050: NOTRUN -> [FAIL][47] ([i915#71]) +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bsw-n3050/igt@[email protected]

* {igt@kms_color@pipe-c-invalid-plane-ctm-matrix-sizes} (NEW):
- fi-snb-2520m: NOTRUN -> [SKIP][48] ([fdo#109271]) +103 similar issues
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-snb-2520m/igt@[email protected]

* {igt@kms_color@pipe-c-invalid-plane-degamma-lut-sizes} (NEW):
- fi-hsw-4770: NOTRUN -> [SKIP][49] ([fdo#109271]) +51 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-hsw-4770/igt@[email protected]
- fi-bxt-dsi: NOTRUN -> [SKIP][50] ([fdo#109271]) +66 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bxt-dsi/igt@[email protected]

* {igt@kms_color@pipe-c-plane-ctm-negative} (NEW):
- fi-cfl-8109u: NOTRUN -> [SKIP][51] ([fdo#109271]) +66 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-cfl-8109u/igt@[email protected]

* {igt@kms_color@pipe-c-plane-ctm-red-to-blue} (NEW):
- fi-cml-u2: NOTRUN -> [SKIP][52] ([fdo#109278]) +66 similar issues
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-cml-u2/igt@[email protected]

* igt@kms_color@pipe-d-ctm-0-25:
- fi-rkl-11600: NOTRUN -> [SKIP][53] ([i915#1149] / [i915#533]) +9 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-rkl-11600/igt@[email protected]

* igt@kms_color@pipe-d-ctm-0-75:
- fi-cfl-8700k: NOTRUN -> [SKIP][54] ([fdo#109271]) +66 similar issues
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-cfl-8700k/igt@[email protected]

* igt@kms_color@pipe-d-ctm-max:
- fi-kbl-8809g: NOTRUN -> [SKIP][55] ([fdo#109271]) +102 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-kbl-8809g/igt@[email protected]

* igt@kms_color@pipe-d-ctm-negative:
- fi-rkl-guc: NOTRUN -> [SKIP][56] ([i915#1149] / [i915#533]) +9 similar issues
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-rkl-guc/igt@[email protected]

* igt@kms_color@pipe-d-ctm-red-to-blue:
- fi-pnv-d510: NOTRUN -> [SKIP][57] ([fdo#109271]) +161 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-pnv-d510/igt@[email protected]

* igt@kms_color@pipe-d-gamma:
- fi-glk-dsi: NOTRUN -> [SKIP][58] ([fdo#109271]) +66 similar issues
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-glk-dsi/igt@[email protected]
- fi-ivb-3770: NOTRUN -> [SKIP][59] ([fdo#109271]) +66 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-ivb-3770/igt@[email protected]

* igt@kms_color@pipe-d-invalid-ctm-matrix-sizes:
- fi-glk-j4005: NOTRUN -> [SKIP][60] ([fdo#109271]) +66 similar issues
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-glk-j4005/igt@[email protected]

* igt@kms_color@pipe-d-invalid-degamma-lut-sizes:
- fi-hsw-4770: NOTRUN -> [SKIP][61] ([fdo#109271] / [i915#533]) +14 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-hsw-4770/igt@[email protected]

* igt@kms_color@pipe-d-invalid-gamma-lut-sizes:
- fi-rkl-guc: NOTRUN -> [SKIP][62] ([i915#533]) +4 similar issues
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-rkl-guc/igt@[email protected]
- fi-rkl-11600: NOTRUN -> [SKIP][63] ([i915#533]) +4 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-rkl-11600/igt@[email protected]

* igt@kms_color@pipe-d-legacy-gamma:
- fi-kbl-x1275: NOTRUN -> [SKIP][64] ([fdo#109271]) +66 similar issues
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-kbl-x1275/igt@[email protected]
- fi-skl-6600u: NOTRUN -> [SKIP][65] ([fdo#109271]) +66 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-skl-6600u/igt@[email protected]

* {igt@kms_color@pipe-d-plane-ctm-0-75} (NEW):
- fi-elk-e7500: NOTRUN -> [SKIP][66] ([fdo#109271]) +103 similar issues
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-elk-e7500/igt@[email protected]

* {igt@kms_color@pipe-d-plane-ctm-green-to-red} (NEW):
- fi-bsw-kefka: NOTRUN -> [SKIP][67] ([fdo#109271]) +80 similar issues
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bsw-kefka/igt@[email protected]

* {igt@kms_color@pipe-d-plane-gamma} (NEW):
- fi-cfl-guc: NOTRUN -> [SKIP][68] ([fdo#109271]) +66 similar issues
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-cfl-guc/igt@[email protected]

* igt@kms_psr@primary_page_flip:
- fi-skl-6600u: [PASS][69] -> [INCOMPLETE][70] ([i915#4547] / [i915#4838])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11053/fi-skl-6600u/igt@kms_psr@primary_page_flip.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-skl-6600u/igt@kms_psr@primary_page_flip.html

* igt@runner@aborted:
- fi-snb-2520m: NOTRUN -> [FAIL][71] ([i915#2426] / [i915#4312])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-snb-2520m/igt@[email protected]
- fi-skl-6600u: NOTRUN -> [FAIL][72] ([i915#2722] / [i915#4312])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-skl-6600u/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@gt_heartbeat:
- fi-bxt-dsi: [DMESG-FAIL][73] ([i915#541]) -> [PASS][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11053/fi-bxt-dsi/igt@i915_selftest@live@gt_heartbeat.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-bxt-dsi/igt@i915_selftest@live@gt_heartbeat.html

* igt@kms_frontbuffer_tracking@basic:
- fi-cml-u2: [DMESG-WARN][75] ([i915#4269]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11053/fi-cml-u2/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/fi-cml-u2/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1149]: https://gitlab.freedesktop.org/drm/intel/issues/1149
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
[i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
[i915#4610]: https://gitlab.freedesktop.org/drm/intel/issues/4610
[i915#4838]: https://gitlab.freedesktop.org/drm/intel/issues/4838
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541
[i915#71]: https://gitlab.freedesktop.org/drm/intel/issues/71
[i915#89]: https://gitlab.freedesktop.org/drm/intel/issues/89

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

* CI: CI-20190529 -> None
* IGT: IGT_6325 -> IGTPW_6543

CI-20190529: 20190529
CI_DRM_11053: f0ad19ec6238528d9ea1ee54c9dcde4e0119f1e5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_6543: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6543/index.html
IGT_6325: ac29e097d4ff0f2e269a955ca86c5eb23908467a @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Testlist changes ==

+++ 138 lines
--- 0 lines

== Logs ==

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

#17 lore raw
In reply to Bhanuprakash Modem

Hi Pekka/Harry,

Did you get a chance to review the latest patches of Plane color management?

- Bhanu

Quoted 45 lines · Bhanuprakash Modem

From the Plane Color Management feature design, userspace can
take the smart blending decisions based on hardware supported plane color features to obtain an accurate color profile.

These IGT patches extend the existing pipe color management tests to the plane level.

Kernel implementation:
https://patchwork.freedesktop.org/series/90825/

Bhanuprakash Modem (12):
HAX: Get uapi headers to compile the IGT
lib/igt_kms: Add plane color mgmt properties
kms_color_helper: Add helper functions for plane color mgmt tests/kms_color: New subtests for Plane gamma tests/kms_color: New subtests for Plane degamma tests/kms_color: New subtests for Plane CTM tests/kms_color: New negative tests for plane level color mgmt tests/kms_color_chamelium: New subtests for Plane gamma tests/kms_color_chamelium: New subtests for Plane degamma tests/kms_color_chamelium: New subtests for Plane CTM tests/kms_color_chamelium: Extended IGT tests to support logarithmic
gamma mode
HAX: Add color mgmt tests to BAT

Mukunda Pramodh Kumar (3):
lib/igt_kms: Add pipe color mgmt properties
kms_color_helper: Add helper functions to support logarithmic gamma
mode
tests/kms_color: Extended IGT tests to support logarithmic gamma mode

  include/drm-uapi/drm.h                |  10 +
  include/drm-uapi/drm_mode.h           |  28 ++
  lib/igt_kms.c                         |   6 +
  lib/igt_kms.h                         |   6 +
  tests/intel-ci/fast-feedback.testlist | 112 +++++
  tests/kms_color.c                     | 672 +++++++++++++++++++++++++-
  tests/kms_color_chamelium.c           | 597 ++++++++++++++++++++++-
  tests/kms_color_helper.c              | 303 +++++++++++-
  tests/kms_color_helper.h              |  44 ++
  9 files changed, 1761 insertions(+), 17 deletions(-)

--
2.32.0

#18 lore raw
Quoted 3 lines · Bhanuprakash

Hi Pekka/Harry,

Did you get a chance to review the latest patches of Plane color management?

Hi,

no, I didn't, sorry.

I'm also not following dri-devel@ or igt-dev@ unless explicitly Cc'd.

Thanks,
pq

Quoted 47 lines · Bhanuprakash Modem
Quoted 45 lines

From the Plane Color Management feature design, userspace can
take the smart blending decisions based on hardware supported plane color features to obtain an accurate color profile.

These IGT patches extend the existing pipe color management tests to the plane level.

Kernel implementation:
https://patchwork.freedesktop.org/series/90825/

Bhanuprakash Modem (12):
HAX: Get uapi headers to compile the IGT
lib/igt_kms: Add plane color mgmt properties
kms_color_helper: Add helper functions for plane color mgmt tests/kms_color: New subtests for Plane gamma tests/kms_color: New subtests for Plane degamma tests/kms_color: New subtests for Plane CTM tests/kms_color: New negative tests for plane level color mgmt tests/kms_color_chamelium: New subtests for Plane gamma tests/kms_color_chamelium: New subtests for Plane degamma tests/kms_color_chamelium: New subtests for Plane CTM tests/kms_color_chamelium: Extended IGT tests to support logarithmic
gamma mode
HAX: Add color mgmt tests to BAT

Mukunda Pramodh Kumar (3):
lib/igt_kms: Add pipe color mgmt properties
kms_color_helper: Add helper functions to support logarithmic gamma
mode
tests/kms_color: Extended IGT tests to support logarithmic gamma mode

  include/drm-uapi/drm.h                |  10 +
  include/drm-uapi/drm_mode.h           |  28 ++
  lib/igt_kms.c                         |   6 +
  lib/igt_kms.h                         |   6 +
  tests/intel-ci/fast-feedback.testlist | 112 +++++
  tests/kms_color.c                     | 672 +++++++++++++++++++++++++-
  tests/kms_color_chamelium.c           | 597 ++++++++++++++++++++++-
  tests/kms_color_helper.c              | 303 +++++++++++-
  tests/kms_color_helper.h              |  44 ++
  9 files changed, 1761 insertions(+), 17 deletions(-)

--
2.32.0

#19 lore raw
Quoted 10 lines · Pekka Paalanen
Quoted 3 lines · Bhanuprakash

Hi Pekka/Harry,

Did you get a chance to review the latest patches of Plane color management?

Hi,

no, I didn't, sorry.

I just rebased and floated this series again to re-trigger the discussions. If you get some time, please review this latest rev of IGT patches.

- Bhanu

Quoted 55 lines

I'm also not following dri-devel@ or igt-dev@ unless explicitly Cc'd.

Thanks,
pq

Quoted 47 lines · Bhanuprakash Modem
Quoted 45 lines

From the Plane Color Management feature design, userspace can
take the smart blending decisions based on hardware supported plane color features to obtain an accurate color profile.

These IGT patches extend the existing pipe color management tests to the plane level.

Kernel implementation:
https://patchwork.freedesktop.org/series/90825/

Bhanuprakash Modem (12):
HAX: Get uapi headers to compile the IGT
lib/igt_kms: Add plane color mgmt properties
kms_color_helper: Add helper functions for plane color mgmt tests/kms_color: New subtests for Plane gamma tests/kms_color: New subtests for Plane degamma tests/kms_color: New subtests for Plane CTM tests/kms_color: New negative tests for plane level color mgmt tests/kms_color_chamelium: New subtests for Plane gamma tests/kms_color_chamelium: New subtests for Plane degamma tests/kms_color_chamelium: New subtests for Plane CTM tests/kms_color_chamelium: Extended IGT tests to support logarithmic
gamma mode
HAX: Add color mgmt tests to BAT

Mukunda Pramodh Kumar (3):
lib/igt_kms: Add pipe color mgmt properties
kms_color_helper: Add helper functions to support logarithmic gamma
mode
tests/kms_color: Extended IGT tests to support logarithmic gamma mode

   include/drm-uapi/drm.h                |  10 +
   include/drm-uapi/drm_mode.h           |  28 ++
   lib/igt_kms.c                         |   6 +
   lib/igt_kms.h                         |   6 +
   tests/intel-ci/fast-feedback.testlist | 112 +++++
   tests/kms_color.c                     | 672 +++++++++++++++++++++++++-
   tests/kms_color_chamelium.c           | 597 ++++++++++++++++++++++-
   tests/kms_color_helper.c              | 303 +++++++++++-
   tests/kms_color_helper.h              |  44 ++
   9 files changed, 1761 insertions(+), 17 deletions(-)

--
2.32.0

#20 lore raw

[igt-dev] ✗ Fi.CI.BUILD: failure for Add IGT support for plane color management (rev4)

In reply to Bhanuprakash Modem
== Series Details ==

== Series Details ==

Series: Add IGT support for plane color management (rev4)
URL : https://patchwork.freedesktop.org/series/96895/
State : failure

== Summary ==

Applying: HAX: Get uapi headers to compile the IGT
Applying: lib/igt_kms: Add plane color mgmt properties
Applying: kms_color_helper: Add helper functions for plane color mgmt Using index info to reconstruct a base tree...
M tests/kms_color_helper.c
M tests/kms_color_helper.h
Falling back to patching base and 3-way merge...
Auto-merging tests/kms_color_helper.h
CONFLICT (content): Merge conflict in tests/kms_color_helper.h Auto-merging tests/kms_color_helper.c
Patch failed at 0003 kms_color_helper: Add helper functions for plane color mgmt When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".