All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH v5] tests/kms_vblank: Turn on hardware before testing invalid vblank.
@ 2021-06-24 17:35 Mark Yacoub
  2021-06-28 14:44 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_vblank: Turn on hardware before testing invalid vblank. (rev7) Patchwork
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Mark Yacoub @ 2021-06-24 17:35 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala, seanpaul, Mark Yacoub

From: Mark Yacoub <markyacoub@google.com>

[Why]
Before any hardware is on, the vblank is off and its ref counter is in
an initialized state as each driver handles toggling it differently.
Ioctl DRM_IOCTL_WAIT_VBLANK could return 0 such as on i915, or an invalid
integer that doesn't mean much, such as on Zork running Kernel 5.4 due
to the kernel workaround that increments the vblank ref count to prevent
a get from enabling the interrupt.

[How]
For invalid_subtest(), active the CRTCs to turn the hardware on so
DRM_IOCTL_WAIT_VBLANK returns something meaningful.

Changes since v4:
Use igt_get_single_output_for_pipe to get igt_output_t.

Changes since v3:
Turn on only 1 output instead of all.

Changes since v2:
1. Updated Signed-off-by.

Changes since v1:
1. Update Commit message
2. Rename variable p to pipe_number

Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
---
 tests/kms_vblank.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index 93b01eba..b709ef69 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -475,8 +475,12 @@ static void invalid_subtest(data_t *data, int fd)
 {
 	union drm_wait_vblank vbl;
 	unsigned long valid_flags;
+	igt_display_t* display = &data->display;
+	enum pipe pipe = 0;
+	igt_output_t* output = igt_get_single_output_for_pipe(display, pipe);
 
-	igt_display_require_output_on_pipe(&data->display, 0);
+	igt_display_require_output_on_pipe(display, pipe);
+	prepare_crtc(data, fd, output);
 
 	/* First check all is well with a simple query */
 	memset(&vbl, 0, sizeof(vbl));
@@ -511,6 +515,8 @@ 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.32.0.93.g670b81a890-goog

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

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

end of thread, other threads:[~2021-07-23 13:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 17:35 [igt-dev] [PATCH v5] tests/kms_vblank: Turn on hardware before testing invalid vblank Mark Yacoub
2021-06-28 14:44 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_vblank: Turn on hardware before testing invalid vblank. (rev7) Patchwork
2021-06-28 15:51 ` [igt-dev] [PATCH v5] tests/kms_vblank: Turn on hardware before testing invalid vblank Rodrigo Siqueira
2021-06-28 18:31 ` [igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_vblank: Turn on hardware before testing invalid vblank. (rev7) Patchwork
2021-07-01 21:12   ` Arkadiusz Hiler
2021-07-14 18:27 ` [igt-dev] [PATCH] tests/kms_vblank: Turn on hardware before testing invalid vblank Mark Yacoub
2021-07-14 18:30 ` [igt-dev] [PATCH v6] " Mark Yacoub
2021-07-23 13:45   ` Rodrigo Siqueira
2021-07-15 13:05 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_vblank: Turn on hardware before testing invalid vblank. (rev9) Patchwork
2021-07-15 16:40 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-07-15 17:11   ` Mark Yacoub
2021-07-15 17:45 ` Patchwork
2021-07-15 17:53 ` Patchwork
2021-07-15 18:29 ` Patchwork
2021-07-15 18:51 ` Patchwork
2021-07-15 21:43 ` Patchwork
2021-07-16  6:55 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.