[RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-17 Thread Mario Kleiner
Jesse, cc'ing you in case you have thoughts about this for the intel side of things? On Nov 17, 2011, at 4:39 PM, Andrew Lutomirski wrote: > 2011/11/17 Michel D?nzer : >> [ Dropping intel-gfx list from CC, as it automatically rejects posts >> from non-subscribers ] >> >> On Mit, 2011-11-16 at 2

Re: [RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-17 Thread Andrew Lutomirski
On Thu, Nov 17, 2011 at 2:54 PM, Mario Kleiner wrote: > Jesse, cc'ing you in case you have thoughts about this for the intel side of > things? > > On Nov 17, 2011, at 4:39 PM, Andrew Lutomirski wrote: > >> 2011/11/17 Michel Dänzer : >>> >>> [ Dropping intel-gfx list from CC, as it automatically re

[RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-17 Thread Andrew Lutomirski
On Thu, Nov 17, 2011 at 2:54 PM, Mario Kleiner wrote: > Jesse, cc'ing you in case you have thoughts about this for the intel side of > things? > > On Nov 17, 2011, at 4:39 PM, Andrew Lutomirski wrote: > >> 2011/11/17 Michel D?nzer : >>> >>> [ Dropping intel-gfx list from CC, as it automatically re

Re: [RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-17 Thread Mario Kleiner
Jesse, cc'ing you in case you have thoughts about this for the intel side of things? On Nov 17, 2011, at 4:39 PM, Andrew Lutomirski wrote: 2011/11/17 Michel Dänzer : [ Dropping intel-gfx list from CC, as it automatically rejects posts from non-subscribers ] On Mit, 2011-11-16 at 21:39 -0800

[RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-17 Thread Michel Dänzer
[ Dropping intel-gfx list from CC, as it automatically rejects posts from non-subscribers ] On Mit, 2011-11-16 at 21:39 -0800, Andy Lutomirski wrote: > There are two possible races when disabling vblanks. If the IRQ > fired but the hardware didn't update its counter yet, then we store > too low

Re: [RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-17 Thread Andrew Lutomirski
2011/11/17 Michel Dänzer : > [ Dropping intel-gfx list from CC, as it automatically rejects posts > from non-subscribers ] > > On Mit, 2011-11-16 at 21:39 -0800, Andy Lutomirski wrote: >> There are two possible races when disabling vblanks.  If the IRQ >> fired but the hardware didn't update its co

[RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-17 Thread Andrew Lutomirski
2011/11/17 Michel D?nzer : > [ Dropping intel-gfx list from CC, as it automatically rejects posts > from non-subscribers ] > > On Mit, 2011-11-16 at 21:39 -0800, Andy Lutomirski wrote: >> There are two possible races when disabling vblanks. ?If the IRQ >> fired but the hardware didn't update its co

Re: [RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-17 Thread Michel Dänzer
[ Dropping intel-gfx list from CC, as it automatically rejects posts from non-subscribers ] On Mit, 2011-11-16 at 21:39 -0800, Andy Lutomirski wrote: > There are two possible races when disabling vblanks. If the IRQ > fired but the hardware didn't update its counter yet, then we store > too low

[RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-16 Thread Andy Lutomirski
There are two possible races when disabling vblanks. If the IRQ fired but the hardware didn't update its counter yet, then we store too low a hardware counter. (Sensible hardware never does this. Apparently not all hardware is sensible.) If, on the other hand, the counter updated but the IRQ did

[RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-16 Thread Andy Lutomirski
There are two possible races when disabling vblanks. If the IRQ fired but the hardware didn't update its counter yet, then we store too low a hardware counter. (Sensible hardware never does this. Apparently not all hardware is sensible.) If, on the other hand, the counter updated but the IRQ did