[Intel-gfx] [PATCH] drm: Aggressively disable vblanks

2010-12-20 Thread Andy Lutomirski
Enabling and disabling the vblank interrupt (on devices that support it) is cheap. So disable it quickly after each interrupt. To avoid constantly enabling and disabling vblank when animations are running, after a predefined number (3) of consecutive enabled vblanks that someone cared about,

Re: [Intel-gfx] [PATCH] drm: Aggressively disable vblanks

2010-12-20 Thread Keith Packard
On Mon, 20 Dec 2010 14:00:54 -0500, Andy Lutomirski l...@mit.edu wrote: Enabling and disabling the vblank interrupt (on devices that support it) is cheap. So disable it quickly after each interrupt. So, the concern (and reason for the original design) was that you might lose count of vblank

Re: [Intel-gfx] [PATCH] drm: Aggressively disable vblanks

2010-12-20 Thread Andrew Lutomirski
On Mon, Dec 20, 2010 at 10:23 PM, Keith Packard kei...@keithp.com wrote: On Mon, 20 Dec 2010 14:00:54 -0500, Andy Lutomirski l...@mit.edu wrote: Enabling and disabling the vblank interrupt (on devices that support it) is cheap.  So disable it quickly after each interrupt. So, the concern

Re: [Intel-gfx] [PATCH] drm: Aggressively disable vblanks

2010-12-20 Thread Keith Packard
On Mon, 20 Dec 2010 22:34:12 -0500, Andrew Lutomirski l...@mit.edu wrote: But five seconds is a *long* time, and anything short enough that the interrupt actually gets turned off in normal use risks the same race. Right, so eliminating any race seems like the basic requirement. Can that be

Re: [Intel-gfx] [PATCH] drm: Aggressively disable vblanks

2010-12-20 Thread Jesse Barnes
On Mon, 20 Dec 2010 22:55:46 -0500 Andrew Lutomirski l...@mit.edu wrote: On Mon, Dec 20, 2010 at 10:47 PM, Keith Packard kei...@keithp.com wrote: On Mon, 20 Dec 2010 22:34:12 -0500, Andrew Lutomirski l...@mit.edu wrote: But five seconds is a *long* time, and anything short enough that the