diff options
author | Dave Airlie <airlied@redhat.com> | 2020-08-04 12:56:19 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-08-06 13:12:39 +1000 |
commit | 37205891d84f9269de61d6e85c24607209478a85 (patch) | |
tree | 64b43845d0885fcdb5d830872d44b74c049d7732 /drivers/gpu/drm/qxl/qxl_ttm.c | |
parent | 0af135b892bf06c1a56cb0cd9632feb34511f9ee (diff) | |
download | linux-37205891d84f9269de61d6e85c24607209478a85.tar.bz2 |
drm/ttm: make ttm_range_man_init/takedown take type + args
This makes it easier to move these to a driver allocated system
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-47-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_ttm.c')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_ttm.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index a0c91bce1d2e..7b9f7a94332a 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -220,12 +220,8 @@ static int qxl_ttm_init_mem_type(struct qxl_device *qdev, unsigned int type, uint64_t size) { - struct ttm_mem_type_manager *man = ttm_manager_type(&qdev->mman.bdev, type); - - man->available_caching = TTM_PL_MASK_CACHING; - man->default_caching = TTM_PL_FLAG_CACHED; - - return ttm_range_man_init(&qdev->mman.bdev, man, size); + return ttm_range_man_init(&qdev->mman.bdev, type, TTM_PL_MASK_CACHING, + TTM_PL_FLAG_CACHED, false, size); } int qxl_ttm_init(struct qxl_device *qdev) @@ -267,8 +263,8 @@ int qxl_ttm_init(struct qxl_device *qdev) void qxl_ttm_fini(struct qxl_device *qdev) { - ttm_range_man_fini(&qdev->mman.bdev, ttm_manager_type(&qdev->mman.bdev, TTM_PL_VRAM)); - ttm_range_man_fini(&qdev->mman.bdev, ttm_manager_type(&qdev->mman.bdev, TTM_PL_PRIV)); + ttm_range_man_fini(&qdev->mman.bdev, TTM_PL_VRAM); + ttm_range_man_fini(&qdev->mman.bdev, TTM_PL_PRIV); ttm_bo_device_release(&qdev->mman.bdev); DRM_INFO("qxl: ttm finalized\n"); } |