public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: John Harrison <John.Harrison@Igalia.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t] lib/kms: Set display->has_plane_color_pipeline automatically
Date: Mon, 27 Apr 2026 07:19:05 -0700	[thread overview]
Message-ID: <20260427141905.2535060-1-John.Harrison@Igalia.com> (raw)

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


             reply	other threads:[~2026-04-27 14:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 14:19 John Harrison [this message]
2026-04-28  0:04 ` ✓ i915.CI.BAT: success for lib/kms: Set display->has_plane_color_pipeline automatically 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260427141905.2535060-1-John.Harrison@Igalia.com \
    --to=john.harrison@igalia.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox