don't inflate relative vblank sequence numbers on repeated calls (e.g. when

interrupted by a signal)
main
Michel Daenzer 2003-02-02 03:06:47 +00:00
parent 9b9b099471
commit c7d471b6ae
5 changed files with 5 additions and 0 deletions

View File

@ -619,6 +619,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
if (vblwait.request.type & _DRM_VBLANK_RELATIVE) {
vblwait.request.sequence += atomic_read(&dev->vbl_received);
vblwait.request.type &= ~_DRM_VBLANK_RELATIVE;
}
flags = vblwait.request.type & _DRM_VBLANK_FLAGS_MASK;

View File

@ -619,6 +619,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
if (vblwait.request.type & _DRM_VBLANK_RELATIVE) {
vblwait.request.sequence += atomic_read(&dev->vbl_received);
vblwait.request.type &= ~_DRM_VBLANK_RELATIVE;
}
flags = vblwait.request.type & _DRM_VBLANK_FLAGS_MASK;

View File

@ -1105,6 +1105,7 @@ int drmWaitVBlank(int fd, drmVBlankPtr vbl)
do {
ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl);
vbl->request.type &= ~DRM_VBLANK_RELATIVE;
} while (ret && errno == EINTR);
return ret;

View File

@ -628,6 +628,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
switch ( vblwait.request.type & ~_DRM_VBLANK_FLAGS_MASK ) {
case _DRM_VBLANK_RELATIVE:
vblwait.request.sequence += atomic_read( &dev->vbl_received );
vblwait.request.type &= ~_DRM_VBLANK_RELATIVE;
case _DRM_VBLANK_ABSOLUTE:
break;
default:

View File

@ -628,6 +628,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
switch ( vblwait.request.type & ~_DRM_VBLANK_FLAGS_MASK ) {
case _DRM_VBLANK_RELATIVE:
vblwait.request.sequence += atomic_read( &dev->vbl_received );
vblwait.request.type &= ~_DRM_VBLANK_RELATIVE;
case _DRM_VBLANK_ABSOLUTE:
break;
default: