]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/gpu/drm/drm_gem.c
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)
commit98a8883ad419128493b8cfab3982d58785deabda
treecfb8d888c0957c543090829e4b9eabad758ba90e
parent6984128d01cf935820a0563f3a00c6623ba58109
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