Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/9] Enable more tests for VKMS
@ 2024-03-06 17:28 Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 1/9] tests/kms_rotation_crc: Remove intel guards Louis Chauvet
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-06 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: miquel.raynal, jeremie.dautheribes, thomas.petazzoni,
	Louis Chauvet

This series was built while writing the vkms series [1]. All those 
modification were used to test VKMS more extensively.

This series:
- removes few intel guards on some tests;
- add support for DRM_FORMAT_NV24/NV42/R1
- increase the coverage of kms_plane for colored formats
- increase the coverage of kms_plane for black and white formats

[1]: https://lore.kernel.org/dri-devel/20240304-yuv-v4-0-76beac8e9793@bootlin.com

To: igt-dev@lists.freedesktop.org
Cc: miquel.raynal@bootlin.com
Cc: jeremie.dautheribes@bootlin.com
Cc: thomas.petazzoni@bootlin.com

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
This is my first (technically second) submission here, please let me know 
if I've done anything wrong. I've tried to follow the same rules as in 
the kernel.

---
Louis Chauvet (9):
      tests/kms_rotation_crc: Remove intel guards
      tests/kms_plane: Fix some formatting and alignment
      tests/kms_plane: Rename test_planar_settings to test_odd_size_with_yuv  and remove intel guards
      lib/color_encoding: Add support for NV24 and NV42 pixel formats
      tests/kms_plane: Use a complex pattern to test plane color conversion.
      tests/kms_plane: Use the square pattern even when using multiple planes
      lib/igt_fb: Add DRM_FORMAT_R1 support
      tests/kms_plane: Allow choosing the number of colors when drawing the color array
      tests/kms_plane: Add black and white test

 lib/igt_color_encoding.c |   2 +
 lib/igt_fb.c             | 127 ++++++++++++++++
 lib/igt_fb.h             |   1 +
 tests/kms_plane.c        | 376 +++++++++++++++++++++++++++++++++++------------
 tests/kms_rotation_crc.c |  23 +--
 5 files changed, 427 insertions(+), 102 deletions(-)
---
base-commit: 2fd91b8c3cf9aa2b0bb78537a6b5e2bc3de50e0e
change-id: 20240306-b4-kms_tests-007f3b567bc5

Best regards,
-- 
Louis Chauvet <louis.chauvet@bootlin.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH i-g-t 1/9] tests/kms_rotation_crc: Remove intel guards
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
@ 2024-03-06 17:28 ` Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 2/9] tests/kms_plane: Fix some formatting and alignment Louis Chauvet
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-06 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: miquel.raynal, jeremie.dautheribes, thomas.petazzoni,
	Louis Chauvet

A lot of rotation tests were behind intel guards, so remove them to make
them working with VKMS.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 tests/kms_rotation_crc.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 8d8c53b5ff84..1ab2dc68663b 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -634,7 +634,8 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
 		plane = igt_output_get_plane_type(output, plane_type);
 		igt_require(igt_plane_has_prop(plane, IGT_PLANE_ROTATION));
 		igt_require(igt_plane_has_rotation(plane, data->rotation));
-		/* CHV can't rotate and reflect simultaneously */
+		/* When using CHERRYVIEW intel device, simultaneous rotation and reflection are not supported at the
+		 * same time, so skip this test */
 		igt_require(!is_intel_device(data->gfx_fd) ||
 			    !IS_CHERRYVIEW(data->devid) ||
 			    data->rotation != (IGT_ROTATION_180 | IGT_REFLECT_X));
@@ -1250,12 +1251,13 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 	data.pos_x = 0,
 	data.pos_y = 0;
 
-	igt_describe("Checking unsupported pixel format for gen9+ with 90 degree of rotation");
+	igt_describe("Checking unsupported pixel format for Intel gen9+ with 90 degree of rotation");
 	igt_subtest_f("bad-pixel-format") {
 		 /* gen11 enables RGB565 rotation for 90/270 degrees.
 		  * so apart from this, any other gen11+ pixel format
 		  * can be used which doesn't support 90/270 degree
 		  * rotation */
+		igt_require(is_intel_device(data.gfx_fd));
 		data.rotation = IGT_ROTATION_90;
 		data.override_fmt = gen < 11 ? DRM_FORMAT_RGB565 : DRM_FORMAT_Y212;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, true);
@@ -1270,11 +1272,8 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 	}
 	data.override_modifier = 0;
 
-	igt_describe("Tiling and Rotation test for gen 10+ for primary plane");
+	igt_describe("Tiling and Rotation test for primary plane");
 	for (reflect_x = reflect_x_subtests; reflect_x->modifier; reflect_x++) {
-		igt_fixture
-			igt_require_intel(data.gfx_fd);
-
 		igt_subtest_f("primary-%s-tiled-reflect-x-%s",
 			      igt_fb_modifier_name(reflect_x->modifier),
 			      igt_plane_rotation_name(reflect_x->rot)) {
@@ -1286,7 +1285,9 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 
 	igt_describe("Rotation test on both planes by making them fully visible");
 	igt_subtest_f("multiplane-rotation") {
-		igt_require(gen >= 9);
+		/* This feature is only supported for Intel device >= 9 */
+		if (is_intel_device(data.gfx_fd))
+			igt_require(gen > 9);
 		cleanup_crtc(&data);
 		data.planepos[0].origo = p_top | p_left;
 		data.planepos[0].x = .2f;
@@ -1300,7 +1301,9 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 	igt_describe("Rotation test on both planes by cropping left/top corner of primary plane and"
 			"right/top corner of sprite plane");
 	igt_subtest_f("multiplane-rotation-cropping-top") {
-		igt_require(gen >= 9);
+/* This feature is only supported for Intel device >= 9 */
+		if (is_intel_device(data.gfx_fd))
+			igt_require(gen > 9);
 		cleanup_crtc(&data);
 		data.planepos[0].origo = p_top | p_left;
 		data.planepos[0].x = -.05f;
@@ -1314,7 +1317,9 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 	igt_describe("Rotation test on both planes by cropping left/bottom corner of primary plane"
 			"and right/bottom corner of sprite plane");
 	igt_subtest_f("multiplane-rotation-cropping-bottom") {
-		igt_require(gen >= 9);
+/* This feature is only supported for Intel device >= 9 */
+		if (is_intel_device(data.gfx_fd))
+			igt_require(gen > 9);
 		cleanup_crtc(&data);
 		data.planepos[0].origo = p_bottom | p_left;
 		data.planepos[0].x = -.05f;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH i-g-t 2/9] tests/kms_plane: Fix some formatting and alignment
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 1/9] tests/kms_rotation_crc: Remove intel guards Louis Chauvet
@ 2024-03-06 17:28 ` Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 3/9] tests/kms_plane: Rename test_planar_settings to test_odd_size_with_yuv and remove intel guards Louis Chauvet
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-06 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: miquel.raynal, jeremie.dautheribes, thomas.petazzoni,
	Louis Chauvet

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 tests/kms_plane.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 406aecc04297..dd830e68a177 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -286,7 +286,7 @@ test_plane_position_with_output(data_t *data,
 
 	if (primary->drm_plane->plane_id > sprite->drm_plane->plane_id) {
 		igt_info("primary plane ID (%d) > sprite plane ID (%d), skipping plane %d\n",
-				primary->drm_plane->plane_id, sprite->drm_plane->plane_id, plane);
+			 primary->drm_plane->plane_id, sprite->drm_plane->plane_id, plane);
 		return;
 	}
 
@@ -373,7 +373,7 @@ test_plane_position(data_t *data, enum pipe pipe)
  */
 static void
 create_fb_for_mode_panning(data_t *data, drmModeModeInfo *mode,
-			    struct igt_fb *fb /* out */)
+			   struct igt_fb *fb /* out */)
 {
 	unsigned int fb_id;
 	cairo_t *cr;
@@ -463,7 +463,6 @@ test_plane_panning(data_t *data, enum pipe pipe)
 		for_each_memory_region(r, data->drm_fd)
 			if (r->ci.memory_class == I915_MEMORY_CLASS_DEVICE)
 				mem_size = r->cpu_size;
-
 	}
 
 	if (is_xe_device(data->drm_fd)) {
@@ -705,7 +704,7 @@ static void capture_format_crcs_single(data_t *data, enum pipe pipe,
 			     width, height, encoding, range, &black, fb, true);
 
 	igt_display_commit2(&data->display, data->display.is_atomic ?
-			    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
+					    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 
 	igt_remove_fb(data->drm_fd, &old_fb);
 
@@ -796,7 +795,7 @@ restart_round:
 				igt_display_t *display = &data->display;
 
 				igt_wait_for_vblank(data->drm_fd,
-						display->pipes[pipe].crtc_offset);
+						    display->pipes[pipe].crtc_offset);
 			}
 		}
 
@@ -1009,7 +1008,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
 	igt_crc_t ref_crc[MAX_CRC_SET][ARRAY_SIZE(colors_extended)];
 	struct igt_vec tested_formats;
 	struct format_mod ref = {};
