drm/i915: Store a persistent reference for an object in the execbuffer cache
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 16 Jun 2017 14:05:20 +0000 (15:05 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 16 Jun 2017 15:54:05 +0000 (16:54 +0100)
commitdade2a6165fd7bd825958e9b0ad04678f53f0f60
tree489fa048aa8d431a5c4624cc689ef1a3518a4667
parent2889caa9232109afc8881f29a2205abeb5709d0c
drm/i915: Store a persistent reference for an object in the execbuffer cache

If we take a reference to the object/vma when it is first used in an
execbuf, we can keep that reference until the object's file-local handle
is closed. Thereby saving a frequent ref/unref pair.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_vma.c