tests/flip_test: check whether the pageflip event took too long

We're suspecting that something is fishy with the event deliver/vblank
timestamp handling on gmch platforms. Unfortunately, this isn't it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2012-10-02 15:37:24 +02:00
parent f509d40fa9
commit 73af035c59

View File

@ -151,6 +151,20 @@ static void page_flip_handler(int fd, unsigned int frame, unsigned int sec,
{
struct test_output *o = data;
unsigned int new_fb_id;
struct timeval now, diff, pageflip_ts;
pageflip_ts.tv_sec = sec;
pageflip_ts.tv_usec = usec;
gettimeofday(&now, NULL);
timersub(&pageflip_ts, &now, &diff);
if (diff.tv_sec > 0 || diff.tv_usec > 2000) {
fprintf(stderr, "pageflip timestamp delayed for too long: %us, %uusec\n",
(unsigned) diff.tv_sec, (unsigned) diff.tv_usec);
exit(5);
}
o->count++;