Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gil Dekel <gildekel@google.com>
To: igt-dev@lists.freedesktop.org
Cc: Gil Dekel <gildekel@google.com>, Melissa Wen <mwen@igalia.com>,
	 Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
	Swati Sharma <swati2.sharma@intel.com>,
	 Mark Yacoub <markyacoub@google.com>
Subject: [PATCH i-g-t 2/2] lib/igt_kms: Reset connector Colorspace
Date: Sat, 14 Nov 2026 17:29:02 -0500	[thread overview]
Message-ID: <20261114222902.1404033-3-gildekel@google.com> (raw)
In-Reply-To: <20261114222902.1404033-1-gildekel@google.com>

igt_display_reset() leaves the connector Colorspace property alone, so
tests inherit whatever the previous KMS client set. After a compositor
that drove an HDR eDP panel exits, the connector can stay at
BT2020_RGB. The next test then sends BT.2020 colorimetry to the sink
while it renders plain sRGB content.

Track Colorspace as IGT_CONNECTOR_COLORSPACE and set it back to
"Default" in igt_output_reset(), next to HDR_OUTPUT_METADATA. Use
igt_output_try_prop_enum() so a driver whose enum lacks "Default" can't
abort the reset.

Cc: Melissa Wen <mwen@igalia.com>
Cc: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Cc: Swati Sharma <swati2.sharma@intel.com>
Cc: Mark Yacoub <markyacoub@google.com>
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Gil Dekel <gildekel@google.com>
---

Notes:
    The new enum entry is indented with a tab to keep checkpatch quiet
    (LEADING_SPACE), while the existing entries in this block use
    spaces. Happy to switch it to spaces to match.

 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 541dd8c35..af8c0ff0e 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -759,6 +759,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[] = {
@@ -2763,6 +2764,10 @@ static void igt_output_reset(igt_output_t *output)
 	if (igt_output_has_prop(output, IGT_CONNECTOR_DITHERING_MODE))
 		igt_output_set_prop_enum(output, IGT_CONNECTOR_DITHERING_MODE,
 					 "off");
+
+	if (igt_output_has_prop(output, IGT_CONNECTOR_COLORSPACE))
+		igt_output_try_prop_enum(output, IGT_CONNECTOR_COLORSPACE,
+					 "Default");
 }
 
 /**
@@ -2778,6 +2783,7 @@ static void igt_output_reset(igt_output_t *output)
  *   %IGT_CONNECTOR_CONTENT_PROTECTION (if applicable)
  *   %IGT_CONNECTOR_HDR_OUTPUT_METADATA (if applicable)
  * - %IGT_CONNECTOR_DITHERING_MODE (if applicable)
+ * - %IGT_CONNECTOR_COLORSPACE (if applicable)
  * - igt_output_override_mode() to default.
  *
  * For pipes:
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index dfcb91e02..e6326dea8 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -201,6 +201,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
 };
 
-- 
Gil Dekel, Software Engineer, Google / ChromeOS Display and Graphics


  parent reply	other threads:[~2026-11-16  5:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 22:29 [PATCH i-g-t 0/2] lib/igt_kms: Reset leftover KMS color state Gil Dekel
2026-11-14 22:29 ` [PATCH i-g-t 1/2] lib/igt_kms: Reset leftover COLOR_PIPELINE Gil Dekel
2026-11-14 22:29 ` Gil Dekel [this message]
2026-11-15  0:18 ` [PATCH i-g-t v2 0/2] lib/igt_kms: Reset leftover color state Gil Dekel
2026-11-15  0:18   ` [PATCH i-g-t v2 1/2] lib/igt_kms: Reset leftover COLOR_PIPELINE Gil Dekel
2026-11-15  0:18   ` [PATCH i-g-t v2 2/2] lib/igt_kms: Reset connector Colorspace Gil Dekel
2026-11-16  8:36 ` ✓ Xe.CI.BAT: success for lib/igt_kms: Reset leftover KMS color state Patchwork
2026-11-16  8:43 ` ✓ i915.CI.BAT: " Patchwork
2026-11-16 10:56 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-11-16 12:23 ` ✗ i915.CI.Full: " 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=20261114222902.1404033-3-gildekel@google.com \
    --to=gildekel@google.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=markyacoub@google.com \
    --cc=mwen@igalia.com \
    --cc=swati2.sharma@intel.com \
    /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