summaryrefslogtreecommitdiff
path: root/tests/kms_flip.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-12-11 17:18:23 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-12-12 10:36:32 +0000
commit74407418720ff7a9de7caabec05d4c3afe9a5c51 (patch)
tree300ae0280532d6153b72f2ebbafff6d2dd15f400 /tests/kms_flip.c
parentd242cd8f282f9f7d73b07e8f6f7d8bbfa9c1c875 (diff)
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 <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'tests/kms_flip.c')
-rw-r--r--tests/kms_flip.c9
1 files changed, 8 insertions, 1 deletions
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;