aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gt
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2019-10-29 09:58:55 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-10-29 10:35:47 +0000
commit34a6baa2df9db77dc65979e9c334a3097f6b7d9f (patch)
treebafef33463deeb162ba04a42e21c2a6b429cc0cb /drivers/gpu/drm/i915/gt
parentdrm/i915: Don't try to place HWS in non-existing mappable region (diff)
downloadlinux-dev-34a6baa2df9db77dc65979e9c334a3097f6b7d9f.tar.xz
linux-dev-34a6baa2df9db77dc65979e9c334a3097f6b7d9f.zip
drm/i915: don't allocate the ring in stolen if we lack aperture
Since we have no way access it from the CPU. For such cases just fallback to internal objects. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20191029095856.25431-6-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt')
-rw-r--r--drivers/gpu/drm/i915/gt/intel_ring.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_ring.c b/drivers/gpu/drm/i915/gt/intel_ring.c
index fa01c1407760..ece20504d240 100644
--- a/drivers/gpu/drm/i915/gt/intel_ring.c
+++ b/drivers/gpu/drm/i915/gt/intel_ring.c
@@ -108,7 +108,9 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size)
struct drm_i915_gem_object *obj;
struct i915_vma *vma;
- obj = i915_gem_object_create_stolen(i915, size);
+ obj = ERR_PTR(-ENODEV);
+ if (i915_ggtt_has_aperture(ggtt))
+ obj = i915_gem_object_create_stolen(i915, size);
if (IS_ERR(obj))
obj = i915_gem_object_create_internal(i915, size);
if (IS_ERR(obj))