summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_legacy.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-01-16 13:35:39 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-01-16 13:35:49 +0100
commita36e627b767c52d25b442f3c7327475132fd888b (patch)
tree05fa2d247e1d8484af29af2b5a67a6b4d4e7897f /tests/kms_cursor_legacy.c
parentc79e6d828f539af5139050e1c361b2675a2ad12c (diff)
kms_cursor_legacy: fallback to xrgb if argb for sprite plane is unavailable
This fixes the test on older platforms that don't have ARGB support. 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.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 37922f45..0e8be9c0 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -294,10 +294,19 @@ static void transition_nonblocking(igt_display_t *display, enum pipe pipe,
igt_plane_set_fb(primary, prim_fb);
igt_plane_set_fb(sprite, NULL);
} else {
+ int ret;
+
igt_plane_set_fb(primary, NULL);
igt_plane_set_fb(sprite, argb_fb);
- }
+ ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT, display);
+ if (!ret)
+ return;
+
+ igt_assert(ret == -EINVAL);
+
+ igt_plane_set_fb(sprite, prim_fb);
+ }
igt_display_commit_atomic(display, DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT, display);
}