[Intel-gfx] [PATCH] drm: Make drm_read() more robust against multithreaded races

2015-01-05 Thread Daniel Vetter
On Fri, Dec 05, 2014 at 09:42:35AM +0100, Takashi Iwai wrote: > At Thu, 4 Dec 2014 21:03:25 +, > Chris Wilson wrote: > > > > The current implementation of drm_read() faces a number of issues: > > > > 1. Upon an error, it consumes the event which may lead to the client > > blocking. > > 2. Up

[Intel-gfx] [PATCH] drm: Make drm_read() more robust against multithreaded races

2014-12-05 Thread Daniel Vetter
On Thu, Dec 04, 2014 at 09:03:25PM +, Chris Wilson wrote: > The current implementation of drm_read() faces a number of issues: > > 1. Upon an error, it consumes the event which may lead to the client > blocking. > 2. Upon an error, it forgets about events already copied > 3. If it fails to cop