Commit e33dc182 authored by Dave Airlie's avatar Dave Airlie

drm/radeon: use new ttm man init path

Use the new common manager init path.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-17-airlied@gmail.com
parent 158d20d1
......@@ -70,11 +70,10 @@ static int radeon_ttm_init_vram(struct radeon_device *rdev)
{
struct ttm_mem_type_manager *man = &rdev->mman.bdev.man[TTM_PL_VRAM];
man->func = &ttm_bo_manager_func;
man->available_caching = TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC;
man->default_caching = TTM_PL_FLAG_WC;
return ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_VRAM,
return ttm_range_man_init(&rdev->mman.bdev, man,
rdev->mc.real_vram_size >> PAGE_SHIFT);
}
......@@ -82,7 +81,6 @@ static int radeon_ttm_init_gtt(struct radeon_device *rdev)
{
struct ttm_mem_type_manager *man = &rdev->mman.bdev.man[TTM_PL_TT];
man->func = &ttm_bo_manager_func;
man->available_caching = TTM_PL_MASK_CACHING;
man->default_caching = TTM_PL_FLAG_CACHED;
man->use_tt = true;
......@@ -98,7 +96,7 @@ static int radeon_ttm_init_gtt(struct radeon_device *rdev)
}
#endif
return ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_TT,
return ttm_range_man_init(&rdev->mman.bdev, man,
rdev->mc.gtt_size >> PAGE_SHIFT);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment