drm/i915: mark stolen as private
authorMatthew Auld <matthew.auld@intel.com>
Thu, 29 Apr 2021 10:30:49 +0000 (11:30 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Tue, 4 May 2021 09:49:06 +0000 (10:49 +0100)
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@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
Cc: Jon Bloomfield <jon.bloomfield@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Dave Airlie <airlied@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: mesa-dev@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-2-matthew.auld@intel.com
drivers/gpu/drm/i915/gem/i915_gem_stolen.c
drivers/gpu/drm/i915/intel_memory_region.h

index e1a3267..293f640 100644 (file)
@@ -803,6 +803,8 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915)
 
        intel_memory_region_set_name(mem, "stolen-local");
 
+       mem->private = true;
+
        return mem;
 }
 
@@ -821,6 +823,8 @@ i915_gem_stolen_smem_setup(struct drm_i915_private *i915)
 
        intel_memory_region_set_name(mem, "stolen-system");
 
+       mem->private = true;
+
        return mem;
 }
 
index 4c8ec15..942fc4f 100644 (file)
@@ -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;