mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-26 01:06:23 +00:00
flip_test: fix timestamp order
When grabbing the timestamp after a flip, it has a decent chance to actually be after the flip. Surprising.
This commit is contained in:
parent
630dd4087d
commit
826326bc7c
@ -413,6 +413,8 @@ static void flip_mode(struct test_output *o, int crtc, int duration)
|
|||||||
if (o->flags & TEST_CHECK_TS)
|
if (o->flags & TEST_CHECK_TS)
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
|
||||||
|
gettimeofday(&o->last_flip_received, NULL);
|
||||||
|
|
||||||
if (drmModePageFlip(drm_fd, o->crtc, o->fb_ids[1],
|
if (drmModePageFlip(drm_fd, o->crtc, o->fb_ids[1],
|
||||||
DRM_MODE_PAGE_FLIP_EVENT, o)) {
|
DRM_MODE_PAGE_FLIP_EVENT, o)) {
|
||||||
fprintf(stderr, "failed to page flip: %s\n", strerror(errno));
|
fprintf(stderr, "failed to page flip: %s\n", strerror(errno));
|
||||||
@ -427,7 +429,6 @@ static void flip_mode(struct test_output *o, int crtc, int duration)
|
|||||||
evctx.page_flip_handler = page_flip_handler;
|
evctx.page_flip_handler = page_flip_handler;
|
||||||
|
|
||||||
gettimeofday(&end, NULL);
|
gettimeofday(&end, NULL);
|
||||||
gettimeofday(&o->last_flip_received, NULL);
|
|
||||||
end.tv_sec += duration;
|
end.tv_sec += duration;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user