summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_legacy.c
diff options
context:
space:
mode:
authorNischala Yelchuri <nischala.yelchuri@intel.com>2019-03-13 13:16:35 -0700
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2019-03-22 21:27:40 +0100
commit09796413394c5490c4adfc5cded5d4344af6af17 (patch)
treedf77246d835734e769e1e5ea7c742d34ec0dd49b /tests/kms_cursor_legacy.c
parentba96339c238180b38d05d7fa2dca772d49eee332 (diff)
tests/kms_cursor_legacy: Fix assertion failure due to vblank mismatch
For the !modeset case, after a pageflip is performed on both crtc's, vblank counter is advanced by 1 when compared to its original value. For the modeset case, when pageflips and modesets are interleaved, vblank counter does not always advance by 1 as nonblocking modeset could fail, in which case we do not need vblank_matches. v2: Remove the assert statement instead of changing the condition Cc: Maarten Lankhorst <maarten.lankhorst@intel.com> Signed-off-by: Nischala Yelchuri <nischala.yelchuri@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105454 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'tests/kms_cursor_legacy.c')
-rw-r--r--tests/kms_cursor_legacy.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index d6987eea..9febf6e9 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -859,7 +859,7 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
enum pipe pipe = find_connected_pipe(display, false);
enum pipe pipe2 = find_connected_pipe(display, true);
igt_output_t *output, *output2;
- bool vblank_matches, enabled = false;
+ bool enabled = false;
volatile unsigned long *shared;
unsigned flags = 0, vblank_start;
struct drm_event_vblank vbl;
@@ -963,7 +963,6 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
flip_nonblocking(display, pipe2, atomic, &fb2_info, (void*)(ptrdiff_t)vblank_start);
}
- vblank_matches = false;
while (nloops) {
shared[1] = nloops & 1;
@@ -978,9 +977,6 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
if (!modeset)
igt_assert_eq(vbl.sequence, vblank_start + 1);
- if (vblank_start && vbl.sequence == vblank_start + 1)
- vblank_matches = true;
-
/* Do not requeue on the last 2 events. */
if (nloops <= 2) {
nloops--;
@@ -1013,8 +1009,6 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
}
}
- igt_assert_f(vblank_matches, "During modeset at least 1 page flip needs to match!\n");
-
done:
shared[0] = 1;
igt_waitchildren();