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
Subject: [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: SKIP subtest if num_planes < 2
Date: Fri, 24 Mar 2023 14:22:59 +0530	[thread overview]
Message-ID: <20230324085259.30854-1-swati2.sharma@intel.com> (raw)

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

             reply	other threads:[~2023-03-24  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24  8:52 Swati Sharma [this message]
2023-03-24  8:58 ` [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: SKIP subtest if num_planes < 2 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

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=20230324085259.30854-1-swati2.sharma@intel.com \
    --to=swati2.sharma@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