don't inflate relative vblank sequence numbers on repeated calls (e.g. when
interrupted by a signal)main
parent
9b9b099471
commit
c7d471b6ae
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue