diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-09-05 10:05:09 +0300 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-09-11 09:03:25 +0300 |
commit | 07583467c256ed1acacb204a96d69beacb34b7f6 (patch) | |
tree | fd1263575cb1a18ba9bb759d323f3eb6cc4e72ac /drivers/gpu/drm/ttm | |
parent | 293f86b365ad678dd89b61caa11b67270cc542a0 (diff) | |
download | linux-07583467c256ed1acacb204a96d69beacb34b7f6.tar.xz |
drm/ttm: remove embedded vma_offset_manager
No users left. Drivers either setup vma_offset_manager themself
(vmwgfx) or pass the gem vma_offset_manager to ttm_bo_device_init
(all other drivers).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-9-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 8dc26babc5cb..881cf26d698e 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1704,8 +1704,6 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev) pr_debug("Swap list %d was clean\n", i); spin_unlock(&glob->lru_lock); - drm_vma_offset_manager_destroy(&bdev->_vma_manager); - if (!ret) ttm_bo_global_release(); @@ -1722,8 +1720,8 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev, struct ttm_bo_global *glob = &ttm_bo_glob; int ret; - if (!vma_manager) - vma_manager = &bdev->_vma_manager; + if (WARN_ON(vma_manager == NULL)) + return -EINVAL; ret = ttm_bo_global_init(); if (ret) @@ -1742,9 +1740,6 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev, goto out_no_sys; bdev->vma_manager = vma_manager; - drm_vma_offset_manager_init(&bdev->_vma_manager, - DRM_FILE_PAGE_OFFSET_START, - DRM_FILE_PAGE_OFFSET_SIZE); INIT_DELAYED_WORK(&bdev->wq, ttm_bo_delayed_workqueue); INIT_LIST_HEAD(&bdev->ddestroy); bdev->dev_mapping = mapping; |