Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: align the plane_vma to min_page_size of stolen mem

Align the plane vma size to the stolem memory regions' min_page_size.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
cc: Matthew Auld <matthew.auld@intel.com>
cc: Chris P Wilson <chris.p.wilson@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220128185209.18077-3-ramalingam.c@intel.com

+3 -2
+3 -2
drivers/gpu/drm/i915/display/intel_plane_initial.c
··· 46 46 initial_plane_vma(struct drm_i915_private *i915, 47 47 struct intel_initial_plane_config *plane_config) 48 48 { 49 + struct intel_memory_region *mem = i915->mm.stolen_region; 49 50 struct drm_i915_gem_object *obj; 50 51 struct i915_vma *vma; 51 52 u32 base, size; 52 53 53 - if (plane_config->size == 0) 54 + if (!mem || plane_config->size == 0) 54 55 return NULL; 55 56 56 57 base = round_down(plane_config->base, 57 58 I915_GTT_MIN_ALIGNMENT); 58 59 size = round_up(plane_config->base + plane_config->size, 59 - I915_GTT_MIN_ALIGNMENT); 60 + mem->min_page_size); 60 61 size -= base; 61 62 62 63 /*