Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: SKIP subtest if num_planes < 2
@ 2023-03-24  8:52 Swati Sharma
  2023-03-24  8:58 ` Luca Coelho
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Swati Sharma @ 2023-03-24  8:52 UTC (permalink / raw)
  To: igt-dev

Min 2 planes required for planes combo scaling test. Add that
check before executing the sub-test.

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/kms_plane_scaling.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 8e988058d..69df6d9aa 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -732,12 +732,16 @@ test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
 {
 	igt_display_t *display = &d->display;
 	drmModeModeInfo *mode;
+	int n_planes;
 
 	cleanup_crtc(d);
 
 	igt_output_set_pipe(output, pipe);
 	mode = igt_output_get_mode(output);
 
+	n_planes = display->pipes[pipe].n_planes;
+	igt_require(n_planes >= 2);
+
 	switch (test_type) {
 	case TEST_PLANES_UPSCALE:
 		setup_fb(display->drm_fd, w1, h1, 1.0, 0.0, 0.0, &d->fb[1]);
@@ -759,7 +763,7 @@ test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
 		igt_assert(0);
 	}
 
-	for (int k = 0; k < display->pipes[pipe].n_planes - 1; k += 2) {
+	for (int k = 0; k < n_planes - 1; k += 2) {
 		igt_plane_t *p1, *p2;
 
 		p1 = &display->pipes[pipe].planes[k];
-- 
2.25.1

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

end of thread, other threads:[~2023-03-24 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-24  8:52 [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: SKIP subtest if num_planes < 2 Swati Sharma
2023-03-24  8:58 ` Luca Coelho
2023-03-24  9:40 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-03-24 15:29 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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