Quoting Matthew Auld (2020-11-27 12:06:09) > From: Michel Thierry <michel.thierry@xxxxxxxxx> > > Signed-off-by: Michel Thierry <michel.thierry@xxxxxxxxx> > Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> > Cc: Abdiel Janulgue <abdiel.janulgue@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/gt/intel_ring.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_ring.c b/drivers/gpu/drm/i915/gt/intel_ring.c > index d636c6ed88b7..aa75e644f3f2 100644 > --- a/drivers/gpu/drm/i915/gt/intel_ring.c > +++ b/drivers/gpu/drm/i915/gt/intel_ring.c > @@ -4,6 +4,7 @@ > * Copyright © 2019 Intel Corporation > */ > > +#include "gem/i915_gem_lmem.h" > #include "gem/i915_gem_object.h" > #include "i915_drv.h" > #include "i915_vma.h" > @@ -111,10 +112,16 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size) > struct i915_vma *vma; > > 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 (HAS_LMEM(i915)) { > + obj = i915_gem_object_create_lmem(i915, size, > + I915_BO_ALLOC_CONTIGUOUS | > + I915_BO_ALLOC_VOLATILE); Just create, and keep trying when !lmem returns an error. Why contiguous, it's vmapped anyway? > + } else { > + 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)) > return ERR_CAST(obj); > > -- > 2.26.2 > > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel