public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms_bw: use igt_display_n_crtcs()
@ 2026-04-20  8:09 Jani Nikula
  2026-04-20  9:55 ` Karthik B S
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jani Nikula @ 2026-04-20  8:09 UTC (permalink / raw)
  To: igt-dev; +Cc: jani.nikula

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-21 19:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-20  8:09 [PATCH i-g-t] tests/kms_bw: use igt_display_n_crtcs() Jani Nikula
2026-04-20  9:55 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox