mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
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
This commit is contained in:
parent
293f86b365
commit
07583467c2
2 changed files with 3 additions and 10 deletions
|
@ -1704,8 +1704,6 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev)
|
||||||
pr_debug("Swap list %d was clean\n", i);
|
pr_debug("Swap list %d was clean\n", i);
|
||||||
spin_unlock(&glob->lru_lock);
|
spin_unlock(&glob->lru_lock);
|
||||||
|
|
||||||
drm_vma_offset_manager_destroy(&bdev->_vma_manager);
|
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
ttm_bo_global_release();
|
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;
|
struct ttm_bo_global *glob = &ttm_bo_glob;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!vma_manager)
|
if (WARN_ON(vma_manager == NULL))
|
||||||
vma_manager = &bdev->_vma_manager;
|
return -EINVAL;
|
||||||
|
|
||||||
ret = ttm_bo_global_init();
|
ret = ttm_bo_global_init();
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -1742,9 +1740,6 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev,
|
||||||
goto out_no_sys;
|
goto out_no_sys;
|
||||||
|
|
||||||
bdev->vma_manager = vma_manager;
|
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_DELAYED_WORK(&bdev->wq, ttm_bo_delayed_workqueue);
|
||||||
INIT_LIST_HEAD(&bdev->ddestroy);
|
INIT_LIST_HEAD(&bdev->ddestroy);
|
||||||
bdev->dev_mapping = mapping;
|
bdev->dev_mapping = mapping;
|
||||||
|
|
|
@ -442,7 +442,6 @@ extern struct ttm_bo_global {
|
||||||
* @driver: Pointer to a struct ttm_bo_driver struct setup by the driver.
|
* @driver: Pointer to a struct ttm_bo_driver struct setup by the driver.
|
||||||
* @man: An array of mem_type_managers.
|
* @man: An array of mem_type_managers.
|
||||||
* @vma_manager: Address space manager (pointer)
|
* @vma_manager: Address space manager (pointer)
|
||||||
* @_vma_manager: Address space manager (enbedded)
|
|
||||||
* lru_lock: Spinlock that protects the buffer+device lru lists and
|
* lru_lock: Spinlock that protects the buffer+device lru lists and
|
||||||
* ddestroy lists.
|
* ddestroy lists.
|
||||||
* @dev_mapping: A pointer to the struct address_space representing the
|
* @dev_mapping: A pointer to the struct address_space representing the
|
||||||
|
@ -466,7 +465,6 @@ struct ttm_bo_device {
|
||||||
* Protected by internal locks.
|
* Protected by internal locks.
|
||||||
*/
|
*/
|
||||||
struct drm_vma_offset_manager *vma_manager;
|
struct drm_vma_offset_manager *vma_manager;
|
||||||
struct drm_vma_offset_manager _vma_manager;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Protected by the global:lru lock.
|
* Protected by the global:lru lock.
|
||||||
|
@ -587,7 +585,7 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev);
|
||||||
* @glob: A pointer to an initialized struct ttm_bo_global.
|
* @glob: A pointer to an initialized struct ttm_bo_global.
|
||||||
* @driver: A pointer to a struct ttm_bo_driver set up by the caller.
|
* @driver: A pointer to a struct ttm_bo_driver set up by the caller.
|
||||||
* @mapping: The address space to use for this bo.
|
* @mapping: The address space to use for this bo.
|
||||||
* @vma_manager: A pointer to a vma manager or NULL.
|
* @vma_manager: A pointer to a vma manager.
|
||||||
* @file_page_offset: Offset into the device address space that is available
|
* @file_page_offset: Offset into the device address space that is available
|
||||||
* for buffer data. This ensures compatibility with other users of the
|
* for buffer data. This ensures compatibility with other users of the
|
||||||
* address space.
|
* address space.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue