diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-06-16 15:05:20 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-06-16 16:54:05 +0100 |
commit | dade2a6165fd7bd825958e9b0ad04678f53f0f60 (patch) | |
tree | 489fa048aa8d431a5c4624cc689ef1a3518a4667 /drivers/gpu/drm/i915/i915_gem_context.c | |
parent | 2889caa9232109afc8881f29a2205abeb5709d0c (diff) | |
download | linux-dade2a6165fd7bd825958e9b0ad04678f53f0f60.tar.gz linux-dade2a6165fd7bd825958e9b0ad04678f53f0f60.tar.bz2 linux-dade2a6165fd7bd825958e9b0ad04678f53f0f60.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_context.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_context.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 23f74014e158..39ed58a21fc1 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -152,6 +152,7 @@ static void vma_lut_free(struct i915_gem_context *ctx) hlist_for_each_entry(vma, &lut->ht[i], ctx_node) { vma->obj->vma_hashed = NULL; vma->ctx = NULL; + i915_vma_put(vma); } } kvfree(lut->ht); |