drm/i915: Refactor common lock handling between shrinker count/scan
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 25 Mar 2014 13:23:05 +0000 (13:23 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 20 May 2014 07:46:52 +0000 (09:46 +0200)
commitb453c4dbc3af023540f61419223104cb1bb80d16
treeed10abc8bc5d01c42fb620a13660c7e35ba5c6bf
parentceabbba524fb43989875f66a6c06d7ce0410fe5c
drm/i915: Refactor common lock handling between shrinker count/scan

We can share a few lines of tricky lock handling we need to use for both
shrinker routines and in the process fix the return value for count()
when reporting a deadlock.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Robert Beckett <robert.beckett@intel.com>
Reviewed-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c