[PATCH igt] igt/kms_flip: Allow very large bo to fail pageflips with E2BIG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 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.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 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 63c58d2e1..fb4fe6514 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1344,7 +1344,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;
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux