drm/i915: Do not leak pages when freeing userptr objects
sg_alloc_table_from_pages() can build us a table with coalesced ranges which
means we need to iterate over pages and not sg table entries when releasing
page references.
Signed-off-by: Tvrtko Ursulin <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: "Barbalho, Rafael" <[email protected]>
Tested-by: Rafael Barbalho <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Cc: [email protected]
[danvet: Remove unused local variable sg.]
Signed-off-by: Daniel Vetter <[email protected]>