From a36e627b767c52d25b442f3c7327475132fd888b Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 16 Jan 2017 13:35:39 +0100 Subject: 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 --- tests/kms_cursor_legacy.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/kms_cursor_legacy.c') 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); } -- cgit v1.2.3