diff options
author | Christian König <christian.koenig@amd.com> | 2020-09-11 17:01:21 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2020-09-15 17:05:19 +0300 |
commit | 9c3006a4cc1b165652a07727caf7926054f9aa9f (patch) | |
tree | e299050baec7afe6fef9269a0c4b005b37ff8cb6 /drivers/gpu/drm/nouveau | |
parent | 5839172f09806f828319bdb2af97ca3c6cfcb432 (diff) | |
download | linux-9c3006a4cc1b165652a07727caf7926054f9aa9f.tar.xz |
drm/ttm: remove available_caching
Instead of letting TTM make an educated guess based on
some mask all drivers should just specify what caching
they want for their CPU mappings.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/390207/
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ttm.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 1b00f32b3849..427341753441 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -200,7 +200,6 @@ nouveau_ttm_init_vram(struct nouveau_drm *drm) if (!man) return -ENOMEM; - man->available_caching = TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC; man->func = &nouveau_vram_manager; ttm_resource_manager_init(man, @@ -209,9 +208,7 @@ nouveau_ttm_init_vram(struct nouveau_drm *drm) ttm_resource_manager_set_used(man, true); return 0; } else { - return ttm_range_man_init(&drm->ttm.bdev, TTM_PL_VRAM, - TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC, - false, + return ttm_range_man_init(&drm->ttm.bdev, TTM_PL_VRAM, false, drm->gem.vram_available >> PAGE_SHIFT); } } @@ -243,8 +240,7 @@ nouveau_ttm_init_gtt(struct nouveau_drm *drm) else if (!drm->agp.bridge) func = &nv04_gart_manager; else - return ttm_range_man_init(&drm->ttm.bdev, TTM_PL_TT, - TTM_PL_MASK_CACHING, true, + return ttm_range_man_init(&drm->ttm.bdev, TTM_PL_TT, true, size_pages); man = kzalloc(sizeof(*man), GFP_KERNEL); @@ -252,7 +248,6 @@ nouveau_ttm_init_gtt(struct nouveau_drm *drm) return -ENOMEM; man->func = func; - man->available_caching = TTM_PL_MASK_CACHING; man->use_tt = true; ttm_resource_manager_init(man, size_pages); ttm_set_driver_manager(&drm->ttm.bdev, TTM_PL_TT, man); |