Message ID | 1471344168-28136-13-git-send-email-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On ti, 2016-08-16 at 11:42 +0100, Chris Wilson wrote: > @@ -1949,10 +1949,8 @@ intel_ring_create_vma(struct drm_i915_private *dev_priv, int size) > struct drm_i915_gem_object *obj; > struct i915_vma *vma; > > - obj = ERR_PTR(-ENODEV); > - if (!HAS_LLC(dev_priv)) > - obj = i915_gem_object_create_stolen(&dev_priv->drm, size); > - if (IS_ERR(obj)) This previous test should have been IS_ERR_OR_NULL() causing the fallback to normal path has not worked on LLC platforms. > + obj = i915_gem_object_create_stolen(&dev_priv->drm, size); > + if (obj == NULL) !obj Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Regards, Joonas
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index a96a470dfe03..5a5412f3db46 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -1949,10 +1949,8 @@ intel_ring_create_vma(struct drm_i915_private *dev_priv, int size) struct drm_i915_gem_object *obj; struct i915_vma *vma; - obj = ERR_PTR(-ENODEV); - if (!HAS_LLC(dev_priv)) - obj = i915_gem_object_create_stolen(&dev_priv->drm, size); - if (IS_ERR(obj)) + obj = i915_gem_object_create_stolen(&dev_priv->drm, size); + if (obj == NULL) obj = i915_gem_object_create(&dev_priv->drm, size); if (IS_ERR(obj)) return ERR_CAST(obj);
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> --- drivers/gpu/drm/i915/intel_ringbuffer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)