[PATCH 20/28] drm/i915: mark stolen as private
Matthew Auld
matthew.auld at intel.com
Thu Apr 8 13:22:06 UTC 2021
In the next patch we want to expose the supported regions to userspace,
which can then be fed into the gem_create_ext placement extensions. For
now treat stolen memory as private from userspace pov.
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 3 +++
drivers/gpu/drm/i915/intel_memory_region.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index 49a2dfcc8ba7..8744942c6bad 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -721,6 +721,9 @@ static int init_stolen(struct intel_memory_region *mem)
return -EIO;
}
+ /* For now opt for not exposing to userspace */
+ mem->private = true;
+
/*
* Initialise stolen early so that we may reserve preallocated
* objects for the BIOS to KMS transition.
diff --git a/drivers/gpu/drm/i915/intel_memory_region.h b/drivers/gpu/drm/i915/intel_memory_region.h
index 4c8ec15af55f..942fc4f68764 100644
--- a/drivers/gpu/drm/i915/intel_memory_region.h
+++ b/drivers/gpu/drm/i915/intel_memory_region.h
@@ -86,6 +86,7 @@ struct intel_memory_region {
u16 instance;
enum intel_region_id id;
char name[16];
+ bool private; /* not for userspace */
struct list_head reserved;
--
2.26.3
More information about the Intel-gfx-trybot
mailing list