drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 28 Jul 2020 18:27:04 +0000 (14:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Aug 2020 09:49:05 +0000 (11:49 +0200)
commit106f319212e5ff1c11e926bc3e0d4b59eadcc704
tree8ca9298448f7e8e3099701aa7398c50d1503fee8
parent8da93b0539514f20501080e7af45e6103dea90d4
drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access

[ Upstream commit c0001213d195d1bac83e0744c06ff06dd5a8ba53 ]

VMAs with a pg_offs that's offset from the start of the vma_node need
to adjust the offset within the BO accordingly. This matches the
offset calculation in ttm_bo_vm_fault_reserved.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Tested-by: Laurent Morichetti <laurent.morichetti@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/381169/
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/ttm/ttm_bo_vm.c