Using single call to set multiple pages to wc reduces number of expensive cache
flushes.

Signed-off-by: Pauli Nieminen <suok...@gmail.com>
---
 drivers/gpu/drm/ttm/ttm_page_alloc.c |   12 +-----------
 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 af91994..111c70b 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -124,17 +124,7 @@ static struct ttm_pool_manager _manager = {
        .page_alloc_inited      = ATOMIC_INIT(0)
 };
 
-#ifdef CONFIG_X86
-/* TODO: add this to x86 like _uc, this version here is inefficient */
-static int set_pages_array_wc(struct page **pages, int addrinarray)
-{
-       int i;
-
-       for (i = 0; i < addrinarray; i++)
-               set_memory_wc((unsigned long)page_address(pages[i]), 1);
-       return 0;
-}
-#else
+#ifndef CONFIG_X86
 static int set_pages_array_wb(struct page **pages, int addrinarray)
 {
 #ifdef TTM_HAS_AGP
-- 
1.6.3.3


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to