mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 17:36:11 +00:00
tests/kms_fbc_crc: unify flip handling
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>
This commit is contained in:
parent
036401d42c
commit
fceed3a585
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user