summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_vma.h
diff options
context:
space:
mode:
authorChris Wilson2018-06-07 17:40:46 +0200
committerChris Wilson2018-06-07 22:53:11 +0200
commit93f2cde2a4f7947f6330ecfb9b27d13e2f4d43af (patch)
treed3ba0b2c9afc7baa17ccbdaca8d5e9a6b6acb5a0 /drivers/gpu/drm/i915/i915_vma.h
parentdrm/i915: Prepare for non-object vma (diff)
downloadkernel-qcow2-linux-93f2cde2a4f7947f6330ecfb9b27d13e2f4d43af.tar.gz
kernel-qcow2-linux-93f2cde2a4f7947f6330ecfb9b27d13e2f4d43af.tar.xz
kernel-qcow2-linux-93f2cde2a4f7947f6330ecfb9b27d13e2f4d43af.zip
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;