-	igt_crc_t* crcset;
+	igt_crc_t *crcset;
 	bool result = true;
 
 	/*
@@ -1352,7 +1351,7 @@ run_tests_for_pipe_plane(data_t *data)
 	}
 
 	igt_describe("verify plane position using two planes to create a partially covered screen and"
-		       "check for DPMS");
+		     "check for DPMS");
 	igt_subtest_with_dynamic_f("plane-position-hole-dpms") {
 		data->flags = TEST_POSITION_PARTIALLY_COVERED | TEST_DPMS;
 		run_test(data, test_plane_position);
@@ -1371,7 +1370,7 @@ run_tests_for_pipe_plane(data_t *data)
 	}
 
 	igt_describe("verify plane panning at bottom-right position using primary plane and executes system"
-		       "suspend cycles");
+		     "suspend cycles");
 	igt_subtest_with_dynamic_f("plane-panning-bottom-right-suspend") {
 		data->flags = TEST_PANNING_BOTTOM_RIGHT | TEST_SUSPEND_RESUME;
 		run_test(data, test_plane_panning);

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH i-g-t 3/9] tests/kms_plane: Rename test_planar_settings to test_odd_size_with_yuv and remove intel guards
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 1/9] tests/kms_rotation_crc: Remove intel guards Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 2/9] tests/kms_plane: Fix some formatting and alignment Louis Chauvet
@ 2024-03-06 17:28 ` Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 4/9] lib/color_encoding: Add support for NV24 and NV42 pixel formats Louis Chauvet
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-06 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: miquel.raynal, jeremie.dautheribes, thomas.petazzoni,
	Louis Chauvet

The test_planar_settings name and description is not very descriptive for
the content of the test. Change it to "test_odd_size_with_yuv".

Also remove the intel guard on this test, so it can be run for other
platforms like VKMS.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 tests/kms_plane.c | 91 ++++++++++++++++++++++++++-----------------------------
 1 file changed, 43 insertions(+), 48 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index dd830e68a177..9757c6e44325 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -42,8 +42,8 @@
 #include "xe/xe_query.h"
 
 /**
- * SUBTEST: planar-pixel-format-settings
- * Description: verify planar settings for pixel format are handled correctly
+ * SUBTEST: test-odd-size-with-yuv
+ * Description: verify that yuv odd size are handled correctly by the driver
  * Functionality: pixel_formats, plane
  *
  * SUBTEST: plane-position-%s
@@ -1225,8 +1225,7 @@ test_pixel_formats(data_t *data, enum pipe pipe)
 
 	igt_assert_f(result, "At least one CRC mismatch happened\n");
 }
-
-static void test_planar_settings(data_t *data)
+static void test_odd_size_with_yuv(data_t *data)
 {
 	enum pipe pipe = PIPE_A;
 	igt_output_t *output;
@@ -1235,14 +1234,18 @@ static void test_planar_settings(data_t *data)
 	int devid;
 	int rval;
 
-	/*
-	 * If here is added non-intel tests below require will need to be
-	 * changed to if(..)
-	 */
+	bool should_fail = false;
 	igt_require(data->display.is_atomic);
-	igt_require_intel(data->drm_fd);
-	devid = intel_get_drm_devid(data->drm_fd);
-	igt_require(intel_display_ver(devid) >= 9);
+
+	/* Add more devices here if they are expected to fail */
+	if (is_intel_device(data->drm_fd)) {
+		/* This was required in the original test */
+		igt_require(intel_display_ver(devid) >= 9);
+		/* Intel display version below 20 are expected to fail */
+		if (intel_display_ver(devid) < 20) {
+			should_fail = true;
+		}
+	}
 
 	output = igt_get_single_output_for_pipe(&data->display, pipe);
 	igt_require(output);
@@ -1254,44 +1257,37 @@ static void test_planar_settings(data_t *data)
 				  DRM_MODE_ATOMIC_ALLOW_MODESET,
 				  NULL);
 
-	/* test against intel_plane_check_src_coordinates() in i915 */
-	if (igt_plane_has_format_mod(primary, DRM_FORMAT_NV12,
-				     DRM_FORMAT_MOD_LINEAR)) {
-		int expected_rval = -EINVAL;
-
-		if (intel_display_ver(devid) >= 20)
-			expected_rval = 0;
-
-		igt_create_fb(data->drm_fd, 257, 256,
-			      DRM_FORMAT_NV12, DRM_FORMAT_MOD_LINEAR, &fb);
-		igt_plane_set_fb(primary, &fb);
-		rval = igt_display_try_commit_atomic(&data->display,
-						     DRM_MODE_ATOMIC_ALLOW_MODESET,
-						     NULL);
-		igt_remove_fb(data->drm_fd, &fb);
-		igt_assert_f(rval == expected_rval, "Odd width NV12 framebuffer\n");
+	igt_require(igt_plane_has_format_mod(primary, DRM_FORMAT_NV12,
+					     DRM_FORMAT_MOD_LINEAR));
+
+
+	igt_create_fb(data->drm_fd, 257, 256,
+		      DRM_FORMAT_NV12, DRM_FORMAT_MOD_LINEAR, &fb);
+	igt_plane_set_fb(primary, &fb);
+	rval = igt_display_try_commit_atomic(&data->display,
+					     DRM_MODE_ATOMIC_ALLOW_MODESET,
+					     NULL);
+	igt_remove_fb(data->drm_fd, &fb);
+
+	if (should_fail) {
+		igt_assert_f(rval == -EINVAL, "Odd width NV12 framebuffer correctly failed\n");
 	} else {
-		igt_debug("Odd width NV12 framebuffer test skipped\n");
+		igt_assert_f(rval == 0, "Odd width NV12 framebuffer correctly succeed\n");
 	}
 
-	/* test against intel_plane_check_src_coordinates() in i915 */
-	if (igt_plane_has_format_mod(primary, DRM_FORMAT_NV12,
-				     DRM_FORMAT_MOD_LINEAR)) {
-		int expected_rval = -EINVAL;
-
-		if (intel_display_ver(devid) >= 20)
-			expected_rval = 0;
-
-		igt_create_fb(data->drm_fd, 256, 257,
-			      DRM_FORMAT_NV12, DRM_FORMAT_MOD_LINEAR, &fb);
-		igt_plane_set_fb(primary, &fb);
-		rval = igt_display_try_commit_atomic(&data->display,
-						     DRM_MODE_ATOMIC_ALLOW_MODESET,
-						     NULL);
-		igt_remove_fb(data->drm_fd, &fb);
-		igt_assert_f(rval == expected_rval, "Odd height NV12 framebuffer\n");
+
+	igt_create_fb(data->drm_fd, 256, 257,
+		      DRM_FORMAT_NV12, DRM_FORMAT_MOD_LINEAR, &fb);
+	igt_plane_set_fb(primary, &fb);
+	rval = igt_display_try_commit_atomic(&data->display,
+					     DRM_MODE_ATOMIC_ALLOW_MODESET,
+					     NULL);
+	igt_remove_fb(data->drm_fd, &fb);
+
+	if (should_fail) {
+		igt_assert_f(rval == -EINVAL, "Odd height NV12 framebuffer correctly failed\n");
 	} else {
-		igt_debug("Odd height NV12 framebuffer test skipped\n");
+		igt_assert_f(rval == 0, "Odd height NV12 framebuffer correctly succeed\n");
 	}
 }
 
@@ -1376,9 +1372,8 @@ run_tests_for_pipe_plane(data_t *data)
 		run_test(data, test_plane_panning);
 	}
 
-	igt_describe("verify planar settings for pixel format are accepted or rejected correctly");
-	igt_subtest_f("planar-pixel-format-settings")
-		test_planar_settings(data);
+	igt_describe("verify that odd sizes for yuv format are accepted or rejected correctly");
+	igt_subtest_f("test-odd-size-with-yuv") test_odd_size_with_yuv(data);
 }
 
 static int opt_handler(int opt, int opt_index, void *_data)

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH i-g-t 4/9] lib/color_encoding: Add support for NV24 and NV42 pixel formats
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
                   ` (2 preceding siblings ...)
  2024-03-06 17:28 ` [PATCH i-g-t 3/9] tests/kms_plane: Rename test_planar_settings to test_odd_size_with_yuv and remove intel guards Louis Chauvet
