]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Exclude reserved stolen from driver use
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Dec 2021 15:34:02 +0000 (21:04 +0530)
committerRamalingam C <ramalingam.c@intel.com>
Tue, 14 Dec 2021 09:38:19 +0000 (15:08 +0530)
Remove the portion of stolen memory reserved for private use from driver
access.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211208153404.27546-2-ramalingam.c@intel.com
drivers/gpu/drm/i915/gem/i915_gem_stolen.c

index ba90ab47d83811451c257d506d0bfd52c04e19e6..ad7a8e9e13e7429b8f4381dd68166ca8dc7fd747 100644 (file)
@@ -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;