[Intel-gfx] [PATCH v2 19/22] drm/i915: don't allocate the ring in stolen if we lack aperture
Tang, CQ
cq.tang at intel.com
Thu Oct 3 19:37:57 UTC 2019
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of
> Matthew Auld
> Sent: Thursday, October 3, 2019 12:25 PM
> To: intel-gfx at lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 19/22] drm/i915: don't allocate the ring in
> stolen if we lack aperture
>
> Since we have no way access it from the CPU. For such cases just fallback to
> internal objects.
>
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> b/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> index e220c09c6f32..c48f1d20af5f 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> @@ -1273,7 +1273,9 @@ static struct i915_vma *create_ring_vma(struct
> i915_ggtt *ggtt, int size)
> struct drm_i915_gem_object *obj;
> struct i915_vma *vma;
>
> - obj = i915_gem_object_create_stolen(i915, size);
> + obj = ERR_PTR(-ENODEV);
> + if (HAS_MAPPABLE_APERTURE(i915))
> + obj = i915_gem_object_create_stolen(i915, size);
Don't we already support local stolen memory region? In this case, if it has aperture, it is bios stolen system memory, if no aperture, it is local stolen memory, the same call to i915_gem_object_create_stolen() will work in both cases.
--CQ
> if (IS_ERR(obj))
> obj = i915_gem_object_create_internal(i915, size);
> if (IS_ERR(obj))
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list