From 0ef42fb749b17f7e49adef047ece5bebac5d6795 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 8 Dec 2021 21:04:02 +0530 Subject: [PATCH] drm/i915: Exclude reserved stolen from driver use Remove the portion of stolen memory reserved for private use from driver access. Signed-off-by: Chris Wilson cc: Matthew Auld Signed-off-by: Ramalingam C Reviewed-by: Matthew Auld Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20211208153404.27546-2-ramalingam.c@intel.com --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c index ba90ab47d838..ad7a8e9e13e7 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c @@ -488,6 +488,9 @@ static int i915_gem_init_stolen(struct intel_memory_region *mem) return 0; } + /* Exclude the reserved region from driver use */ + mem->region.end = reserved_base - 1; + /* It is possible for the reserved area to end before the end of stolen * memory, so just consider the start. */ reserved_total = stolen_top - reserved_base;