Skip to content

Commit

Permalink
drm/i915/migrate: fix length calculation
Browse files Browse the repository at this point in the history
[ Upstream commit 31d7074 ]

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]
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
matt-auld authored and gregkh committed Jan 12, 2023
1 parent 8b25a52 commit af0265d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gt/intel_migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static struct i915_address_space *migrate_vm(struct intel_gt *gt)
goto err_vm;

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

return &vm->vm;
Expand Down

0 comments on commit af0265d

Please sign in to comment.