mirror of https://gitee.com/openkylin/linux.git
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
This commit is contained in:
parent
9d80841ea4
commit
c58b735fc7
|
@ -1952,10 +1952,8 @@ intel_ring_create_vma(struct drm_i915_private *dev_priv, int size)
|
||||||
struct drm_i915_gem_object *obj;
|
struct drm_i915_gem_object *obj;
|
||||||
struct i915_vma *vma;
|
struct i915_vma *vma;
|
||||||
|
|
||||||
obj = ERR_PTR(-ENODEV);
|
obj = i915_gem_object_create_stolen(&dev_priv->drm, size);
|
||||||
if (!HAS_LLC(dev_priv))
|
if (!obj)
|
||||||
obj = i915_gem_object_create_stolen(&dev_priv->drm, size);
|
|
||||||
if (IS_ERR(obj))
|
|
||||||
obj = i915_gem_object_create(&dev_priv->drm, size);
|
obj = i915_gem_object_create(&dev_priv->drm, size);
|
||||||
if (IS_ERR(obj))
|
if (IS_ERR(obj))
|
||||||
return ERR_CAST(obj);
|
return ERR_CAST(obj);
|
||||||
|
|
Loading…
Reference in New Issue