From: Matthew Auld Date: Thu, 29 Apr 2021 10:30:49 +0000 (+0100) Subject: drm/i915: mark stolen as private X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=36150bba44329d7a96e58498bfc91fee9a2de08c;p=kernel.git drm/i915: mark stolen as private 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 Cc: Joonas Lahtinen Cc: Thomas Hellström Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-2-matthew.auld@intel.com --- diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c index e1a32672bbe87..293f640faa0aa 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c @@ -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; } diff --git a/drivers/gpu/drm/i915/intel_memory_region.h b/drivers/gpu/drm/i915/intel_memory_region.h index 4c8ec15af55fa..942fc4f68764d 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;