From: CQ Tang <cq.tang@xxxxxxxxx> Stolen memory is always allocated as physically contiguous pages, mark the object flags as such. Signed-off-by: CQ Tang <cq.tang@xxxxxxxxx> Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx> --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c index 0722b909cd09..b903ba95cf8f 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c @@ -637,7 +637,8 @@ static const struct drm_i915_gem_object_ops i915_gem_object_stolen_ops = { static int __i915_gem_object_create_stolen(struct intel_memory_region *mem, struct drm_i915_gem_object *obj, - struct drm_mm_node *stolen) + struct drm_mm_node *stolen, + unsigned int flags) { static struct lock_class_key lock_class; unsigned int cache_level; @@ -655,7 +656,7 @@ static int __i915_gem_object_create_stolen(struct intel_memory_region *mem, if (err) return err; - i915_gem_object_init_memory_region(obj, mem, 0); + i915_gem_object_init_memory_region(obj, mem, flags); return 0; } @@ -684,7 +685,7 @@ static int _i915_gem_object_stolen_init(struct intel_memory_region *mem, if (ret) goto err_free; - ret = __i915_gem_object_create_stolen(mem, obj, stolen); + ret = __i915_gem_object_create_stolen(mem, obj, stolen, flags); if (ret) goto err_remove; @@ -842,7 +843,8 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private *i915, goto err_stolen; } - ret = __i915_gem_object_create_stolen(mem, obj, stolen); + ret = __i915_gem_object_create_stolen(mem, obj, stolen, + I915_BO_ALLOC_CONTIGUOUS); if (ret) goto err_object_free; -- 2.26.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx