drm/ttm: clean up non-x86 definitions on ttm_tt
All non-x86 definitions are moved to ttm_set_memory header, so remove it from ttm_tt.c. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Родитель
dceb219fc6
Коммит
df36b2fb83
|
@ -38,9 +38,7 @@
|
||||||
#include <drm/drm_cache.h>
|
#include <drm/drm_cache.h>
|
||||||
#include <drm/ttm/ttm_bo_driver.h>
|
#include <drm/ttm/ttm_bo_driver.h>
|
||||||
#include <drm/ttm/ttm_page_alloc.h>
|
#include <drm/ttm/ttm_page_alloc.h>
|
||||||
#ifdef CONFIG_X86
|
#include <drm/ttm/ttm_set_memory.h>
|
||||||
#include <asm/set_memory.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allocates a ttm structure for the given BO.
|
* Allocates a ttm structure for the given BO.
|
||||||
|
@ -115,10 +113,9 @@ static int ttm_sg_tt_alloc_page_directory(struct ttm_dma_tt *ttm)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_X86
|
static int ttm_tt_set_page_caching(struct page *p,
|
||||||
static inline int ttm_tt_set_page_caching(struct page *p,
|
enum ttm_caching_state c_old,
|
||||||
enum ttm_caching_state c_old,
|
enum ttm_caching_state c_new)
|
||||||
enum ttm_caching_state c_new)
|
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -129,26 +126,18 @@ static inline int ttm_tt_set_page_caching(struct page *p,
|
||||||
/* p isn't in the default caching state, set it to
|
/* p isn't in the default caching state, set it to
|
||||||
* writeback first to free its current memtype. */
|
* writeback first to free its current memtype. */
|
||||||
|
|
||||||
ret = set_pages_wb(p, 1);
|
ret = ttm_set_pages_wb(p, 1);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c_new == tt_wc)
|
if (c_new == tt_wc)
|
||||||
ret = set_memory_wc((unsigned long) page_address(p), 1);
|
ret = ttm_set_pages_wc(p, 1);
|
||||||
else if (c_new == tt_uncached)
|
else if (c_new == tt_uncached)
|
||||||
ret = set_pages_uc(p, 1);
|
ret = ttm_set_pages_uc(p, 1);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#else /* CONFIG_X86 */
|
|
||||||
static inline int ttm_tt_set_page_caching(struct page *p,
|
|
||||||
enum ttm_caching_state c_old,
|
|
||||||
enum ttm_caching_state c_new)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_X86 */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Change caching policy for the linear kernel map
|
* Change caching policy for the linear kernel map
|
||||||
|
|
Загрузка…
Ссылка в новой задаче