summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-11-13 06:23:13 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-11-13 06:23:13 +0000
commit2619c9cf1d509c40c7590ad02579ee44948f0ea1 (patch)
treebeb2d216505700282694a80a9dd2c2f41163515f /sys/dev/pci/drm/i915/i915_gem.c
parent76562fe851c3959a6651c70ce1de7fddead0c994 (diff)
drm/i915: Support ro ppgtt mapped cmdparser shadow buffers
From Jon Bloomfield 7ce726b61c577344655436d6bf49a13e911b6f0a in linux 4.19.y/4.19.84 4f7af1948abcb18b4772fe1bcd84d7d27d96258c in mainline linux
Diffstat (limited to 'sys/dev/pci/drm/i915/i915_gem.c')
-rw-r--r--sys/dev/pci/drm/i915/i915_gem.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/i915_gem.c b/sys/dev/pci/drm/i915/i915_gem.c
index 3c03be3f2b5..baf4b463c4e 100644
--- a/sys/dev/pci/drm/i915/i915_gem.c
+++ b/sys/dev/pci/drm/i915/i915_gem.c
@@ -4844,6 +4844,20 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
{
struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
struct i915_address_space *vm = &dev_priv->ggtt.vm;
+
+ return i915_gem_object_pin(obj, vm, view, size, alignment,
+ flags | PIN_GLOBAL);
+}
+
+struct i915_vma *
+i915_gem_object_pin(struct drm_i915_gem_object *obj,
+ struct i915_address_space *vm,
+ const struct i915_ggtt_view *view,
+ u64 size,
+ u64 alignment,
+ u64 flags)
+{
+ struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
struct i915_vma *vma;
int ret;
@@ -4907,7 +4921,7 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
return ERR_PTR(ret);
}
- ret = i915_vma_pin(vma, size, alignment, flags | PIN_GLOBAL);
+ ret = i915_vma_pin(vma, size, alignment, flags);
if (ret)
return ERR_PTR(ret);