aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm/ttm_tt.c
diff options
context:
space:
mode:
authorChristian König2020-09-30 16:44:16 +0200
committerChristian König2020-10-15 12:51:35 +0200
commitce65b874001d756294e0b7cf06c51137af964f38 (patch)
tree609d12c729903bc175c665ce3cd39ef9b690c234 /drivers/gpu/drm/ttm/ttm_tt.c
parent867bcecd6ae4632e3faf38d381dd5a697b9503d1 (diff)
drm/ttm: nuke caching placement flags
Changing the caching on the fly never really worked flawlessly. So stop this completely and just let drivers specific the desired caching in the tt or bus object. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Link: https://patchwork.freedesktop.org/patch/394256/
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_tt.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_tt.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index a465f51df027..3e5dd6271d4c 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -114,35 +114,6 @@ static int ttm_sg_tt_alloc_page_directory(struct ttm_dma_tt *ttm)
return 0;
}
-static int ttm_tt_set_caching(struct ttm_tt *ttm, enum ttm_caching caching)
-{
- if (ttm->caching == caching)
- return 0;
-
- /* Can't change the caching state after TT is populated */
- if (WARN_ON_ONCE(ttm_tt_is_populated(ttm)))
- return -EINVAL;
-
- ttm->caching = caching;
-
- return 0;
-}
-
-int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement)
-{
- enum ttm_caching state;
-
- if (placement & TTM_PL_FLAG_WC)
- state = ttm_write_combined;
- else if (placement & TTM_PL_FLAG_UNCACHED)
- state = ttm_uncached;
- else
- state = ttm_cached;
-
- return ttm_tt_set_caching(ttm, state);
-}
-EXPORT_SYMBOL(ttm_tt_set_placement_caching);
-
void ttm_tt_destroy_common(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
{
ttm_tt_unpopulate(bdev, ttm);