public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/6] tests/kms_vblank: Make sure that we have a mode set
@ 2020-04-03 13:03 Arkadiusz Hiler
  2020-04-03 13:03 ` [igt-dev] [PATCH i-g-t 2/6] tests/kms_dp_dsc: Explicitly enable mode before DSC checks Arkadiusz Hiler
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-04-03 13:03 UTC (permalink / raw)
  To: igt-dev

Subtest 'invalid' was depending on a "leftover" mode set by something
external (usually fbcon) in order to work.

Let's make the test more robust by setting the mode explicitly.

Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 tests/kms_vblank.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index a895ab80..edf8581e 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -472,9 +472,22 @@ static void invalid_subtest(data_t *data, int fd)
 {
 	union drm_wait_vblank vbl;
 	unsigned long valid_flags;
+	enum pipe pipe;
+	igt_output_t* output;
+	bool found = false;
 
 	igt_display_require_output_on_pipe(&data->display, 0);
 
+	/* we need to have a mode set, otherwise we will get EINVAL no matter what */
+	for_each_pipe_with_single_output(&data->display, pipe, output) {
+		data->pipe = pipe;
+		found = true;
+		break;
+	}
+
+	igt_require_f(found, "No outputs connected = no vblanks\n");
+	prepare_crtc(data, fd, output);
+
 	/* First check all is well with a simple query */
 	memset(&vbl, 0, sizeof(vbl));
 	vbl.request.type = DRM_VBLANK_RELATIVE;
@@ -508,6 +521,7 @@ static void invalid_subtest(data_t *data, int fd)
 	vbl.request.type |= _DRM_VBLANK_SECONDARY;
 	vbl.request.type |= _DRM_VBLANK_FLAGS_MASK;
 	igt_assert_eq(wait_vblank(fd, &vbl), -EINVAL);
+	cleanup_crtc(data, fd, output);
 }
 
 igt_main
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2020-04-06 12:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-03 13:03 [igt-dev] [PATCH i-g-t 1/6] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
2020-04-03 13:03 ` [igt-dev] [PATCH i-g-t 2/6] tests/kms_dp_dsc: Explicitly enable mode before DSC checks Arkadiusz Hiler
2020-04-06  9:50   ` Imre Deak
2020-04-03 13:03 ` [igt-dev] [PATCH i-g-t 3/6] lib/kms: Commit reasonable defaults on display init Arkadiusz Hiler
2020-04-03 13:03 ` [igt-dev] [PATCH i-g-t 4/6] lib/kms: Reprobe connector state after disabling modest Arkadiusz Hiler
2020-04-03 13:03 ` [igt-dev] [PATCH i-g-t 5/6] tests/kms_chamelium: Issue disabling modeset when resetting state Arkadiusz Hiler
2020-04-03 13:03 ` [igt-dev] [PATCH i-g-t 6/6] tests/kms_chamelium: Test HPD for different mode handling scenarios Arkadiusz Hiler
2020-04-03 14:41 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] tests/kms_vblank: Make sure that we have a mode set Patchwork
2020-04-03 21:43 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-04-06  9:11 ` [igt-dev] [PATCH i-g-t 1/6] " Imre Deak
2020-04-06 12:38   ` Arkadiusz Hiler

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