drm/ttm: convert to unified vma offset manager
Use the new vma-manager infrastructure. This doesn't change any implementation details as the vma-offset-manager is nearly copied 1-to-1 from TTM. The vm_lock is moved into the offset manager so we can drop it from TTM. During lookup, we use the vma locking helpers to take a reference to the found object. In all other scenarios, locking stays the same as before. We always guarantee that drm_vma_offset_remove() is called only during destruction. Hence, helpers like drm_vma_node_offset_addr() are always safe as long as the node has a valid offset. This also drops the addr_space_offset member as it is a copy of vm_start in vma_node objects. Use the accessor functions instead. v4: - remove vm_lock - use drm_vma_offset_lock_lookup() to protect lookup (instead of vm_lock) Cc: Dave Airlie <airlied@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Martin Peres <martin.peres@labri.fr> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by:David Herrmann <dh.herrmann@gmail.com> Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by:
Dave Airlie <airlied@gmail.com>
Showing
- drivers/gpu/drm/ast/ast_main.c 1 addition, 1 deletiondrivers/gpu/drm/ast/ast_main.c
- drivers/gpu/drm/cirrus/cirrus_main.c 1 addition, 1 deletiondrivers/gpu/drm/cirrus/cirrus_main.c
- drivers/gpu/drm/mgag200/mgag200_main.c 1 addition, 1 deletiondrivers/gpu/drm/mgag200/mgag200_main.c
- drivers/gpu/drm/nouveau/nouveau_display.c 1 addition, 1 deletiondrivers/gpu/drm/nouveau/nouveau_display.c
- drivers/gpu/drm/nouveau/nouveau_gem.c 1 addition, 1 deletiondrivers/gpu/drm/nouveau/nouveau_gem.c
- drivers/gpu/drm/qxl/qxl_object.h 1 addition, 1 deletiondrivers/gpu/drm/qxl/qxl_object.h
- drivers/gpu/drm/qxl/qxl_release.c 1 addition, 1 deletiondrivers/gpu/drm/qxl/qxl_release.c
- drivers/gpu/drm/radeon/radeon_object.h 1 addition, 4 deletionsdrivers/gpu/drm/radeon/radeon_object.h
- drivers/gpu/drm/ttm/ttm_bo.c 15 additions, 74 deletionsdrivers/gpu/drm/ttm/ttm_bo.c
- drivers/gpu/drm/ttm/ttm_bo_util.c 2 additions, 1 deletiondrivers/gpu/drm/ttm/ttm_bo_util.c
- drivers/gpu/drm/ttm/ttm_bo_vm.c 31 additions, 50 deletionsdrivers/gpu/drm/ttm/ttm_bo_vm.c
- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c 2 additions, 2 deletionsdrivers/gpu/drm/vmwgfx/vmwgfx_resource.c
- include/drm/ttm/ttm_bo_api.h 3 additions, 12 deletionsinclude/drm/ttm/ttm_bo_api.h
- include/drm/ttm/ttm_bo_driver.h 5 additions, 5 deletionsinclude/drm/ttm/ttm_bo_driver.h
Loading
Please register or sign in to comment