diff options
author | Chris Wilson | 2017-06-16 16:05:20 +0200 |
---|---|---|
committer | Chris Wilson | 2017-06-16 17:54:05 +0200 |
commit | dade2a6165fd7bd825958e9b0ad04678f53f0f60 (patch) | |
tree | 489fa048aa8d431a5c4624cc689ef1a3518a4667 /drivers/gpu/drm/i915/i915_vma.c | |
parent | drm/i915: Eliminate lots of iterations over the execobjects array (diff) | |
download | kernel-qcow2-linux-dade2a6165fd7bd825958e9b0ad04678f53f0f60.tar.gz kernel-qcow2-linux-dade2a6165fd7bd825958e9b0ad04678f53f0f60.tar.xz kernel-qcow2-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_vma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_vma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c index 9e6a47323362..f5c57dff288e 100644 --- a/drivers/gpu/drm/i915/i915_vma.c +++ b/drivers/gpu/drm/i915/i915_vma.c @@ -605,6 +605,8 @@ void i915_vma_unlink_ctx(struct i915_vma *vma) if (i915_vma_is_ggtt(vma)) vma->obj->vma_hashed = NULL; vma->ctx = NULL; + + i915_vma_put(vma); } void i915_vma_close(struct i915_vma *vma) |