@ 2024-03-06 17:28 ` Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 5/9] tests/kms_plane: Use a complex pattern to test plane color conversion Louis Chauvet
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-06 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: miquel.raynal, jeremie.dautheribes, thomas.petazzoni,
	Louis Chauvet

The current conversion algorithm is able to convert NV24 and NV42
formats. Add those format in the list so they can also be tested.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 lib/igt_color_encoding.c |  2 ++
 lib/igt_fb.c             | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/lib/igt_color_encoding.c b/lib/igt_color_encoding.c
index a7bd2b22f73b..43105de34889 100644
--- a/lib/igt_color_encoding.c
+++ b/lib/igt_color_encoding.c
@@ -138,8 +138,10 @@ static const struct color_encoding_format {
 	{ IGT_FORMAT_FLOAT, 1.f, },
 	{ DRM_FORMAT_NV12, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f },
 	{ DRM_FORMAT_NV16, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f },
+	{ DRM_FORMAT_NV24, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f },
 	{ DRM_FORMAT_NV21, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f },
 	{ DRM_FORMAT_NV61, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f },
+	{ DRM_FORMAT_NV42, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f },
 	{ DRM_FORMAT_YUV420, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f },
 	{ DRM_FORMAT_YUV422, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f },
 	{ DRM_FORMAT_YVU420, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f },
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 0ac2a76b0c52..b6f28cf3ee52 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -252,6 +252,11 @@ static const struct format_desc_struct {
 	  .num_planes = 2, .plane_bpp = { 8, 16, },
 	  .hsub = 2, .vsub = 1,
 	},
+	{ .name = "NV24", .depth = -1, .drm_id = DRM_FORMAT_NV24,
+		.cairo_id = CAIRO_FORMAT_RGB24, .convert = true,
+		.num_planes = 2, .plane_bpp = { 8, 16, },
+		.hsub = 1, .vsub = 1,
+	},
 	{ .name = "NV21", .depth = -1, .drm_id = DRM_FORMAT_NV21,
 	  .cairo_id = CAIRO_FORMAT_RGB24, .convert = true,
 	  .num_planes = 2, .plane_bpp = { 8, 16, },
@@ -262,6 +267,11 @@ static const struct format_desc_struct {
 	  .num_planes = 2, .plane_bpp = { 8, 16, },
 	  .hsub = 2, .vsub = 1,
 	},
+	{ .name = "NV42", .depth = -1, .drm_id = DRM_FORMAT_NV24,
+		.cairo_id = CAIRO_FORMAT_RGB24, .convert = true,
+		.num_planes = 2, .plane_bpp = { 8, 16, },
+		.hsub = 1, .vsub = 1,
+	},
 	{ .name = "YUYV", .depth = -1, .drm_id = DRM_FORMAT_YUYV,
 	  .cairo_id = CAIRO_FORMAT_RGB24, .convert = true,
 	  .num_planes = 1, .plane_bpp = { 16, },
@@ -3398,8 +3408,10 @@ static void get_yuv_parameters(struct igt_fb *fb, struct yuv_parameters *params)
 	switch (fb->drm_format) {
 	case DRM_FORMAT_NV12:
 	case DRM_FORMAT_NV16:
+	case DRM_FORMAT_NV24:
 	case DRM_FORMAT_NV21:
 	case DRM_FORMAT_NV61:
+	case DRM_FORMAT_NV42:
 	case DRM_FORMAT_P010:
 	case DRM_FORMAT_P012:
 	case DRM_FORMAT_P016:
@@ -3439,8 +3451,10 @@ static void get_yuv_parameters(struct igt_fb *fb, struct yuv_parameters *params)
 	switch (fb->drm_format) {
 	case DRM_FORMAT_NV12:
 	case DRM_FORMAT_NV16:
+	case DRM_FORMAT_NV24:
 	case DRM_FORMAT_NV21:
 	case DRM_FORMAT_NV61:
+	case DRM_FORMAT_NV42:
 	case DRM_FORMAT_YUV420:
 	case DRM_FORMAT_YUV422:
 	case DRM_FORMAT_YVU420:
@@ -3472,6 +3486,7 @@ static void get_yuv_parameters(struct igt_fb *fb, struct yuv_parameters *params)
 	switch (fb->drm_format) {
 	case DRM_FORMAT_NV12:
 	case DRM_FORMAT_NV16:
+	case DRM_FORMAT_NV24:
 		params->y_offset = fb->offsets[0];
 		params->u_offset = fb->offsets[1];
 		params->v_offset = fb->offsets[1] + 1;
@@ -3479,6 +3494,7 @@ static void get_yuv_parameters(struct igt_fb *fb, struct yuv_parameters *params)
 
 	case DRM_FORMAT_NV21:
 	case DRM_FORMAT_NV61:
+	case DRM_FORMAT_NV42:
 		params->y_offset = fb->offsets[0];
 		params->u_offset = fb->offsets[1] + 1;
 		params->v_offset = fb->offsets[1];
@@ -4224,9 +4240,11 @@ static void fb_convert(struct fb_convert *cvt)
 		switch (cvt->src.fb->drm_format) {
 		case DRM_FORMAT_XYUV8888:
 		case DRM_FORMAT_NV12:
+		case DRM_FORMAT_NV24:
 		case DRM_FORMAT_NV16:
 		case DRM_FORMAT_NV21:
 		case DRM_FORMAT_NV61:
+		case DRM_FORMAT_NV42:
 		case DRM_FORMAT_UYVY:
 		case DRM_FORMAT_VYUY:
 		case DRM_FORMAT_YUV420:
@@ -4243,8 +4261,10 @@ static void fb_convert(struct fb_convert *cvt)
 		case DRM_FORMAT_XYUV8888:
 		case DRM_FORMAT_NV12:
 		case DRM_FORMAT_NV16:
+		case DRM_FORMAT_NV24:
 		case DRM_FORMAT_NV21:
 		case DRM_FORMAT_NV61:
+		case DRM_FORMAT_NV42:
 		case DRM_FORMAT_UYVY:
 		case DRM_FORMAT_VYUY:
 		case DRM_FORMAT_YUV420:
@@ -4823,8 +4843,10 @@ bool igt_format_is_yuv(uint32_t drm_format)
 	switch (drm_format) {
 	case DRM_FORMAT_NV12:
 	case DRM_FORMAT_NV16:
+	case DRM_FORMAT_NV24:
 	case DRM_FORMAT_NV21:
 	case DRM_FORMAT_NV61:
+	case DRM_FORMAT_NV42:
 	case DRM_FORMAT_YUV420:
 	case DRM_FORMAT_YUV422:
 	case DRM_FORMAT_YVU420:

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH i-g-t 5/9] tests/kms_plane: Use a complex pattern to test plane color conversion.
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
                   ` (3 preceding siblings ...)
  2024-03-06 17:28 ` [PATCH i-g-t 4/9] lib/color_encoding: Add support for NV24 and NV42 pixel formats Louis Chauvet
@ 2024-03-06 17:28 ` Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 6/9] tests/kms_plane: Use the square pattern even when using multiple planes Louis Chauvet
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-06 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: miquel.raynal, jeremie.dautheribes, thomas.petazzoni,
	Louis Chauvet

The capture_format_crcs_single helper uses a "line pattern" with all the
colors in the color list. It is useful to make quick test of color
conversion (only one plane to render, not one per color).

To help detecting issues, this "line pattern" is replaced by a
"square pattern". It is useful for complex formats like YUV where the
iteration on each pixel is not a trivial "ptr++".

The kind of issue which can be detected can be found in [1]. The tests
were all "SUCCESS" despite a wrong pixel iteration. With the "square"
pattern, it is now more difficult to have a test "SUCCESS" if the pixel
iteration is not correct.

