[PATCH 1/2] drm: make idr_mutex a spinlock

2014-08-29 Thread Daniel Vetter
On Fri, Aug 29, 2014 at 03:03:58PM +0200, David Herrmann wrote: > Hi > > On Fri, Aug 29, 2014 at 2:53 PM, Daniel Vetter wrote: > > On Fri, Aug 29, 2014 at 02:01:00PM +0200, David Herrmann wrote: > >> There is no reason to use a heavy mutex for idr protection. Use a spinlock > >> and make

[PATCH 1/2] drm: make idr_mutex a spinlock

2014-08-29 Thread Thierry Reding
On Fri, Aug 29, 2014 at 03:11:19PM +0200, David Herrmann wrote: > Hi > > On Fri, Aug 29, 2014 at 3:10 PM, Thierry Reding > wrote: > > On Fri, Aug 29, 2014 at 02:01:00PM +0200, David Herrmann wrote: > >> There is no reason to use a heavy mutex for idr protection. Use a spinlock > >> and make

[PATCH 1/2] drm: make idr_mutex a spinlock

2014-08-29 Thread David Herrmann
Hi On Fri, Aug 29, 2014 at 3:10 PM, Thierry Reding wrote: > On Fri, Aug 29, 2014 at 02:01:00PM +0200, David Herrmann wrote: >> There is no reason to use a heavy mutex for idr protection. Use a spinlock >> and make idr-allocation use idr_preload(). >> >> This patch also makes mode-object lookup

[PATCH 1/2] drm: make idr_mutex a spinlock

2014-08-29 Thread Thierry Reding
On Fri, Aug 29, 2014 at 02:01:00PM +0200, David Herrmann wrote: > There is no reason to use a heavy mutex for idr protection. Use a spinlock > and make idr-allocation use idr_preload(). > > This patch also makes mode-object lookup irq-save, in case you ever wanna > lookup modeset objects from

[PATCH 1/2] drm: make idr_mutex a spinlock

2014-08-29 Thread David Herrmann
Hi On Fri, Aug 29, 2014 at 2:53 PM, Daniel Vetter wrote: > On Fri, Aug 29, 2014 at 02:01:00PM +0200, David Herrmann wrote: >> There is no reason to use a heavy mutex for idr protection. Use a spinlock >> and make idr-allocation use idr_preload(). >> >> This patch also makes mode-object lookup

[PATCH 1/2] drm: make idr_mutex a spinlock

2014-08-29 Thread Daniel Vetter
On Fri, Aug 29, 2014 at 02:01:00PM +0200, David Herrmann wrote: > There is no reason to use a heavy mutex for idr protection. Use a spinlock > and make idr-allocation use idr_preload(). > > This patch also makes mode-object lookup irq-save, in case you ever wanna > lookup modeset objects from

[PATCH 1/2] drm: make idr_mutex a spinlock

2014-08-29 Thread David Herrmann
There is no reason to use a heavy mutex for idr protection. Use a spinlock and make idr-allocation use idr_preload(). This patch also makes mode-object lookup irq-save, in case you ever wanna lookup modeset objects from interrupts. This is just a side-effect of avoiding a mutex. Signed-off-by: