diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-13 15:58:26 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-13 21:34:53 +0000 |
commit | 2c64f11f38f44d21419dc15adc7162bd83f65664 (patch) | |
tree | 1b85c86a8c5c2a5f710b198f9960868014f56b4d /lib/igt_kms.c | |
parent | 893e4ae2ff05368570d8d3c0fd803655322bcd9e (diff) |
igt/kms_pipe_crc_basic: Tighten timings for CRC readback
The number of vblanks that pass whilst we read back the CRCs is depended
upon CPU scheduling -- we may take longer than expected and end up
reading more CRCs. Align the start of the loop to a vblank.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100132
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r-- | lib/igt_kms.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 8751c97f..e12ed723 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -3020,8 +3020,7 @@ void igt_crtc_set_background(igt_pipe_t *pipe, uint64_t background) pipe->background_changed = true; } - -void igt_wait_for_vblank(int drm_fd, enum pipe pipe) +void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count) { drmVBlank wait_vbl; uint32_t pipe_id_flag; @@ -3031,11 +3030,16 @@ void igt_wait_for_vblank(int drm_fd, enum pipe pipe) wait_vbl.request.type = DRM_VBLANK_RELATIVE; wait_vbl.request.type |= pipe_id_flag; - wait_vbl.request.sequence = 1; + wait_vbl.request.sequence = count; igt_assert(drmWaitVBlank(drm_fd, &wait_vbl) == 0); } +void igt_wait_for_vblank(int drm_fd, enum pipe pipe) +{ + igt_wait_for_vblank_count(drm_fd, pipe, 1); +} + /** * igt_enable_connectors: * |