[PATCH 11/11] drm: Fix vblank timestamp races

2015-09-22 Thread Ville Syrjälä
On Tue, Sep 22, 2015 at 11:10:50AM +0200, Daniel Vetter wrote: > On Mon, Sep 14, 2015 at 10:43:52PM +0300, ville.syrjala at linux.intel.com > wrote: > > From: Ville Syrjälä > > > > The vblank timestamp ringbuffer only has two entries, so if the > > vblank->count is incremented by an even numbe

[PATCH 11/11] drm: Fix vblank timestamp races

2015-09-22 Thread Daniel Vetter
On Tue, Sep 22, 2015 at 03:36:44PM +0300, Ville Syrjälä wrote: > On Tue, Sep 22, 2015 at 11:10:50AM +0200, Daniel Vetter wrote: > > On Mon, Sep 14, 2015 at 10:43:52PM +0300, ville.syrjala at linux.intel.com > > wrote: > > > From: Ville Syrjälä > > > > > > The vblank timestamp ringbuffer only

[PATCH 11/11] drm: Fix vblank timestamp races

2015-09-22 Thread Daniel Vetter
On Tue, Sep 22, 2015 at 01:15:01PM +0200, Maarten Lankhorst wrote: > Op 22-09-15 om 11:10 schreef Daniel Vetter: > > On Mon, Sep 14, 2015 at 10:43:52PM +0300, ville.syrjala at linux.intel.com > > wrote: > >> From: Ville Syrjälä > >> > >> The vblank timestamp ringbuffer only has two entries, so

[PATCH 11/11] drm: Fix vblank timestamp races

2015-09-22 Thread Maarten Lankhorst
Op 22-09-15 om 11:10 schreef Daniel Vetter: > On Mon, Sep 14, 2015 at 10:43:52PM +0300, ville.syrjala at linux.intel.com > wrote: >> From: Ville Syrjälä >> >> The vblank timestamp ringbuffer only has two entries, so if the >> vblank->count is incremented by an even number readers may end up see

[PATCH 11/11] drm: Fix vblank timestamp races

2015-09-22 Thread Daniel Vetter
On Mon, Sep 14, 2015 at 10:43:52PM +0300, ville.syrjala at linux.intel.com wrote: > From: Ville Syrjälä > > The vblank timestamp ringbuffer only has two entries, so if the > vblank->count is incremented by an even number readers may end up seeing > the new vblank timestamp alongside the old vb

[PATCH 11/11] drm: Fix vblank timestamp races

2015-09-14 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä The vblank timestamp ringbuffer only has two entries, so if the vblank->count is incremented by an even number readers may end up seeing the new vblank timestamp alongside the old vblank counter value. Fix the problem by storing the vblank counter in a ringbuffer as well, a