diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-11 10:12:37 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-11 11:44:24 +0100 |
commit | e568ac3874be7dcef3da0cc3bd6b91ca9dd14aa0 (patch) | |
tree | 0fb2a096795e7b7aab14bbdcd1f81c7a94c5c10a /drivers/gpu/drm/i915/gem/i915_gem_userptr.c | |
parent | a8cff4c8283af35546339c9ada5a90a70fe4a075 (diff) | |
download | talos-op-linux-e568ac3874be7dcef3da0cc3bd6b91ca9dd14aa0.tar.gz talos-op-linux-e568ac3874be7dcef3da0cc3bd6b91ca9dd14aa0.zip |
drm/i915: Pull kref into i915_address_space
Make the kref common to both derived structs (i915_ggtt and i915_ppgtt)
so that we can safely reference count an abstract ctx->vm address space.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190611091238.15808-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gem/i915_gem_userptr.c')
-rw-r--r-- | drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c index cfa990edb351..528b61678334 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c @@ -768,14 +768,14 @@ i915_gem_userptr_ioctl(struct drm_device *dev, return -EFAULT; if (args->flags & I915_USERPTR_READ_ONLY) { - struct i915_hw_ppgtt *ppgtt; + struct i915_address_space *vm; /* * On almost all of the older hw, we cannot tell the GPU that * a page is readonly. */ - ppgtt = dev_priv->kernel_context->ppgtt; - if (!ppgtt || !ppgtt->vm.has_read_only) + vm = dev_priv->kernel_context->vm; + if (!vm || !vm->has_read_only) return -ENODEV; } |