summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_vma.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-06-07 18:40:46 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2018-06-07 23:53:11 +0300
commit93f2cde2a4f7947f6330ecfb9b27d13e2f4d43af (patch)
treed3ba0b2c9afc7baa17ccbdaca8d5e9a6b6acb5a0 /drivers/gpu/drm/i915/i915_vma.h
parent520ea7c581bf3ba4761c1fb61c53b11767665b62 (diff)
downloadlinux-93f2cde2a4f7947f6330ecfb9b27d13e2f4d43af.tar.xz
drm/i915: Decouple vma vfuncs from vm
To allow for future non-object backed vma, we need to be able to specialise the callbacks for binding, et al, the vma. For example, instead of calling vma->vm->bind_vma(), we now call vma->ops->bind_vma(). This gives us the opportunity to later override the operation for a custom vma. v2: flip order of unbind/bind Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Matthew Auld <matthew.william.auld@gmail.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180607154047.9171-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
index f0532f1a4953..4321476a6a32 100644
--- a/drivers/gpu/drm/i915/i915_vma.h
+++ b/drivers/gpu/drm/i915/i915_vma.h
@@ -49,6 +49,7 @@ struct i915_vma {
struct drm_mm_node node;
struct drm_i915_gem_object *obj;
struct i915_address_space *vm;
+ const struct i915_vma_ops *ops;
struct drm_i915_fence_reg *fence;
struct reservation_object *resv; /** Alias of obj->resv */
struct sg_table *pages;