public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/kms: Set display->has_plane_color_pipeline automatically
@ 2026-04-27 14:19 John Harrison
  2026-04-28  0:04 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: John Harrison @ 2026-04-27 14:19 UTC (permalink / raw)
  To: igt-dev

The pipeline presence flag was stored in the display object and used
by multiple tests. However, each test would explicitly set the flag
itself immediately after requiring the display. Except for
the kms_properties test which used it but never actually set it (and
therefore was not correctly testing color pipelines).

So instead, set it in the display require function next to other
property flag detections.

Signed-off-by: John Harrison <John.Harrison@Igalia.com>
---
 lib/igt_kms.c              | 2 ++
 tests/kms_color_pipeline.c | 5 -----
 tests/kms_colorop.c        | 4 ----
 3 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 38c28f45f..d2e96d1ef 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -3194,6 +3194,8 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 
 	if (drmSetClientCap(drm_fd, LOCAL_DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT, 1) == 0)
 		display->has_virt_cursor_plane = 1;
+	if (drmSetClientCap(drm_fd, DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE, 1) == 0)
+		display->has_plane_color_pipeline = 1;
 
 	plane_resources = drmModeGetPlaneResources(display->drm_fd);
 	igt_assert(plane_resources);
diff --git a/tests/kms_color_pipeline.c b/tests/kms_color_pipeline.c
index 78860a845..6119a830f 100644
--- a/tests/kms_color_pipeline.c
+++ b/tests/kms_color_pipeline.c
@@ -349,7 +349,6 @@ run_tests_for_plane(data_t *data)
 
 int igt_main()
 {
-	int has_plane_color_pipeline = 0;
 	data_t data = {};
 
 	igt_fixture() {
@@ -364,13 +363,9 @@ int igt_main()
 		if (drmSetClientCap(data.drm_fd, DRM_CLIENT_CAP_ATOMIC, 1) == 0)
 			data.display.is_atomic = 1;
 
-		if (drmSetClientCap(data.drm_fd, DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE, 1) == 0)
-			has_plane_color_pipeline = 1;
-
 		kmstest_set_vt_graphics_mode();
 
 		igt_display_require(&data.display, data.drm_fd);
-		data.display.has_plane_color_pipeline = has_plane_color_pipeline;
 		igt_require(data.display.is_atomic);
 	}
 
diff --git a/tests/kms_colorop.c b/tests/kms_colorop.c
index 16db0b8ad..4db83470d 100644
--- a/tests/kms_colorop.c
+++ b/tests/kms_colorop.c
@@ -418,14 +418,10 @@ int igt_main_args("d", long_options, help_str, opt_handler, NULL)
 		igt_require_f(!ret, "error setting DRM_CLIENT_CAP_WRITEBACK_CONNECTORS\n");
 
 		igt_display_require(&display, display.drm_fd);
-		if (drmSetClientCap(display.drm_fd, DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE, 1) == 0)
-			display.has_plane_color_pipeline = 1;
 
 		kmstest_set_vt_graphics_mode();
 
 		igt_display_require(&display, display.drm_fd);
-		if (drmSetClientCap(display.drm_fd, DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE, 1) == 0)
-			display.has_plane_color_pipeline = 1;
 
 		igt_require(display.is_atomic);
 	}
-- 
2.43.0


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

end of thread, other threads:[~2026-04-28 16:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 14:19 [PATCH i-g-t] lib/kms: Set display->has_plane_color_pipeline automatically John Harrison
2026-04-28  0:04 ` ✓ i915.CI.BAT: success for " Patchwork
2026-04-28  0:37 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-28  6:43 ` ✓ i915.CI.Full: " Patchwork
2026-04-28  7:37 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-28 16:38   ` John Harrison
2026-04-28  8:50 ` [PATCH i-g-t] " Kamil Konieczny

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