Skip to content

Commit c58b735

Browse files
committed
drm/i915: Allocate rings from stolen
If we have stolen available, make use of it for ringbuffer allocation. Previously this was restricted to !llc platforms, as writing to stolen requires a GGTT mapping - but now that we have partial mappable support, the mappable aperture isn't quite so precious so we can use it more freely and ringbuffers are a good user for the otherwise wasted stolen. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-18-chris@chris-wilson.co.uk
1 parent 9d80841 commit c58b735

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/gpu/drm/i915/intel_ringbuffer.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,10 +1952,8 @@ intel_ring_create_vma(struct drm_i915_private *dev_priv, int size)
19521952
struct drm_i915_gem_object *obj;
19531953
struct i915_vma *vma;
19541954

1955-
obj = ERR_PTR(-ENODEV);
1956-
if (!HAS_LLC(dev_priv))
1957-
obj = i915_gem_object_create_stolen(&dev_priv->drm, size);
1958-
if (IS_ERR(obj))
1955+
obj = i915_gem_object_create_stolen(&dev_priv->drm, size);
1956+
if (!obj)
19591957
obj = i915_gem_object_create(&dev_priv->drm, size);
19601958
if (IS_ERR(obj))
19611959
return ERR_CAST(obj);

0 commit comments

Comments
 (0)