Skip to content

Commit

Permalink
drm/i915: mark stolen as private
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Matthew Auld committed May 4, 2021
1 parent 2bc9c04 commit 36150bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/i915/gem/i915_gem_stolen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/intel_memory_region.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 36150bb

Please sign in to comment.