mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-22 23:36:30 +00:00
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:
parent
f509d40fa9
commit
73af035c59
@ -151,6 +151,20 @@ static void page_flip_handler(int fd, unsigned int frame, unsigned int sec,
|
|||||||
{
|
{
|
||||||
struct test_output *o = data;
|
struct test_output *o = data;
|
||||||
unsigned int new_fb_id;
|
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++;
|
o->count++;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user