public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH i-g-t] tests/kms_bw: use igt_display_n_crtcs()
Date: Mon, 20 Apr 2026 11:09:33 +0300	[thread overview]
Message-ID: <20260420080933.2850063-1-jani.nikula@intel.com> (raw)

Now that igt_display_n_crtcs() returns the actual number of CRTCs again,
use it instead of iterating and counting separately.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tests/kms_bw.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tests/kms_bw.c b/tests/kms_bw.c
index 4df5c2cee885..00677b4ae765 100644
--- a/tests/kms_bw.c
+++ b/tests/kms_bw.c
@@ -220,16 +220,12 @@ static void run_test_linear_tiling(data_t *data, int n_crtcs, const drmModeModeI
 	igt_output_t *output;
 	struct igt_fb buffer[IGT_MAX_PIPES];
 	igt_crc_t zero, captured[IGT_MAX_PIPES];
-	int i = 0, num_pipes = 0;
+	int i = 0;
 	igt_crtc_t *crtc;
 	int ret;
 	bool has_supported_mode = false;
 
-	/* Cannot use igt_display_n_crtcs() due to fused pipes on i915 where they do
-	 * not give the numver of valid crtcs and always return IGT_MAX_PIPES */
-	for_each_crtc(display, crtc) num_pipes++;
-
-	igt_skip_on_f(n_crtcs > num_pipes,
+	igt_skip_on_f(n_crtcs > igt_display_n_crtcs(display),
                       "ASIC does not have %d pipes\n", n_crtcs);
 
 	test_init(data, physical);
-- 
2.47.3


             reply	other threads:[~2026-04-20  8:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20  8:09 Jani Nikula [this message]
2026-04-20  9:55 ` [PATCH i-g-t] tests/kms_bw: use igt_display_n_crtcs() Karthik B S
2026-04-21 16:21 ` ✗ i915.CI.BAT: failure for " Patchwork
2026-04-21 17:00 ` ✓ Xe.CI.BAT: success " Patchwork
2026-04-21 19:57 ` ✗ Xe.CI.FULL: failure " 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=20260420080933.2850063-1-jani.nikula@intel.com \
    --to=jani.nikula@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