OSDN Git Service

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)
committerChristian König <christian.koenig@amd.com>
Thu, 30 Jul 2020 11:55:28 +0000 (13:55 +0200)
commitc0001213d195d1bac83e0744c06ff06dd5a8ba53
tree7feaaa214e191a389cd34a4e8026bad1c15f3d84
parentf4a1692491b5cce8978cea19cb8946bc2c6f14bc
drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access

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/
drivers/gpu/drm/ttm/ttm_bo_vm.c