[Intel-gfx] [PATCH igt 3/8] tests/kms_fbc_crc: unify flip handling
Paulo Zanoni
przanoni at gmail.com
Thu May 7 11:56:31 PDT 2015
From: Paulo Zanoni <paulo.r.zanoni at 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 at intel.com>
---
tests/kms_fbc_crc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
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:
--
2.1.4
More information about the Intel-gfx
mailing list