diff options
author | Dave Airlie <airlied@redhat.com> | 2020-08-04 05:56:19 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-08-06 06:12:39 +0300 |
commit | 37205891d84f9269de61d6e85c24607209478a85 (patch) | |
tree | 64b43845d0885fcdb5d830872d44b74c049d7732 /drivers/gpu/drm/vmwgfx | |
parent | 0af135b892bf06c1a56cb0cd9632feb34511f9ee (diff) | |
download | linux-37205891d84f9269de61d6e85c24607209478a85.tar.xz |
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/vmwgfx')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index c30021d0215c..f4b8de57a761 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -626,13 +626,9 @@ static int vmw_vram_manager_init(struct vmw_private *dev_priv) #ifdef CONFIG_TRANSPARENT_HUGEPAGE ret = vmw_thp_init(dev_priv); #else - struct ttm_mem_type_manager *man = &dev_priv->bdev.man[TTM_PL_VRAM]; - - man->available_caching = TTM_PL_FLAG_CACHED; - man->default_caching = TTM_PL_FLAG_CACHED; - - ret = ttm_range_man_init(&dev_priv->bdev, man, - dev_priv->vram_size >> PAGE_SHIFT); + ret = ttm_range_man_init(&dev_priv->bdev, TTM_PL_VRAM, + TTM_PL_FLAG_CACHED, TTM_PL_FLAG_CACHED, + false, dev_priv->vram_size >> PAGE_SHIFT); #endif ttm_manager_type(&dev_priv->bdev, TTM_PL_VRAM)->use_type = false; return ret; @@ -643,8 +639,7 @@ static void vmw_vram_manager_fini(struct vmw_private *dev_priv) #ifdef CONFIG_TRANSPARENT_HUGEPAGE vmw_thp_fini(dev_priv); #else - ttm_bo_man_fini(&dev_priv->bdev, - ttm_manager_type(&dev_priv->bdev, TTM_PL_VRAM)); + ttm_bo_man_fini(&dev_priv->bdev, TTM_PL_VRAM); #endif } |