diff options
author | Matthew Auld <matthew.auld@intel.com> | 2019-10-18 12:07:51 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-10-18 14:41:05 +0300 |
commit | 72405c3d7850c85dccbe4629720004ae933c2add (patch) | |
tree | 69ad9500a7a86cb677cec68a85d0c081a411c075 /drivers/gpu/drm/i915/i915_gem_gtt.c | |
parent | da1184cd41d4c6b316a937ac1da5825807e8f6fb (diff) | |
download | linux-72405c3d7850c85dccbe4629720004ae933c2add.tar.xz |
drm/i915: treat stolen as a region
Convert stolen memory over to a region object. Still leaves open the
question with what to do with pre-allocated objects...
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191018090751.28295-3-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_gtt.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 263f1cea0b64..0df057838a24 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -2748,8 +2748,6 @@ void i915_gem_cleanup_memory_regions(struct drm_i915_private *i915) { int i; - i915_gem_cleanup_stolen(i915); - for (i = 0; i < INTEL_REGION_UNKNOWN; i++) { struct intel_memory_region *region = i915->mm.regions[i]; @@ -2762,15 +2760,6 @@ int i915_gem_init_memory_regions(struct drm_i915_private *i915) { int err, i; - /* - * Initialise stolen early so that we may reserve preallocated - * objects for the BIOS to KMS transition. - */ - /* XXX: stolen will become a region at some point */ - err = i915_gem_init_stolen(i915); - if (err) - return err; - for (i = 0; i < INTEL_REGION_UNKNOWN; i++) { struct intel_memory_region *mem = ERR_PTR(-ENODEV); u32 type; @@ -2783,6 +2772,9 @@ int i915_gem_init_memory_regions(struct drm_i915_private *i915) case INTEL_MEMORY_SYSTEM: mem = i915_gem_shmem_setup(i915); break; + case INTEL_MEMORY_STOLEN: + mem = i915_gem_stolen_setup(i915); + break; } if (IS_ERR(mem)) { |