diff mbox

[igt,3/8] tests/kms_fbc_crc: unify flip handling

Message ID 1431024996-2267-4-git-send-email-przanoni@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paulo Zanoni May 7, 2015, 6:56 p.m. UTC
From: Paulo Zanoni <paulo.r.zanoni@intel.com>

Just a small simplification to make the code a little easier to
understand, and to help us when we further split drawing vs flipping
later.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 tests/kms_fbc_crc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index af4c370..20510ff 100644
--- a/tests/kms_fbc_crc.c
+++ b/tests/kms_fbc_crc.c
@@ -216,19 +216,18 @@  static void test_crc(data_t *data, enum test_mode mode)
 
 	igt_assert(fbc_enabled(data));
 
-	if (mode >= TEST_PAGE_FLIP_AND_MMAP_CPU) {
+	if (mode == TEST_PAGE_FLIP || mode >= TEST_PAGE_FLIP_AND_MMAP_CPU) {
 		handle = data->fb[1].gem_handle;
 		igt_assert(drmModePageFlip(data->drm_fd, crtc_id,
 					   data->fb[1].fb_id, 0, NULL) == 0);
 
-		igt_assert(wait_for_fbc_enabled(data));
+		if (mode != TEST_PAGE_FLIP)
+			igt_assert(wait_for_fbc_enabled(data));
 	}
 
 	switch (mode) {
 		void *ptr;
 	case TEST_PAGE_FLIP:
-		igt_assert(drmModePageFlip(data->drm_fd, crtc_id,
-					   data->fb[1].fb_id, 0, NULL) == 0);
 		break;
 	case TEST_MMAP_CPU:
 	case TEST_PAGE_FLIP_AND_MMAP_CPU: