drm/i915/migrate: fix length calculation
authorMatthew Auld <matthew.auld@intel.com>
Mon, 6 Dec 2021 11:25:38 +0000 (11:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 10:59:07 +0000 (11:59 +0100)
commitaf0265dfeffa42256a4d52b73509f91c7e9ed113
tree3c29581059fcda890497811b3fb40e7fac499c98
parent8b25a526a5e9b7040e8faaf2e54e9c331e8047fe
drm/i915/migrate: fix length calculation

[ Upstream commit 31d70749bfe110593fbe8bf45e7c7788c7d85035 ]

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 <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211206112539.3149779-3-matthew.auld@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/i915/gt/intel_migrate.c