Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: chaitanya.kumar.borah@intel.com,
	Swati Sharma <swati2.sharma@intel.com>,
	Naladala Ramanaidu <ramanaidu.naladala@intel.com>
Subject: [PATCH i-g-t, v2] tests/kms_hdr: Use non-modeset commit for HDR metadata swaps
Date: Sat,  6 Jun 2026 00:51:49 +0530	[thread overview]
Message-ID: <20260605192149.2601366-1-swati2.sharma@intel.com> (raw)

HDR metadata transitions (mastering info change within HDR, and
HDR-to-SDR via metadata) should only update infoframe content and
not require a full modeset. Remove the is_amdgpu_device() conditional
and use flags=0 (no DRM_MODE_ATOMIC_ALLOW_MODESET) for both drivers.

When DSC is forced for the SDR transition, use a full modeset since
forcing DSC changes compression parameters that require a modeset.

v2:
 - Use full modeset when TEST_NEEDS_DSC is set for the SDR transition
   instead of documenting it as a known issue

Assisted-by: GitHub Copilot:Claude Opus 4.6
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com>
---
 tests/kms_hdr.c | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
index affd38887..d786f7f9c 100644
--- a/tests/kms_hdr.c
+++ b/tests/kms_hdr.c
@@ -459,32 +459,28 @@ static void test_static_swap(data_t *data, igt_crtc_t *crtc,
 
 	igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
 
-	/* Change the mastering information, no modeset allowed
-	 * for amd driver, whereas a modeset is required for intel
-	 * driver. */
+	/* Change the mastering information, no modeset required
+	 * as only infoframe content changes. */
 	hdr.hdmi_metadata_type1.max_display_mastering_luminance = 200;
 	hdr.hdmi_metadata_type1.max_fall = 200;
 	hdr.hdmi_metadata_type1.max_cll = 100;
 
 	igt_hdr_set_metadata(data->output, &hdr);
-	if (is_amdgpu_device(data->fd))
-		igt_display_commit_atomic(display, 0, NULL);
-	else
-		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+	igt_display_commit_atomic(display, 0, NULL);
 
 	if (flags & TEST_NEEDS_DSC) {
 		igt_force_dsc_enable(data->fd, data->output->name);
 		igt_assert(igt_is_force_dsc_enabled(data->fd, data->output->name));
 	}
-	/* Enter SDR via metadata, no modeset allowed for
-	 * amd driver, whereas a modeset is required for
-	 * intel driver. */
+	/* Enter SDR via metadata. When DSC is forced, a full modeset
+	 * is needed due to DSC parameter changes; otherwise only
+	 * infoframe content changes. */
 	igt_hdr_fill_sdr(&hdr);
 	igt_hdr_set_metadata(data->output, &hdr);
-	if (is_amdgpu_device(data->fd))
-		igt_display_commit_atomic(display, 0, NULL);
-	else
+	if (flags & TEST_NEEDS_DSC)
 		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+	else
+		igt_display_commit_atomic(display, 0, NULL);
 	igt_debug_interactive_mode_check("traditional-sdr",
 					 "SDR pattern displayed with traditional SDR metadata");
 
-- 
2.25.1


             reply	other threads:[~2026-06-05 19:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05 19:21 Swati Sharma [this message]
2026-06-05 20:49 ` ✓ Xe.CI.BAT: success for tests/kms_hdr: Use non-modeset commit for HDR metadata swaps (rev2) Patchwork
2026-06-05 21:08 ` ✓ i915.CI.BAT: " Patchwork
2026-06-06 10:12 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-06-06 14:36 ` ✗ i915.CI.Full: " Patchwork
2026-06-09  8:11 ` [PATCH i-g-t,v2] tests/kms_hdr: Use non-modeset commit for HDR metadata swaps Borah, Chaitanya Kumar

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=20260605192149.2601366-1-swati2.sharma@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ramanaidu.naladala@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