]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/i915: Defer active reference until required
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 28 Oct 2016 12:58:29 +0000 (13:58 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 28 Oct 2016 19:53:43 +0000 (20:53 +0100)
commitf8a7fde4561067a8ebc956b27afeb530ac97cb9d
treeac1978967ea8db445c219bfa9a95972a1b45a209
parent2e36991a8aa2fb5b06eee7958cced0665ea6f35d
drm/i915: Defer active reference until required

We only need the active reference to keep the object alive after the
handle has been deleted (so as to prevent a synchronous gem_close). Why
then pay the price of a kref on every execbuf when we can insert that
final active ref just in time for the handle deletion?

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161028125858.23563-6-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_batch_pool.c
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_render_state.c
drivers/gpu/drm/i915/intel_ringbuffer.c