Skip to content

Commit 31d7074

Browse files
committed
drm/i915/migrate: fix length calculation
No need to insert PTEs for the PTE window itself, also foreach expects a length not an end offset, which could be gigantic here with a second engine. Signed-off-by: Matthew Auld <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Ramalingam C <[email protected]> Reviewed-by: Ramalingam C <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 08c7c12 commit 31d7074

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static struct i915_address_space *migrate_vm(struct intel_gt *gt)
133133
goto err_vm;
134134

135135
/* Now allow the GPU to rewrite the PTE via its own ppGTT */
136-
vm->vm.foreach(&vm->vm, base, base + sz, insert_pte, &d);
136+
vm->vm.foreach(&vm->vm, base, d.offset - base, insert_pte, &d);
137137
}
138138

139139
return &vm->vm;

0 commit comments

Comments
 (0)