public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Swati Sharma <swati2.sharma@intel.com>
Subject: [PATCH i-g-t 1/2] lib/igt_kms: Add Colorspace connector property support
Date: Mon, 27 Apr 2026 16:25:13 +0530	[thread overview]
Message-ID: <20260427105514.2239876-2-swati2.sharma@intel.com> (raw)
In-Reply-To: <20260427105514.2239876-1-swati2.sharma@intel.com>

Add IGT_CONNECTOR_COLORSPACE enum and its property name mapping, so
that tests can get/set the Colorspace connector property via the
standard IGT property helpers.

Also reset Colorspace to "Default" in igt_output_reset(), preventing
state leaks between subtests when a test changes the colorspace.  The
reset is placed after HDR_OUTPUT_METADATA, consistent with the existing
property ordering.

Update the igt_display_reset() doc comment to list the new property.

Co-developed-by: Claude Opus 4.6 (Anthropic AI)
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 lib/igt_kms.c | 6 ++++++
 lib/igt_kms.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 913116cd8..d92a10586 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -749,6 +749,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
 	[IGT_CONNECTOR_WRITEBACK_FB_ID] = "WRITEBACK_FB_ID",
 	[IGT_CONNECTOR_WRITEBACK_OUT_FENCE_PTR] = "WRITEBACK_OUT_FENCE_PTR",
 	[IGT_CONNECTOR_DITHERING_MODE] = "dithering mode",
+	[IGT_CONNECTOR_COLORSPACE] = "Colorspace",
 };
 
 const char * const igt_rotation_names[] = {
@@ -2761,6 +2762,10 @@ static void igt_output_reset(igt_output_t *output)
 		igt_output_set_prop_value(output,
 					  IGT_CONNECTOR_HDR_OUTPUT_METADATA, 0);
 
+	if (igt_output_has_prop(output, IGT_CONNECTOR_COLORSPACE))
+		igt_output_set_prop_enum(output, IGT_CONNECTOR_COLORSPACE,
+					 "Default");
+
 	if (igt_output_has_prop(output, IGT_CONNECTOR_WRITEBACK_FB_ID))
 		igt_output_set_prop_value(output, IGT_CONNECTOR_WRITEBACK_FB_ID, 0);
 	if (igt_output_has_prop(output, IGT_CONNECTOR_WRITEBACK_OUT_FENCE_PTR)) {
@@ -2784,6 +2789,7 @@ static void igt_output_reset(igt_output_t *output)
  * - %IGT_CONNECTOR_BROADCAST_RGB (if applicable)
  *   %IGT_CONNECTOR_CONTENT_PROTECTION (if applicable)
  *   %IGT_CONNECTOR_HDR_OUTPUT_METADATA (if applicable)
+ * - %IGT_CONNECTOR_COLORSPACE (if applicable)
  * - %IGT_CONNECTOR_DITHERING_MODE (if applicable)
  * - igt_output_override_mode() to default.
  *
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 5f9bdda45..3eda6fdc4 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -191,6 +191,7 @@ enum igt_atomic_connector_properties {
        IGT_CONNECTOR_WRITEBACK_FB_ID,
        IGT_CONNECTOR_WRITEBACK_OUT_FENCE_PTR,
        IGT_CONNECTOR_DITHERING_MODE,
+       IGT_CONNECTOR_COLORSPACE,
        IGT_NUM_CONNECTOR_PROPS
 };
 
-- 
2.25.1


  reply	other threads:[~2026-04-27 10:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 10:55 [PATCH i-g-t 0/2] tests/kms_colorspace: Add Colorspace connector property test Swati Sharma
2026-04-27 10:55 ` Swati Sharma [this message]
2026-04-27 10:55 ` [PATCH i-g-t 2/2] " Swati Sharma
2026-04-29  4:18   ` Bilal, Mohammed
2026-04-27 19:23 ` ✓ i915.CI.BAT: success for " Patchwork
2026-04-27 19:33 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-27 22:55 ` ✗ i915.CI.Full: failure " Patchwork
2026-04-27 23:37 ` ✓ Xe.CI.FULL: success " Patchwork

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=20260427105514.2239876-2-swati2.sharma@intel.com \
    --to=swati2.sharma@intel.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