summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_vma.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-01-16 18:21:28 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2017-01-19 13:15:26 +0300
commit718659a63054261d052cd94f2f9502111ff5173f (patch)
tree905327dcc07eb6575164567a33b42f73af09b641 /drivers/gpu/drm/i915/i915_vma.h
parentbe1e341513ca23b0668b7b0f26fa6e2ffc46ba20 (diff)
downloadlinux-718659a63054261d052cd94f2f9502111ff5173f.tar.xz
drm/i915: Rename some warts in the VMA API
Whilst writing testcases to exercise the VMA API, some oddities came to light, such as i915_gem_obj_lookup_or_create(). Joonas suggested i915_vma_instance() as a neat replacement, so rename them, move them to i915_vma.c and add some kerneldoc as a sugary bonus. s/i915_gem_obj_to_vma/i915_vma_lookup/ s/i915_gem_obj_lookup_or_create_vma/i915_vma_instance/ Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170116152131.18089-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_vma.h')
-rw-r--r--drivers/gpu/drm/i915/i915_vma.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
index 86b60fb4e954..b3c81190b4a0 100644
--- a/drivers/gpu/drm/i915/i915_vma.h
+++ b/drivers/gpu/drm/i915/i915_vma.h
@@ -116,6 +116,16 @@ i915_vma_create(struct drm_i915_gem_object *obj,
struct i915_address_space *vm,
const struct i915_ggtt_view *view);
+struct i915_vma *
+i915_vma_lookup(struct drm_i915_gem_object *obj,
+ struct i915_address_space *vm,
+ const struct i915_ggtt_view *view);
+
+struct i915_vma *
+i915_vma_instance(struct drm_i915_gem_object *obj,
+ struct i915_address_space *vm,
+ const struct i915_ggtt_view *view);
+
void i915_vma_unpin_and_release(struct i915_vma **p_vma);
static inline bool i915_vma_is_ggtt(const struct i915_vma *vma)