public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Nidhi Gupta <nidhi1.gupta@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Nidhi Gupta <nidhi1.gupta@intel.com>
Subject: [igt-dev] [PATCH i-g-t] tests/kms_invalid_mode: Fix the test for legacy platform
Date: Thu,  3 Nov 2022 08:54:58 +0530	[thread overview]
Message-ID: <1667445898-20552-1-git-send-email-nidhi1.gupta@intel.com> (raw)

-Cleanup up the display state before starting the subtest.
-Execute the tests only for 5 modes.
-Use primary plane to set the framebuffer.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
---
 tests/kms_invalid_mode.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c
index f1c3866..492c92c 100644
--- a/tests/kms_invalid_mode.c
+++ b/tests/kms_invalid_mode.c
@@ -184,6 +184,7 @@ test_output(data_t *data)
 	struct igt_fb fb;
 	int ret;
 	drmModeModeInfo *mode;
+	igt_plane_t *primary;
 
 	igt_display_reset(&data->display);
 	igt_output_set_pipe(output, data->pipe);
@@ -192,7 +193,14 @@ test_output(data_t *data)
 		      DRM_FORMAT_MOD_LINEAR,
 		      &fb);
 
+	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	igt_plane_set_fb(primary, &fb);
+
 	for_each_connector_mode(output) {
+		igt_output_override_mode(output, NULL);
+		igt_display_commit(&data->display);
+		if (j__ > 5)
+			break;
 		mode = &output->config.connector->modes[j__];
 		igt_require(data->adjust_mode(data, mode));
 		igt_output_override_mode(output, mode);
@@ -200,9 +208,11 @@ test_output(data_t *data)
 		igt_assert(ret == -EINVAL);
 	}
 
+	/* Cleanup */
 	igt_remove_fb(data->drm_fd, &fb);
+	igt_plane_set_fb(primary, NULL);
 	igt_output_override_mode(output, NULL);
-	/*unset_all_crtcs*/
+	igt_output_set_pipe(output, PIPE_NONE);
 	igt_display_commit(&data->display);
 }
 
-- 
1.9.1

             reply	other threads:[~2022-11-03  3:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03  3:24 Nidhi Gupta [this message]
2022-11-03  4:01 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_invalid_mode: Fix the test for legacy platform Patchwork
2022-11-03  9:30 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
2022-11-03  9:46   ` Gupta, Nidhi1
2022-11-03  9:51     ` Ville Syrjälä
2022-11-03 10:16       ` Gupta, Nidhi1
2022-11-03 10:20         ` Ville Syrjälä

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=1667445898-20552-1-git-send-email-nidhi1.gupta@intel.com \
    --to=nidhi1.gupta@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