[Nouveau] [PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests

2015-02-25 Thread Maarten Lankhorst
While I've closed off most races in a previous patch, a small race still existed where importing then unreffing cound cause an invalid bo. Add a test for this case. Racing sequence fixed: - thread 1 releases bo, refcount drops to zero, blocks on acquiring nvdev->lock. - thread 2 increases refcou

Re: [Nouveau] [PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests

2015-02-25 Thread Emil Velikov
On 24 February 2015 at 09:01, Maarten Lankhorst wrote: > While I've closed off most races in a previous patch, a small race still > existed > where importing then unreffing cound cause an invalid bo. Add a test for this > case. > > Racing sequence fixed: > > - thread 1 releases bo, refcount drop

Re: [Nouveau] [PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests

2015-02-25 Thread Maarten Lankhorst
On 25-02-15 15:14, Emil Velikov wrote: > On 24 February 2015 at 09:01, Maarten Lankhorst > wrote: >> While I've closed off most races in a previous patch, a small race still >> existed >> where importing then unreffing cound cause an invalid bo. Add a test for >> this case. >> >> Racing sequen

Re: [Nouveau] [PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests

2015-02-26 Thread Emil Velikov
On 25 February 2015 at 21:59, Maarten Lankhorst wrote: > On 25-02-15 15:14, Emil Velikov wrote: >> On 24 February 2015 at 09:01, Maarten Lankhorst >> wrote: ... >>> +static const char default_device[] = "/dev/dri/renderD128"; >>> + >> Reuse the defines in xf86drm.h ? > > Hmm, switching to drmOpen