Skip to content

Commit 5e7f44b

Browse files
matt-auldjlahtine-intel
authored andcommitted
drm/i915/gtt: reduce overzealous alignment constraints for GGTT
Currently this will enforce both 2M alignment and padding for any LMEM pages inserted into the GGTT. However, this was only meant to be applied to the compact-pt layout with the ppGTT. For the GGTT we can reduce the alignment and padding to 64K. Bspec: 45015 Fixes: 87bd701 ("drm/i915: enforce min GTT alignment for discrete cards") Signed-off-by: Matthew Auld <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Robert Beckett <[email protected]> Cc: Ramalingam C <[email protected]> Reviewed-by: Thomas Hellström <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit c64fa77) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 4546281 commit 5e7f44b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/i915/gt/intel_gtt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ void i915_address_space_init(struct i915_address_space *vm, int subclass)
234234
memset64(vm->min_alignment, I915_GTT_MIN_ALIGNMENT,
235235
ARRAY_SIZE(vm->min_alignment));
236236

237-
if (HAS_64K_PAGES(vm->i915) && NEEDS_COMPACT_PT(vm->i915)) {
237+
if (HAS_64K_PAGES(vm->i915) && NEEDS_COMPACT_PT(vm->i915) &&
238+
subclass == VM_CLASS_PPGTT) {
238239
vm->min_alignment[INTEL_MEMORY_LOCAL] = I915_GTT_PAGE_SIZE_2M;
239240
vm->min_alignment[INTEL_MEMORY_STOLEN_LOCAL] = I915_GTT_PAGE_SIZE_2M;
240241
} else if (HAS_64K_PAGES(vm->i915)) {

0 commit comments

Comments
 (0)