]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Only bump object-reference count when adding first handle
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 4 Jan 2016 10:11:00 +0000 (10:11 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 5 Jan 2016 07:59:48 +0000 (08:59 +0100)
commit9418d278397edf1f8cebff9fb0831528489ae0ca
treecfb8d888c0957c543090829e4b9eabad758ba90e
parenta9b57c979eb178fc5994f55bfb251036b9da1cda
drm: Only bump object-reference count when adding first handle

We only need a single reference count for all handles (i.e. non-zero
obj->handle_count) and so can trim a few atomic operations by only
taking the reference on the first handle and dropping it after the last.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1451902261-25380-2-git-send-email-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_gem.c