Skip to content

Commit

Permalink
drm/i915: don't allocate the ring in stolen if we lack aperture
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Matthew Auld authored and Chris Wilson committed Oct 29, 2019
1 parent 4dc0a7c commit 34a6baa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/gt/intel_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 34a6baa

Please sign in to comment.