public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Pranay Samala <pranay.samala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: karthik.b.s@intel.com, sameer.lattannavar@intel.com,
	pranay.samala@intel.com
Subject: [PATCH i-g-t] tests/kms_plane: Optimize modifier check for unsupported platforms
Date: Tue, 17 Feb 2026 11:26:06 +0530	[thread overview]
Message-ID: <20260217055606.1595789-1-pranay.samala@intel.com> (raw)

Optimize the modifier check by moving it outside the CRTC/Output loop.
This avoids redundancy and ensures the test is cleanly skipped.

Fixes: a4805b36cf23 ("tests/kms_plane: Skip unsupported modifiers")
Signed-off-by: Pranay Samala <pranay.samala@intel.com>
---
 tests/kms_plane.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 362748cdb..f37b019d1 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -1489,18 +1489,14 @@ static void run_test(data_t *data, void (*test)(data_t *, enum pipe))
 	igt_crtc_t *crtc;
 	int count = 0;
 
+	igt_skip_on_f(((data->flags & TEST_PIXEL_FORMAT) &&
+		       !igt_display_has_format_mod(&data->display,
+		       DRM_FORMAT_XBGR8888, data->mod)),
+		       "Skipping: Modifier " IGT_MODIFIER_FMT
+		       " is not supported on this platform\n",
+		       IGT_MODIFIER_ARGS(data->mod));
+
 	for_each_crtc_with_single_output(&data->display, crtc, data->output) {
-		if ((data->flags & TEST_PIXEL_FORMAT) &&
-		    !igt_display_has_format_mod(&data->display,
-						DRM_FORMAT_XBGR8888,
-						data->mod)) {
-			igt_info("Skipping: Modifier " IGT_MODIFIER_FMT
-				 " is not supported on pipe %s, output %s\n",
-				 IGT_MODIFIER_ARGS(data->mod),
-				 kmstest_pipe_name(crtc->pipe),
-				 igt_output_name(data->output));
-			continue;
-		}
 
 		igt_display_reset(&data->display);
 
-- 
2.34.1


             reply	other threads:[~2026-02-17  5:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17  5:56 Pranay Samala [this message]
2026-02-17 12:29 ` ✓ Xe.CI.BAT: success for tests/kms_plane: Optimize modifier check for unsupported platforms Patchwork
2026-02-17 12:37 ` ✓ i915.CI.BAT: " Patchwork
2026-02-17 13:47 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-02-17 15:23 ` ✗ i915.CI.Full: " Patchwork
2026-02-18  3:57 ` [PATCH i-g-t] " Karthik B S

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=20260217055606.1595789-1-pranay.samala@intel.com \
    --to=pranay.samala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@intel.com \
    --cc=sameer.lattannavar@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