[1]: https://lore.kernel.org/dri-devel/ZbvXV-1hrfXLcvC3@localhost.localdomain/

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 tests/kms_plane.c | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 9757c6e44325..f0be09b8e506 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -585,8 +585,11 @@ static bool set_c8_legacy_lut(data_t *data, enum pipe pipe,
 static void draw_entire_color_array(data_t *data, cairo_t *cr, uint32_t format,
 				    struct igt_fb *fb)
 {
-	const int color_amount = ARRAY_SIZE(colors_extended);
-	const int x = format == DRM_FORMAT_XRGB8888 ? 0 : data->crop;
+	const int color_count = ARRAY_SIZE(colors_extended);
+	const int margin = format == DRM_FORMAT_XRGB8888 ? 0 : data->crop;
+	const int step_x = (fb->width - margin * 2) / color_count;
+	const int step_y = (fb->height - margin * 2) / color_count;
+	int color_index;
 
 	if (format != DRM_FORMAT_XRGB8888) {
 		cairo_rectangle(cr, data->crop, data->crop,
@@ -594,16 +597,18 @@ static void draw_entire_color_array(data_t *data, cairo_t *cr, uint32_t format,
 				fb->height - data->crop * 2);
 	}
 
-
-	for (int n = 0; n < color_amount; n++) {
-		int y = (fb->height - x * 2) * n / color_amount + x;
-
-		igt_paint_color(cr, x, y,
-				fb->width - x * 2,
-				(fb->height - x * 2) / color_amount + 1,
-				colors_extended[n].red,
-				colors_extended[n].green,
-				colors_extended[n].blue);
+	for (int n = 0; n < color_count; n++) {
+		for (int m = 0; m < color_count; m++) {
+			color_index = (n + m) % color_count;
+			igt_paint_color(cr,
+					margin + n * step_x,
+					margin + m * step_y,
+					step_x,
+					step_y,
+					colors_extended[color_index].red,
+					colors_extended[color_index].green,
+					colors_extended[color_index].blue);
+		}
 	}
 }
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH i-g-t 6/9] tests/kms_plane: Use the square pattern even when using multiple planes
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
                   ` (4 preceding siblings ...)
  2024-03-06 17:28 ` [PATCH i-g-t 5/9] tests/kms_plane: Use a complex pattern to test plane color conversion Louis Chauvet
@ 2024-03-06 17:28 ` Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 7/9] lib/igt_fb: Add DRM_FORMAT_R1 support Louis Chauvet
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-06 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: miquel.raynal, jeremie.dautheribes, thomas.petazzoni,
	Louis Chauvet

When the capture_format_crcs_multiple function is used, it was only using
plain colors. It is enough to detect if the format conversion don't
return the correct color, but it was not sufficient to check if the
correct pixel is converted.

As seen in [1], the capture_format_crcs_multiple was "SUCCESS" because if
the whole plane have only one color, if the wrong pixel is read, it will
always convert to the correct color.

[1]: https://lore.kernel.org/dri-devel/ZbvXV-1hrfXLcvC3@localhost.localdomain/

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 tests/kms_plane.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index f0be09b8e506..bb8229124b8c 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -728,6 +728,12 @@ static void capture_format_crcs_multiple(data_t *data, enum pipe pipe,
 	struct drm_event_vblank ev;
 	int i;
 
+	/* Also run single colors to capture more failures */
+	capture_format_crcs_single(data, pipe, plane, format, modifier, width, height, encoding, range, crc, fb);
+
+	/* Skip the first crc as it's taken by "capture_format_crcs_single" */
+	crc = crc + 1;
+
 restart_round:
 	for (i = 0; i < data->num_colors; i++) {
 		const color_t *c = &data->colors[i];
@@ -853,7 +859,7 @@ static bool test_format_plane_colors(data_t *data, enum pipe pipe,
 				     igt_crc_t ref_crc[],
 				     struct igt_fb *fb)
 {
-	igt_crc_t crc[ARRAY_SIZE(colors_extended)];
+	igt_crc_t crc[ARRAY_SIZE(colors_extended) + 1];
 	unsigned int crc_mismatch_mask = 0;
 	int crc_mismatch_count = 0;
 	bool result = true;
@@ -863,7 +869,7 @@ static bool test_format_plane_colors(data_t *data, enum pipe pipe,
 		capture_format_crcs_multiple(data, pipe, plane, format, modifier,
 					     width, height, encoding, range, crc,
 					     fb);
-		total_crcs = data->num_colors;
+		total_crcs = data->num_colors + 1;
 	} else {
 		capture_format_crcs_single(data, pipe, plane, format, modifier,
 					   width, height, encoding, range, crc,
@@ -881,7 +887,7 @@ static bool test_format_plane_colors(data_t *data, enum pipe pipe,
 	if (crc_mismatch_count)
 		igt_warn("CRC mismatches with format " IGT_FORMAT_FMT " on %s.%u with %d/%d solid colors tested (0x%X)\n",
 			 IGT_FORMAT_ARGS(format), kmstest_pipe_name(pipe),
-			 plane->index, crc_mismatch_count, data->num_colors, crc_mismatch_mask);
+			 plane->index, crc_mismatch_count, total_crcs, crc_mismatch_mask);
 
 	return result;
 }
@@ -1010,7 +1016,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
 	struct igt_fb *clear_fb = plane->type == DRM_PLANE_TYPE_PRIMARY ? primary_fb : NULL;
 	drmModeModeInfo *mode;
 	uint64_t width, height;
-	igt_crc_t ref_crc[MAX_CRC_SET][ARRAY_SIZE(colors_extended)];
+	igt_crc_t ref_crc[MAX_CRC_SET][ARRAY_SIZE(colors_extended) + 1];
 	struct igt_vec tested_formats;
 	struct format_mod ref = {};
 	igt_crc_t *crcset;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH i-g-t 7/9] lib/igt_fb: Add DRM_FORMAT_R1 support
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
                   ` (5 preceding siblings ...)
  2024-03-06 17:28 ` [PATCH i-g-t 6/9] tests/kms_plane: Use the square pattern even when using multiple planes Louis Chauvet
@ 2024-03-06 17:28 ` Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 8/9] tests/kms_plane: Allow choosing the number of colors when drawing the color array Louis Chauvet
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-06 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: miquel.raynal, jeremie.dautheribes, thomas.petazzoni,
	Louis Chauvet

Add the DRM_FORMAT_R1 to rgb24 conversion to allow this format in tests.

Introduce a small helper to be able to filter the black and white formats.

Use this new helper to skip black and white format in tests/kms_plane to
avoid pointless tests (testing black and white format with something else
than black or white will always be a failure).

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 lib/igt_fb.c      | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_fb.h      |   1 +
 tests/kms_plane.c |   3 ++
 3 files changed, 109 insertions(+)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index b6f28cf3ee52..65342e6a4df8 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -377,6 +377,10 @@ static const struct format_desc_struct {
 	  .pixman_id = PIXMAN_rgba_float,
 	  .num_planes = 1, .plane_bpp = { 128 },
 	},
+	{ .name = "R1", .depth = -1, .drm_id = DRM_FORMAT_R1,
+		.cairo_id = CAIRO_FORMAT_RGB24, .convert = true,
+		.num_planes=1, .plane_bpp = { 1 },
+	},
 };
 #define for_each_format(f)	\
 	for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
@@ -3572,6 +3576,51 @@ static void get_yuv_parameters(struct igt_fb *fb, struct yuv_parameters *params)
 	}
 }
 
+static void convert_r1_to_rgb24(struct fb_convert *cvt)
+{
+	const struct format_desc_struct *src_fmt =
+		lookup_drm_format(cvt->src.fb->drm_format);
+	uint8_t *buf;
+	int i, j;
+	unsigned int rgb24_stride = cvt->dst.fb->strides[0];
+	unsigned int gray_stride = cvt->src.fb->strides[0];
+	uint8_t *rgb24 = cvt->dst.ptr;
+	uint8_t *gray = cvt->src.ptr;
+	igt_assert(cvt->dst.fb->drm_format == DRM_FORMAT_XRGB8888 &&
+		   cvt->src.fb->drm_format == DRM_FORMAT_R1);
+
+	buf = convert_src_get(cvt);
+	for (i = 0; i < cvt->dst.fb->height; i++) {
+		uint8_t *rgb_tmp = rgb24;
+		uint8_t *gray_tmp = gray;
+		size_t bit_offset = 0;
+
+		for (j = 0; j < cvt->dst.fb->width; j++) {
+			struct igt_vec4 rgb;
+			float v = 0.0f;
+			if (*gray_tmp & (0x1 << bit_offset)) {
+				v = 1.0f;
+			}
+
+			rgb.d[0] = v;
+			rgb.d[1] = v;
+			rgb.d[2] = v;
+			rgb.d[3] = 1.0f;
+			write_rgb(rgb_tmp, &rgb);
+
+			bit_offset += 1;
+			if (bit_offset >= 8) {
+				bit_offset = 0;
+				gray_tmp += 1;
+			}
+		}
+
+		rgb24 += rgb24_stride;
+		gray += gray_stride;
+	}
+	convert_src_put(cvt, buf);
+}
+
 static void convert_yuv_to_rgb24(struct fb_convert *cvt)
 {
 	const struct format_desc_struct *src_fmt =
@@ -3635,6 +3684,45 @@ static void convert_yuv_to_rgb24(struct fb_convert *cvt)
 	convert_src_put(cvt, buf);
 }
 
+static void convert_rgb24_to_r1(struct fb_convert *cvt)
+{
+	int i, j;
+	unsigned int rgb24_stride = cvt->src.fb->strides[0];
+	unsigned int gray_stride = cvt->dst.fb->strides[0];
+	uint8_t *gray = cvt->dst.ptr;
+	uint8_t *rgb24 = cvt->src.ptr;
+	igt_assert(cvt->src.fb->drm_format == DRM_FORMAT_XRGB8888 &&
+		   cvt->dst.fb->drm_format == DRM_FORMAT_R1);
+
+	for (i = 0; i < cvt->dst.fb->height; i++) {
+		uint8_t *rgb_tmp = rgb24;
+		uint8_t *gray_tmp = gray;
+		size_t bit_offset = 0;
+
+		for (j = 0; j < cvt->dst.fb->width; j++) {
+			struct igt_vec4 rgb;
+			uint8_t val = 0;
+			read_rgb(&rgb, rgb_tmp);
+			float mean = rgb.d[0] + rgb.d[1] + rgb.d[2];
+			if (mean >= (255.0 * 3.0) / 2.0) {
+				val = 1;
+			}
+			*gray_tmp |= (*gray_tmp & 0x1 << bit_offset) | val << bit_offset;
+
+			bit_offset += 1;
+			if (bit_offset >= 8) {
+				bit_offset = 0;
+				gray_tmp += 1;
+			}
+			rgb_tmp += 4;
+		}
+
+
+		rgb24 += rgb24_stride;
+		gray += gray_stride;
+	}
+}
+
 static void convert_rgb24_to_yuv(struct fb_convert *cvt)
 {
 	const struct format_desc_struct *dst_fmt =
@@ -4255,6 +4343,9 @@ static void fb_convert(struct fb_convert *cvt)
 		case DRM_FORMAT_YVYU:
 			convert_yuv_to_rgb24(cvt);
 			return;
+		case DRM_FORMAT_R1:
+			convert_r1_to_rgb24(cvt);
+			return;
 		}
 	} else if (cvt->src.fb->drm_format == DRM_FORMAT_XRGB8888) {
 		switch (cvt->dst.fb->drm_format) {
@@ -4275,6 +4366,9 @@ static void fb_convert(struct fb_convert *cvt)
 		case DRM_FORMAT_YVYU:
 			convert_rgb24_to_yuv(cvt);
 			return;
+		case DRM_FORMAT_R1:
+			convert_rgb24_to_r1(cvt);
+			return;
 		}
 	} else if (cvt->dst.fb->drm_format == IGT_FORMAT_FLOAT) {
 		switch (cvt->src.fb->drm_format) {
@@ -4874,6 +4968,17 @@ bool igt_format_is_yuv(uint32_t drm_format)
 	}
 }
 
