From 74407418720ff7a9de7caabec05d4c3afe9a5c51 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 11 Dec 2017 17:18:23 +0000 Subject: igt/kms_flip: Allow very large bo to fail pageflips with E2BIG We tried to allow very large buffers (larger than the mappable aperture) to be flippable by allowing them to be bound into the unmappable region. Sadly, not all of our hw is capable of utilising the unmappable region for scanout (and on some older hw, there is only mappable). As such, we have to allow the very large bo to either succeed in being flipped, or fail with the expected E2BIG. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100917 References: 9d5e393da3f5 ("igt/kms_flip: There's no such thing as bo-too-big") Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- tests/kms_flip.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 4d5579e4..39ee68d2 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1331,7 +1331,14 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs, if (o->flags & TEST_CHECK_TS) calibrate_ts(o, crtc_idxs[0]); - igt_assert_eq(do_page_flip(o, o->fb_ids[1], true), 0); + if (o->flags & TEST_BO_TOOBIG) { + int err = do_page_flip(o, o->fb_ids[1], true); + igt_assert(err == 0 || err == -E2BIG); + if (err) + goto out; + } else { + igt_assert_eq(do_page_flip(o, o->fb_ids[1], true), 0); + } wait_for_events(o); o->current_fb_id = 1; -- cgit v1.2.3