aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2010-04-01 08:45:02 -0400
committerDave Airlie <airlied@redhat.com>2010-04-05 21:36:11 -0400
commit975efdb1bf925ad48d4e3fe5339a85f12601e10d (patch)
treea281c00d3c91721baf2f8920ca29d9ed0275e4a0 /drivers/gpu/drm/ttm
parent4f64625412be120cef9e9b97e88c406ec2c78027 (diff)
drm/ttm: Use set_pages_array_wc instead of set_memory_wc.
Using single call to set multiple pages to wc reduces number of expensive cache flushes. Signed-off-by: Pauli Nieminen <suokkos@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_page_alloc.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index f82bf805903c..57799dba35e0 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -113,17 +113,7 @@ static struct ttm_pool_manager _manager = {
113 .page_alloc_inited = ATOMIC_INIT(0) 113 .page_alloc_inited = ATOMIC_INIT(0)
114}; 114};
115 115
116#ifdef CONFIG_X86 116#ifndef CONFIG_X86
117/* TODO: add this to x86 like _uc, this version here is inefficient */
118static int set_pages_array_wc(struct page **pages, int addrinarray)
119{
120 int i;
121
122 for (i = 0; i < addrinarray; i++)
123 set_memory_wc((unsigned long)page_address(pages[i]), 1);
124 return 0;
125}
126#else
127static int set_pages_array_wb(struct page **pages, int addrinarray) 117static int set_pages_array_wb(struct page **pages, int addrinarray)
128{ 118{
129#ifdef TTM_HAS_AGP 119#ifdef TTM_HAS_AGP