[PATCH 8/8] drm/i915: allocate cmd ring in lmem
Chris Wilson
chris at chris-wilson.co.uk
Mon Jan 25 22:19:21 UTC 2021
Quoting Matthew Auld (2021-01-25 18:14:46)
> From: Michel Thierry <michel.thierry at intel.com>
>
> Signed-off-by: Michel Thierry <michel.thierry at intel.com>
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_ring.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring.c b/drivers/gpu/drm/i915/gt/intel_ring.c
> index 29c87b3c23bc..aee0a77c77e0 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring.c
> @@ -3,6 +3,7 @@
> * Copyright © 2019 Intel Corporation
> */
>
> +#include "gem/i915_gem_lmem.h"
> #include "gem/i915_gem_object.h"
>
> #include "i915_drv.h"
> @@ -108,8 +109,8 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size)
> struct drm_i915_gem_object *obj;
> struct i915_vma *vma;
>
> - obj = ERR_PTR(-ENODEV);
> - if (i915_ggtt_has_aperture(ggtt))
> + obj = i915_gem_object_create_lmem(i915, size, I915_BO_ALLOC_VOLATILE);
> + if (IS_ERR(obj) && 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);
Yes we can!
-Chris
More information about the Intel-gfx-trybot
mailing list