+bool igt_format_is_black_white(uint32_t drm_format)
+{
+	switch (drm_format) {
+	case DRM_FORMAT_R1:
+	case DRM_FORMAT_D1:
+		return true;
+	default:
+		return false;
+	}
+}
+
 /**
  * igt_format_is_fp16
  * @drm_format: drm fourcc
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 834aaef54dea..a4315233eb7e 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -214,6 +214,7 @@ uint32_t igt_drm_format_to_bpp(uint32_t drm_format);
 const char *igt_format_str(uint32_t drm_format);
 bool igt_fb_supported_format(uint32_t drm_format);
 bool igt_format_is_yuv(uint32_t drm_format);
+bool igt_format_is_black_white(uint32_t drm_format);
 bool igt_format_is_yuv_semiplanar(uint32_t format);
 
 uint32_t igt_drm_format_str_to_format(const char *drm_format);
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index bb8229124b8c..2baaeef7bbc8 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -1091,6 +1091,9 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
 		    f.modifier == ref.modifier)
 			continue;
 
+		if (igt_format_is_black_white(f.format))
+			continue;
+
 		/* test each format "class" only once in non-extended tests */
 		if (!data->extended && f.modifier != DRM_FORMAT_MOD_LINEAR) {
 			struct format_mod rf = {

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH i-g-t 8/9] tests/kms_plane: Allow choosing the number of colors when drawing the color array
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
                   ` (6 preceding siblings ...)
  2024-03-06 17:28 ` [PATCH i-g-t 7/9] lib/igt_fb: Add DRM_FORMAT_R1 support Louis Chauvet
@ 2024-03-06 17:28 ` Louis Chauvet
  2024-03-06 17:28 ` [PATCH i-g-t 9/9] tests/kms_plane: Add black and white test Louis Chauvet
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-06 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: miquel.raynal, jeremie.dautheribes, thomas.petazzoni,
	Louis Chauvet

To test different formats, it can be useful to pass a custom list of
colors. For example with the grayscale formats, the red/green/blue
components alone don't have any meaning and it's better to test multiple
gray values. This patch edit the fill algorithm to use custom color list.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 tests/kms_plane.c | 64 +++++++++++++++++++++++++++++++++----------------------
 1 file changed, 38 insertions(+), 26 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 2baaeef7bbc8..8e92d2e13993 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -582,10 +582,16 @@ static bool set_c8_legacy_lut(data_t *data, enum pipe pipe,
 	return true;
 }
 
-static void draw_entire_color_array(data_t *data, cairo_t *cr, uint32_t format,
-				    struct igt_fb *fb)
+/*
+ * draw_color_array() - Draw a color array on a plane, respecting the requested cropping
+ *
+ * @data, @cr, @format, @fb: Description of the framebuffer
+ * @colors: list of colors to draw
+ * @color_count: number of colors to draw
+ */
+static void draw_color_array(data_t *data, cairo_t *cr, uint32_t format,
+			     struct igt_fb *fb, const color_t *colors, int color_count)
 {
-	const int color_count = ARRAY_SIZE(colors_extended);
 	const int margin = format == DRM_FORMAT_XRGB8888 ? 0 : data->crop;
 	const int step_x = (fb->width - margin * 2) / color_count;
 	const int step_y = (fb->height - margin * 2) / color_count;
@@ -605,21 +611,32 @@ static void draw_entire_color_array(data_t *data, cairo_t *cr, uint32_t format,
 					margin + m * step_y,
 					step_x,
 					step_y,
-					colors_extended[color_index].red,
-					colors_extended[color_index].green,
-					colors_extended[color_index].blue);
+					colors[color_index].red,
+					colors[color_index].green,
+					colors[color_index].blue);
 		}
 	}
 }
 
+
+/**
+ * prepare_format_color() - Fill a plane with a specific color or pattern
+ *
+ * @data: Generic data for this test
+ * @pipe, @plane, @format, @modifier, @width, @height, @color_encoding, @color_range, @fb: description of the plane
+ * @colors: Color list to display on this plane
+ * @color_count: Number of color in the list
+ *
+ * At least one color must be given
+ */
 static void prepare_format_color(data_t *data, enum pipe pipe,
 				 igt_plane_t *plane,
 				 uint32_t format, uint64_t modifier,
 				 int width, int height,
 				 enum igt_color_encoding color_encoding,
 				 enum igt_color_range color_range,
-				 const color_t *c, struct igt_fb *fb,
-				 bool packed)
+				 struct igt_fb *fb, const color_t *colors,
+				 int color_count)
 {
 	cairo_t *cr;
 	const int localcrop = format == DRM_FORMAT_XRGB8888 ? 0 : data->crop;
@@ -640,17 +657,12 @@ static void prepare_format_color(data_t *data, enum pipe pipe,
 		igt_paint_color(cr, 0, 0,
 				width + localcrop * 2,
 				height + localcrop * 2,
-				1.0f - c->red,
-				1.0f - c->green,
-				1.0f - c->blue);
+				1.0f - colors[0].red,
+				1.0f - colors[0].green,
+				1.0f - colors[0].blue);
 
 
-	if (packed)
-		draw_entire_color_array(data, cr, format, fb);
-	else
-		igt_paint_color(cr, localcrop, localcrop,
-				width, height,
-				c->red, c->green, c->blue);
+	draw_color_array(data, cr, format, fb, colors, color_count);
 
 	igt_put_cairo_ctx(cr);
 	igt_plane_set_fb(plane, fb);
@@ -700,13 +712,13 @@ static void capture_format_crcs_single(data_t *data, enum pipe pipe,
 				       int width, int height,
 				       enum igt_color_encoding encoding,
 				       enum igt_color_range range,
-				       igt_crc_t crc[], struct igt_fb *fb)
+				       igt_crc_t crc[], struct igt_fb *fb,
+				       const color_t *colors, int color_count)
 {
 	struct igt_fb old_fb = *fb;
-	const color_t black = { 0.0f, 0.0f, 0.0f };
 
 	prepare_format_color(data, pipe, plane, format, modifier,
-			     width, height, encoding, range, &black, fb, true);
+			     width, height, encoding, range, fb, colors, color_count);
 
 	igt_display_commit2(&data->display, data->display.is_atomic ?
 					    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
@@ -729,20 +741,20 @@ static void capture_format_crcs_multiple(data_t *data, enum pipe pipe,
 	int i;
 
 	/* Also run single colors to capture more failures */
-	capture_format_crcs_single(data, pipe, plane, format, modifier, width, height, encoding, range, crc, fb);
+	capture_format_crcs_single(data, pipe, plane, format, modifier, width, height, encoding, range, crc, fb,
+				   colors_extended, ARRAY_SIZE(colors_extended));
 
 	/* Skip the first crc as it's taken by "capture_format_crcs_single" */
 	crc = crc + 1;
 
 restart_round:
 	for (i = 0; i < data->num_colors; i++) {
-		const color_t *c = &data->colors[i];
 		struct igt_fb old_fb = *fb;
 		int ret;
 
 		prepare_format_color(data, pipe, plane, format, modifier,
-				     width, height, encoding, range, c, fb,
-				     false);
+				     width, height, encoding, range, fb,
+				     &data->colors[i], 1);
 
 		if (data->display.is_atomic && i >= 1) {
 			igt_assert(read(data->drm_fd, &ev, sizeof(ev)) == sizeof(ev));
@@ -873,7 +885,7 @@ static bool test_format_plane_colors(data_t *data, enum pipe pipe,
 	} else {
 		capture_format_crcs_single(data, pipe, plane, format, modifier,
 					   width, height, encoding, range, crc,
-					   fb);
+					   fb, colors_extended, ARRAY_SIZE(colors_extended));
 	}
 
 	for (i = 0; i < total_crcs; i++) {
@@ -1062,7 +1074,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
 	capture_format_crcs_single(data, pipe, plane, ref.format, ref.modifier,
 				   width, height, IGT_COLOR_YCBCR_BT709,
 				   IGT_COLOR_YCBCR_LIMITED_RANGE,
-				   ref_crc[SINGLE_CRC_SET], &fb);
+				   ref_crc[SINGLE_CRC_SET], &fb, colors_extended, ARRAY_SIZE(colors_extended));
 
 	capture_format_crcs_multiple(data, pipe, plane, ref.format, ref.modifier,
 				     width, height, IGT_COLOR_YCBCR_BT709,

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH i-g-t 9/9] tests/kms_plane: Add black and white test
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
                   ` (7 preceding siblings ...)
  2024-03-06 17:28 ` [PATCH i-g-t 8/9] tests/kms_plane: Allow choosing the number of colors when drawing the color array Louis Chauvet
@ 2024-03-06 17:28 ` Louis Chauvet
  2024-03-06 17:53 ` ✗ Fi.CI.BUILD: failure for Enable more tests for VKMS Patchwork
  2024-03-06 18:07 ` ✗ GitLab.Pipeline: warning " Patchwork
  10 siblings, 0 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-06 17:28 UTC (permalink / raw)
  To: igt-dev; +Cc: miquel.raynal, jeremie.dautheribes, thomas.petazzoni,
	Louis Chauvet

The black and white formats can't use the same list of colors as the
standard colors test. This new subtest uses only black and white to check
if the conversion is correct.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 tests/kms_plane.c | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 171 insertions(+), 1 deletion(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 8e92d2e13993..1d47ccc73f75 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -521,6 +521,11 @@ static const color_t colors_reduced[] = {
 	{ 0.0f, 1.0f, 1.0f, },
 };
 
+static const color_t color_black_white[] = {
+	{ 1.0f, 1.0f, 1.0f },
+	{ 0.0f, 0.0f, 0.0f },
+};
+
 static void set_legacy_lut(data_t *data, enum pipe pipe,
 			   uint16_t mask)
 {
@@ -1159,6 +1164,118 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
 	return result;
 }
 
+static bool test_format_black_and_white_plane(data_t *data, enum pipe pipe,
+					      igt_output_t *output, igt_plane_t *plane, igt_fb_t *primary_fb)
+{
+	struct igt_fb fb = {};
+	struct igt_fb *clear_fb = plane->type == DRM_PLANE_TYPE_PRIMARY ? primary_fb : NULL;
+	drmModeModeInfo *mode;
+	int width, height;
+	igt_crc_t ref_crc[ARRAY_SIZE(color_black_white) + 1];
+	igt_crc_t crc[ARRAY_SIZE(color_black_white) + 1];
+	struct format_mod ref = {};
+	bool result = true;
+
+	/*
+	 * No clamping test for cursor plane
+	 */
+	if (data->crop != 0 && plane->type == DRM_PLANE_TYPE_CURSOR)
+		return true;
+
+
+	mode = igt_output_get_mode(output);
+	if (plane->type != DRM_PLANE_TYPE_CURSOR) {
+		width = mode->hdisplay;
+		height = mode->vdisplay;
+		ref.format = DRM_FORMAT_XRGB8888;
+		ref.modifier = DRM_FORMAT_MOD_LINEAR;
+	} else {
+		if (!plane->drm_plane) {
+			igt_debug("Only legacy cursor ioctl supported, skipping cursor plane\n");
+			return true;
+		}
+		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_WIDTH, &width));
+		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_HEIGHT, &height));
+		ref.format = DRM_FORMAT_ARGB8888;
+		ref.modifier = DRM_FORMAT_MOD_LINEAR;
+	}
+
+	igt_debug("Testing connector %s on %s plane %s.%u with black and white colors\n",
+		  igt_output_name(output), kmstest_plane_type_name(plane->type),
+		  kmstest_pipe_name(pipe), plane->index);
+
+	igt_pipe_crc_start(data->pipe_crc);
+
+	igt_info("Testing format " IGT_FORMAT_FMT " / modifier " IGT_MODIFIER_FMT " on %s.%u for reference CRC\n",
+		 IGT_FORMAT_ARGS(ref.format), IGT_MODIFIER_ARGS(ref.modifier),
+		 kmstest_pipe_name(pipe), plane->index);
+
+	check_allowed_plane_size_64x64(data, plane, &width, &height, ref.format);
+
+	/* Capture the reference CRCs */
+	capture_format_crcs_single(data, pipe, plane, ref.format, ref.modifier,
+				   width, height, IGT_COLOR_YCBCR_BT709,
+				   IGT_COLOR_YCBCR_LIMITED_RANGE,
+				   &ref_crc[0], &fb, color_black_white, ARRAY_SIZE(color_black_white));
+
+	for (int i = 0; i < ARRAY_SIZE(color_black_white); i++) {
+		capture_format_crcs_single(data, pipe, plane, ref.format, ref.modifier, width, height,
+					   IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE, &ref_crc[i + 1], &fb,
+					   &color_black_white[i], 1);
+	}
+
+	for (int i = 0; i < plane->format_mod_count; i++) {
+		uint32_t format = plane->formats[i];
+		uint64_t modifier = plane->modifiers[i];
+
+		if (!igt_fb_supported_format(format)
+		    || !igt_format_is_black_white(format))
+			continue;
+
+		igt_info("Testing format " IGT_FORMAT_FMT " / modifier " IGT_MODIFIER_FMT " on %s.%u\n",
+			 IGT_FORMAT_ARGS(format), IGT_MODIFIER_ARGS(modifier),
+			 kmstest_pipe_name(pipe), plane->index);
+
+		capture_format_crcs_single(data, pipe, plane, format, modifier,
+					   width, height, IGT_COLOR_YCBCR_BT709,
+					   IGT_COLOR_YCBCR_LIMITED_RANGE,
+					   &crc[0], &fb, color_black_white, ARRAY_SIZE(color_black_white));
+
+		for (int i = 0; i < ARRAY_SIZE(color_black_white); i++) {
+			capture_format_crcs_single(data, pipe, plane, format, modifier, width, height,
+						   IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE, &crc[i + 1],
+						   &fb,
+						   &color_black_white[i], 1);
+		}
+
+		bool tmp_result = igt_check_crc_equal(&crc[0], &ref_crc[0]);
+		if (!tmp_result)
+			igt_warn(
+				"Format " IGT_FORMAT_FMT " / modifier " IGT_MODIFIER_FMT " failed on %s.%u with the array pattern\n",
+				IGT_FORMAT_ARGS(format), IGT_MODIFIER_ARGS(modifier), kmstest_pipe_name(pipe),
+				plane->index);
+		result &= tmp_result;
+
+		for (int i = 1; i < ARRAY_SIZE(crc); i++) {
+			tmp_result = igt_check_crc_equal(&crc[i], &ref_crc[i]);
+			if (!tmp_result)
+				igt_warn(
+					"Format " IGT_FORMAT_FMT " / modifier " IGT_MODIFIER_FMT " failed on %s.%u for the color (r=%f,g=%f,b=%f)\n",
+					IGT_FORMAT_ARGS(format), IGT_MODIFIER_ARGS(modifier), kmstest_pipe_name(pipe),
+					plane->index, color_black_white[i - 1].red, color_black_white[i - 1].green,
+					color_black_white[i - 1].blue);
+			result &= tmp_result;
+		}
+	}
+
+	igt_pipe_crc_stop(data->pipe_crc);
+
+	igt_plane_set_fb(plane, clear_fb);
+	igt_remove_fb(data->drm_fd, &fb);
+
+	return result;
+}
+
 static bool skip_plane(data_t *data, igt_plane_t *plane)
 {
 	int index = plane->index;
@@ -1251,6 +1368,55 @@ test_pixel_formats(data_t *data, enum pipe pipe)
 
 	igt_assert_f(result, "At least one CRC mismatch happened\n");
 }
+
+
+static void
+test_pixel_black_and_white_formats(data_t *data, enum pipe pipe)
+{
+	struct igt_fb primary_fb;
+	igt_plane_t *primary;
+	drmModeModeInfo *mode;
+	bool result;
+	igt_output_t *output = data->output;
+	igt_plane_t *plane;
+
+	igt_info("Using (pipe %s + %s) to run the subtest.\n",
+		 kmstest_pipe_name(pipe), igt_output_name(output));
+
+	test_init(data, pipe);
+
+	mode = igt_output_get_mode(output);
+
+	igt_create_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
+		      DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR, &primary_fb);
+
+	igt_output_set_pipe(output, pipe);
+	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	igt_plane_set_fb(primary, &primary_fb);
+
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	set_legacy_lut(data, pipe, LUT_MASK);
+
+	result = true;
+	for_each_plane_on_pipe(&data->display, pipe, plane) {
+		if (skip_plane(data, plane))
+			continue;
+		result &= test_format_black_and_white_plane(data, pipe, output, plane, &primary_fb);
+	}
+
+	test_fini(data);
+
+	set_legacy_lut(data, pipe, 0xffff);
+
+	igt_plane_set_fb(primary, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	igt_remove_fb(data->drm_fd, &primary_fb);
+
+	igt_assert_f(result, "At least one CRC mismatch happened\n");
+}
 static void test_odd_size_with_yuv(data_t *data)
 {
 	enum pipe pipe = PIPE_A;
@@ -1350,9 +1516,13 @@ static void
 run_tests_for_pipe_plane(data_t *data)
 {
 	igt_describe("verify the pixel formats for given plane and pipe");
-	igt_subtest_with_dynamic_f("pixel-format")
+	igt_subtest_with_dynamic_f("pixel-format-colors")
 		run_test(data, test_pixel_formats);
 
+	igt_describe("verify the black and white pixel formats for given plane and pipe");
+	igt_subtest_with_dynamic_f("pixel-format-black-white")
+		run_test(data, test_pixel_black_and_white_formats);
+
 	igt_describe("verify the pixel formats for given plane and pipe with source clamping");
 	igt_subtest_with_dynamic_f("pixel-format-source-clamping") {
 		data->crop = 4;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* ✗ Fi.CI.BUILD: failure for Enable more tests for VKMS
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
                   ` (8 preceding siblings ...)
  2024-03-06 17:28 ` [PATCH i-g-t 9/9] tests/kms_plane: Add black and white test Louis Chauvet
@ 2024-03-06 17:53 ` Patchwork
  2024-03-06 18:07 ` ✗ GitLab.Pipeline: warning " Patchwork
  10 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2024-03-06 17:53 UTC (permalink / raw)
  To: Louis Chauvet; +Cc: igt-dev

== Series Details ==

Series: Enable more tests for VKMS
URL   : https://patchwork.freedesktop.org/series/130818/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
2fd91b8c3cf9aa2b0bb78537a6b5e2bc3de50e0e tests/intel-ci: Block PSR + DRRS tests

Tail of build.log:
Warning: igt@sysfs_heartbeat_interval@off Sub-category documentation is missing
Warning: igt@sysfs_heartbeat_interval@precise Category documentation is missing
Warning: igt@sysfs_heartbeat_interval@precise Functionality documentation is missing
Warning: igt@sysfs_heartbeat_interval@precise Sub-category documentation is missing
Warning: igt@sysfs_preempt_timeout@idempotent Category documentation is missing
Warning: igt@sysfs_preempt_timeout@idempotent Functionality documentation is missing
Warning: igt@sysfs_preempt_timeout@idempotent Sub-category documentation is missing
Warning: igt@sysfs_preempt_timeout@invalid Category documentation is missing
Warning: igt@sysfs_preempt_timeout@invalid Functionality documentation is missing
Warning: igt@sysfs_preempt_timeout@invalid Sub-category documentation is missing
Warning: igt@sysfs_preempt_timeout@off Category documentation is missing
Warning: igt@sysfs_preempt_timeout@off Functionality documentation is missing
Warning: igt@sysfs_preempt_timeout@off Sub-category documentation is missing
Warning: igt@sysfs_preempt_timeout@timeout Category documentation is missing
Warning: igt@sysfs_preempt_timeout@timeout Functionality documentation is missing
Warning: igt@sysfs_preempt_timeout@timeout Sub-category documentation is missing
Warning: igt@sysfs_timeslice_duration@duration Category documentation is missing
Warning: igt@sysfs_timeslice_duration@duration Functionality documentation is missing
Warning: igt@sysfs_timeslice_duration@duration Sub-category documentation is missing
Warning: igt@sysfs_timeslice_duration@idempotent Category documentation is missing
Warning: igt@sysfs_timeslice_duration@idempotent Functionality documentation is missing
Warning: igt@sysfs_timeslice_duration@idempotent Sub-category documentation is missing
Warning: igt@sysfs_timeslice_duration@invalid Category documentation is missing
Warning: igt@sysfs_timeslice_duration@invalid Functionality documentation is missing
Warning: igt@sysfs_timeslice_duration@invalid Sub-category documentation is missing
Warning: igt@sysfs_timeslice_duration@off Category documentation is missing
Warning: igt@sysfs_timeslice_duration@off Functionality documentation is missing
Warning: igt@sysfs_timeslice_duration@off Sub-category documentation is missing
Warning: igt@sysfs_timeslice_duration@timeout Category documentation is missing
Warning: igt@sysfs_timeslice_duration@timeout Functionality documentation is missing
Warning: igt@sysfs_timeslice_duration@timeout Sub-category documentation is missing
Warning: igt@vgem_basic@bad-fence Sub-category documentation is missing
Warning: igt@vgem_basic@bad-flag Sub-category documentation is missing
Warning: igt@vgem_basic@bad-handle Sub-category documentation is missing
Warning: igt@vgem_basic@bad-pad Sub-category documentation is missing
Warning: igt@vgem_basic@busy-fence Sub-category documentation is missing
Warning: igt@vgem_basic@create Sub-category documentation is missing
Warning: igt@vgem_basic@debugfs Sub-category documentation is missing
Warning: igt@vgem_basic@dmabuf-export Sub-category documentation is missing
Warning: igt@vgem_basic@dmabuf-fence Sub-category documentation is missing
Warning: igt@vgem_basic@dmabuf-fence-before Sub-category documentation is missing
Warning: igt@vgem_basic@dmabuf-mmap Sub-category documentation is missing
Warning: igt@vgem_basic@mmap Sub-category documentation is missing
Warning: igt@vgem_basic@second-client Sub-category documentation is missing
Warning: igt@vgem_basic@setversion Sub-category documentation is missing
Warning: igt@vgem_basic@sysfs Sub-category documentation is missing
Warning: igt@vgem_basic@unload Sub-category documentation is missing
[1663/1667] Generating intel-ci-tests with a custom command.
[1664/1667] Generating xe_tests.html with a custom command.
ninja: build stopped: subcommand failed.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* ✗ GitLab.Pipeline: warning for Enable more tests for VKMS
  2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
                   ` (9 preceding siblings ...)
  2024-03-06 17:53 ` ✗ Fi.CI.BUILD: failure for Enable more tests for VKMS Patchwork
@ 2024-03-06 18:07 ` Patchwork
  2024-03-08  9:00   ` Louis Chauvet
  10 siblings, 1 reply; 13+ messages in thread
From: Patchwork @ 2024-03-06 18:07 UTC (permalink / raw)
  To: Louis Chauvet; +Cc: igt-dev

== Series Details ==

Series: Enable more tests for VKMS
URL   : https://patchwork.freedesktop.org/series/130818/
State : warning

== Summary ==

Pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1121225 for the overview.

build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955062):
  Checking if the user of the pipeline is allowed...
  Checking if the job's project is part of a well-known group...
  Thank you for contributing to freedesktop.org
  Fetching changes...
  Reinitialized existing Git repository in /builds/gfx-ci/igt-ci-tags/.git/
  Checking out 69fbed73 as detached HEAD (ref is intel/IGTPW_10789)...
  Removing build/
  Removing lib/i915/perf-configs/__pycache__/
  Removing scripts/__pycache__/
  
  Skipping Git submodules setup
  section_end:1709748272:get_sources
  section_start:1709748272:step_script
  Executing "step_script" stage of the job script
  Using docker image sha256:ca01fc804bb92e5df42a202dd7e0470610c6711c66a808525defcb8bbb774078 for registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian:commit-69fbed7368fcb3c662c803ba0c46d6c7c672dfee with digest registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian@sha256:b9fe73c6ff5d68f5692fd18b9076735679c8bfa7ed393e752dd4927a2cdf9874 ...
  section_end:1709748274:step_script
  section_start:1709748274:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1709748275:cleanup_file_variables
  ERROR: Job failed (system failure): Error response from daemon: no such image: docker.io/library/sha256:ca01fc804bb92e5df42a202dd7e0470610c6711c66a808525defcb8bbb774078: image not known (docker.go:570:0s)

build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955057):
  [1790/1793] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
  ninja: build stopped: subcommand failed.
  ninja: Entering directory `build'
  [1/821] Generating version.h with a custom command.
  [2/6] Linking target runner/runner_test.
  [3/6] Generating i915_tests.html with a custom command.
  [4/6] Generating kms_tests.rst with a custom command.
  FAILED: docs/testplan/kms_tests.rst 
  /builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
  Warning: Documented igt@kms_plane@pixel-format doesn't exist on source files
  Warning: Missing documentation for igt@kms_plane@pixel-format-black-white
  Warning: Missing documentation for igt@kms_plane@pixel-format-colors
  Please refer: docs/test_documentation.md for more details
  ninja: build stopped: subcommand failed.
  section_end:1709748299:step_script
  section_start:1709748299:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1709748300:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955061):
  [1791/1793] Generating xe_tests.html with a custom command.
  ninja: build stopped: subcommand failed.
  ninja: Entering directory `build'
  [1/821] Generating version.h with a custom command.
  [2/5] Generating intel-ci-tests with a custom command.
  [3/5] Generating i915_tests.html with a custom command.
  [4/5] Generating kms_tests.rst with a custom command.
  FAILED: docs/testplan/kms_tests.rst 
  /builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
  Warning: Documented igt@kms_plane@pixel-format doesn't exist on source files
  Warning: Missing documentation for igt@kms_plane@pixel-format-black-white
  Warning: Missing documentation for igt@kms_plane@pixel-format-colors
  Please refer: docs/test_documentation.md for more details
  ninja: build stopped: subcommand failed.
  section_end:1709748326:step_script
  section_start:1709748326:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1709748328:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-no-libdrm-nouveau has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955060):
  ninja: build stopped: subcommand failed.
  ninja: Entering directory `build'
  [1/771] Generating version.h with a custom command.
  [2/6] Linking target runner/runner_test.
  [3/6] Generating i915_tests.html with a custom command.
  [4/6] Generating intel-ci-tests with a custom command.
  [5/6] Generating kms_tests.rst with a custom command.
  FAILED: docs/testplan/kms_tests.rst 
  /builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
  Warning: Documented igt@kms_plane@pixel-format doesn't exist on source files
  Warning: Missing documentation for igt@kms_plane@pixel-format-black-white
  Warning: Missing documentation for igt@kms_plane@pixel-format-colors
  Please refer: docs/test_documentation.md for more details
  ninja: build stopped: subcommand failed.
  section_end:1709748306:step_script
  section_start:1709748306:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1709748306:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955058):
  ninja: build stopped: subcommand failed.
  ninja: Entering directory `build'
  [1/821] Generating version.h with a custom command.
  [2/6] Linking target runner/runner_test.
  [3/6] Generating i915_tests.html with a custom command.
  [4/6] Generating intel-ci-tests with a custom command.
  [5/6] Generating kms_tests.rst with a custom command.
  FAILED: docs/testplan/kms_tests.rst 
  /builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
  Warning: Documented igt@kms_plane@pixel-format doesn't exist on source files
  Warning: Missing documentation for igt@kms_plane@pixel-format-black-white
  Warning: Missing documentation for igt@kms_plane@pixel-format-colors
  Please refer: docs/test_documentation.md for more details
  ninja: build stopped: subcommand failed.
  section_end:1709748299:step_script
  section_start:1709748299:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1709748300:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955059):
  [1790/1793] Compiling C object 'runner/runner@@runner_test@exe/runner_tests.c.o'.
  ninja: build stopped: subcommand failed.
  ninja: Entering directory `build'
  [1/821] Generating version.h with a custom command.
  [2/6] Linking target runner/runner_test.
  [3/6] Generating i915_tests.html with a custom command.
  [4/6] Generating kms_tests.rst with a custom command.
  FAILED: docs/testplan/kms_tests.rst 
  /builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
  Warning: Documented igt@kms_plane@pixel-format doesn't exist on source files
  Warning: Missing documentation for igt@kms_plane@pixel-format-black-white
  Warning: Missing documentation for igt@kms_plane@pixel-format-colors
  Please refer: docs/test_documentation.md for more details
  ninja: build stopped: subcommand failed.
  section_end:1709748292:step_script
  section_start:1709748292:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1709748292:cleanup_file_variables
  ERROR: Job failed: exit code 1

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1121225

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ✗ GitLab.Pipeline: warning for Enable more tests for VKMS
  2024-03-06 18:07 ` ✗ GitLab.Pipeline: warning " Patchwork
@ 2024-03-08  9:00   ` Louis Chauvet
  0 siblings, 0 replies; 13+ messages in thread
