summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_legacy.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2016-12-08 10:56:13 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2016-12-08 10:56:53 +0100
commit4f0866610a4300d2d740b75122ea3b92e0134c08 (patch)
treee5feb5303b97f8375ffce825b5bd31846c5c6ab4 /tests/kms_cursor_legacy.c
parentbcef70f7e43160b4b7cca0a1ce9c64a7fc0d1e32 (diff)
tests/kms_cursor_legacy: Change crc tests to use cursor movement instead of cursor hiding
This way the tests will pass with the legacy cursor hack. 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.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index f261e976..8067cbf6 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -1149,7 +1149,7 @@ cleanup:
igt_skip("Nonblocking modeset is not supported by this kernel\n");
}
-static void flip_vs_cursor_crc(igt_display_t *display, bool atomic)
+static void flip_vs_cursor_crc(igt_display_t *display,bool atomic)
{
struct drm_mode_cursor arg[2];
struct drm_event_vblank vbl;
@@ -1167,23 +1167,18 @@ static void flip_vs_cursor_crc(igt_display_t *display, bool atomic)
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888, 0, 1., 1., 1., &cursor_fb);
populate_cursor_args(display, pipe, arg, &cursor_fb);
- arg[0].flags = arg[1].flags |= DRM_MODE_CURSOR_BO;
- arg[1].handle = 0;
- arg[1].width = arg[1].height = 0;
-
igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
- /* Collect reference crc with cursor disabled. */
- igt_pipe_crc_collect_crc(pipe_crc, &crcs[1]);
-
set_cursor_on_pipe(display, pipe, &cursor_fb);
igt_display_commit2(display, COMMIT_UNIVERSAL);
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[0]);
+ /* Collect reference crcs, crcs[0] last. */
+ do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[1]);
+ igt_pipe_crc_collect_crc(pipe_crc, &crcs[1]);
- /* Collect reference crc with cursor enabled. */
+ do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[0]);
igt_pipe_crc_collect_crc(pipe_crc, &crcs[0]);
/* Disable cursor, and immediately queue a flip. Check if resulting crc is correct. */
@@ -1232,23 +1227,18 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888, 0, 1., 1., 1., &cursor_fb);
populate_cursor_args(display, pipe, arg, &cursor_fb);
- arg[0].flags = arg[1].flags |= DRM_MODE_CURSOR_BO;
- arg[1].handle = 0;
- arg[1].width = arg[1].height = 0;
-
igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
- /* Collect reference crc with cursor disabled. */
- igt_pipe_crc_collect_crc(pipe_crc, &crcs[1]);
-
set_cursor_on_pipe(display, pipe, &cursor_fb);
igt_display_commit2(display, COMMIT_UNIVERSAL);
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[0]);
+ /* Collect reference crcs, crc[0] last for the loop. */
+ do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[1]);
+ igt_pipe_crc_collect_crc(pipe_crc, &crcs[1]);
- /* Collect reference crc with cursor enabled. */
+ do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[0]);
igt_pipe_crc_collect_crc(pipe_crc, &crcs[0]);
/*