summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamalingam C <ramalingam.c@intel.com>2022-01-28 19:52:06 +0100
committerRamalingam C <ramalingam.c@intel.com>2022-02-11 12:41:29 +0100
commit165bbfba34cb4c8f31d1e643abd2d5cb6eba1b90 (patch)
treed0ee01834f2fa06ced0370410a5b77492e874636
parentdrm/i915/dg2: Add Wa_22011450934 (diff)
downloadlinux-165bbfba34cb4c8f31d1e643abd2d5cb6eba1b90.tar.xz
linux-165bbfba34cb4c8f31d1e643abd2d5cb6eba1b90.zip
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
-rw-r--r--drivers/gpu/drm/i915/display/intel_plane_initial.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index e4186a0b8edb..543877998078 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -46,17 +46,18 @@ static struct i915_vma *
initial_plane_vma(struct drm_i915_private *i915,
struct intel_initial_plane_config *plane_config)
{
+ struct intel_memory_region *mem = i915->mm.stolen_region;
struct drm_i915_gem_object *obj;
struct i915_vma *vma;
u32 base, size;
- if (plane_config->size == 0)
+ if (!mem || plane_config->size == 0)
return NULL;
base = round_down(plane_config->base,
I915_GTT_MIN_ALIGNMENT);
size = round_up(plane_config->base + plane_config->size,
- I915_GTT_MIN_ALIGNMENT);
+ mem->min_page_size);
size -= base;
/*