From: Louis Chauvet @ 2024-03-08  9:00 UTC (permalink / raw)
  To: igt-dev

Hi,

I think this is because I forgot to document the tests. As the command 

	ninja igt-gpu-tools-doc

worked fine, I did not notice it. Is there a different command to run to 
check the validity of the documentation?

Once I've received feedback on the rest of the series, I'll send out a v2 
with the test documentation:

 /**
  * SUBTEST: pixel-%s
  * Description: verify the pixel formats for given plane and pipe
  * Functionality: pixel_formats, plane
  *
  * arg[1]:
  *
- * @format:
+ * @format-colors:			test colors (RGB, YUV) formats
+ * @format-black-white:			test the black and white formats
  * @format-source-clamping:          with source clamping
  */


Kind regards,
Louis Chauvet

Le 06/03/24 - 18:07, Patchwork a écrit :
> == Series Details ==
> 
> Series: Enable more tests for VKMS
> URL   : https://patchwork.freedesktop.org/series/130818/
> State : warning
> 
> == Summary ==
> 
> Pipeline status: FAILED.
> 
> see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1121225 for the overview.
> 
> build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955062):
>   Checking if the user of the pipeline is allowed...
>   Checking if the job's project is part of a well-known group...
>   Thank you for contributing to freedesktop.org
>   Fetching changes...
>   Reinitialized existing Git repository in /builds/gfx-ci/igt-ci-tags/.git/
>   Checking out 69fbed73 as detached HEAD (ref is intel/IGTPW_10789)...
>   Removing build/
>   Removing lib/i915/perf-configs/__pycache__/
>   Removing scripts/__pycache__/
>   
>   Skipping Git submodules setup
>   section_end:1709748272:get_sources
>   section_start:1709748272:step_script
>   Executing "step_script" stage of the job script
>   Using docker image sha256:ca01fc804bb92e5df42a202dd7e0470610c6711c66a808525defcb8bbb774078 for registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian:commit-69fbed7368fcb3c662c803ba0c46d6c7c672dfee with digest registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian@sha256:b9fe73c6ff5d68f5692fd18b9076735679c8bfa7ed393e752dd4927a2cdf9874 ...
>   section_end:1709748274:step_script
>   section_start:1709748274:cleanup_file_variables
>   Cleaning up project directory and file based variables
>   section_end:1709748275:cleanup_file_variables
>   ERROR: Job failed (system failure): Error response from daemon: no such image: docker.io/library/sha256:ca01fc804bb92e5df42a202dd7e0470610c6711c66a808525defcb8bbb774078: image not known (docker.go:570:0s)
> 
> build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955057):
>   [1790/1793] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
>   ninja: build stopped: subcommand failed.
>   ninja: Entering directory `build'
>   [1/821] Generating version.h with a custom command.
>   [2/6] Linking target runner/runner_test.
>   [3/6] Generating i915_tests.html with a custom command.
>   [4/6] Generating kms_tests.rst with a custom command.
>   FAILED: docs/testplan/kms_tests.rst 
>   /builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
>   Warning: Documented igt@kms_plane@pixel-format doesn't exist on source files
>   Warning: Missing documentation for igt@kms_plane@pixel-format-black-white
>   Warning: Missing documentation for igt@kms_plane@pixel-format-colors
>   Please refer: docs/test_documentation.md for more details
>   ninja: build stopped: subcommand failed.
>   section_end:1709748299:step_script
>   section_start:1709748299:cleanup_file_variables
>   Cleaning up project directory and file based variables
>   section_end:1709748300:cleanup_file_variables
>   ERROR: Job failed: exit code 1
>   
> 
> build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955061):
>   [1791/1793] Generating xe_tests.html with a custom command.
>   ninja: build stopped: subcommand failed.
>   ninja: Entering directory `build'
>   [1/821] Generating version.h with a custom command.
>   [2/5] Generating intel-ci-tests with a custom command.
>   [3/5] Generating i915_tests.html with a custom command.
>   [4/5] Generating kms_tests.rst with a custom command.
>   FAILED: docs/testplan/kms_tests.rst 
>   /builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
>   Warning: Documented igt@kms_plane@pixel-format doesn't exist on source files
>   Warning: Missing documentation for igt@kms_plane@pixel-format-black-white
>   Warning: Missing documentation for igt@kms_plane@pixel-format-colors
>   Please refer: docs/test_documentation.md for more details
>   ninja: build stopped: subcommand failed.
>   section_end:1709748326:step_script
>   section_start:1709748326:cleanup_file_variables
>   Cleaning up project directory and file based variables
>   section_end:1709748328:cleanup_file_variables
>   ERROR: Job failed: exit code 1
>   
> 
> build:tests-fedora-no-libdrm-nouveau has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955060):
>   ninja: build stopped: subcommand failed.
>   ninja: Entering directory `build'
>   [1/771] Generating version.h with a custom command.
>   [2/6] Linking target runner/runner_test.
>   [3/6] Generating i915_tests.html with a custom command.
>   [4/6] Generating intel-ci-tests with a custom command.
>   [5/6] Generating kms_tests.rst with a custom command.
>   FAILED: docs/testplan/kms_tests.rst 
>   /builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
>   Warning: Documented igt@kms_plane@pixel-format doesn't exist on source files
>   Warning: Missing documentation for igt@kms_plane@pixel-format-black-white
>   Warning: Missing documentation for igt@kms_plane@pixel-format-colors
>   Please refer: docs/test_documentation.md for more details
>   ninja: build stopped: subcommand failed.
>   section_end:1709748306:step_script
>   section_start:1709748306:cleanup_file_variables
>   Cleaning up project directory and file based variables
>   section_end:1709748306:cleanup_file_variables
>   ERROR: Job failed: exit code 1
>   
> 
> build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955058):
>   ninja: build stopped: subcommand failed.
>   ninja: Entering directory `build'
>   [1/821] Generating version.h with a custom command.
>   [2/6] Linking target runner/runner_test.
>   [3/6] Generating i915_tests.html with a custom command.
>   [4/6] Generating intel-ci-tests with a custom command.
>   [5/6] Generating kms_tests.rst with a custom command.
>   FAILED: docs/testplan/kms_tests.rst 
>   /builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
>   Warning: Documented igt@kms_plane@pixel-format doesn't exist on source files
>   Warning: Missing documentation for igt@kms_plane@pixel-format-black-white
>   Warning: Missing documentation for igt@kms_plane@pixel-format-colors
>   Please refer: docs/test_documentation.md for more details
>   ninja: build stopped: subcommand failed.
>   section_end:1709748299:step_script
>   section_start:1709748299:cleanup_file_variables
>   Cleaning up project directory and file based variables
>   section_end:1709748300:cleanup_file_variables
>   ERROR: Job failed: exit code 1
>   
> 
> build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55955059):
>   [1790/1793] Compiling C object 'runner/runner@@runner_test@exe/runner_tests.c.o'.
>   ninja: build stopped: subcommand failed.
>   ninja: Entering directory `build'
>   [1/821] Generating version.h with a custom command.
>   [2/6] Linking target runner/runner_test.
>   [3/6] Generating i915_tests.html with a custom command.
>   [4/6] Generating kms_tests.rst with a custom command.
>   FAILED: docs/testplan/kms_tests.rst 
>   /builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
>   Warning: Documented igt@kms_plane@pixel-format doesn't exist on source files
>   Warning: Missing documentation for igt@kms_plane@pixel-format-black-white
>   Warning: Missing documentation for igt@kms_plane@pixel-format-colors
>   Please refer: docs/test_documentation.md for more details
>   ninja: build stopped: subcommand failed.
>   section_end:1709748292:step_script
>   section_start:1709748292:cleanup_file_variables
>   Cleaning up project directory and file based variables
>   section_end:1709748292:cleanup_file_variables
>   ERROR: Job failed: exit code 1
> 
> == Logs ==
> 
> For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1121225

-- 
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-03-08  9:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-06 17:28 [PATCH i-g-t 0/9] Enable more tests for VKMS Louis Chauvet
2024-03-06 17:28 ` [PATCH i-g-t 1/9] tests/kms_rotation_crc: Remove intel guards Louis Chauvet
2024-03-06 17:28 ` [PATCH i-g-t 2/9] tests/kms_plane: Fix some formatting and alignment Louis Chauvet
2024-03-06 17:28 ` [PATCH i-g-t 3/9] tests/kms_plane: Rename test_planar_settings to test_odd_size_with_yuv and remove intel guards Louis Chauvet
2024-03-06 17:28 ` [PATCH i-g-t 4/9] lib/color_encoding: Add support for NV24 and NV42 pixel formats Louis Chauvet
2024-03-06 17:28 ` [PATCH i-g-t 5/9] tests/kms_plane: Use a complex pattern to test plane color conversion Louis Chauvet
2024-03-06 17:28 ` [PATCH i-g-t 6/9] tests/kms_plane: Use the square pattern even when using multiple planes Louis Chauvet
2024-03-06 17:28 ` [PATCH i-g-t 7/9] lib/igt_fb: Add DRM_FORMAT_R1 support Louis Chauvet
2024-03-06 17:28 ` [PATCH i-g-t 8/9] tests/kms_plane: Allow choosing the number of colors when drawing the color array Louis Chauvet
2024-03-06 17:28 ` [PATCH i-g-t 9/9] tests/kms_plane: Add black and white test Louis Chauvet
2024-03-06 17:53 ` ✗ Fi.CI.BUILD: failure for Enable more tests for VKMS Patchwork
2024-03-06 18:07 ` ✗ GitLab.Pipeline: warning " Patchwork
2024-03-08  9:00   ` Louis Chauvet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox