OSDN Git Service

Avoid incorrect vblank wakeups
authorJesse Barnes <jbarnes@nietzche.virtuousgeek.org>
Thu, 17 Jul 2008 17:48:14 +0000 (13:48 -0400)
committerJesse Barnes <jbarnes@nietzche.virtuousgeek.org>
Thu, 17 Jul 2008 17:55:24 +0000 (13:55 -0400)
commit2204f926abe4da87a38955c4ecf9adb73b646666
tree0bc54a5aa8c4cd39e6eccafc1922caf86f4c2286
parentb0e4619a396f2db8c594cd0a26fd2f0ab9358095
Avoid incorrect vblank wakeups

The current code uses the hw vblank counter exclusively, which can lead
to wakeups during the active period rather than during the vblank period
if the hw counter counts displayed frames rather than vblank periods.

This change coverts the code over to using the counter while interrupts
are enabled, fixing that issue.  It also includes a couple of related
changes:  one to not enable the new enable/disable behavior until the
modeset ioctl is called (to preserve old client behavior) and another to
account for lost events due to mode setting with the new counter scheme.

BSD will require similar changes to its drm_irq.c code, but they should
be straightforward.
linux-core/drmP.h
linux-core/drm_irq.c