diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2008-03-25 20:39:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-03-26 17:23:41 -0400 |
commit | d546b67a940eb42a99f56b86c5cd8d47c8348c2a (patch) | |
tree | 5382b2d1800756aedad0a25643081de2eec6a4bf /arch/x86/mm/ioremap.c | |
parent | 76c324182bbd29dfe4298ca65efb15be18055df1 (diff) |
x86: fix performance drop for glx
fix the 3D performance drop reported at:
http://bugzilla.kernel.org/show_bug.cgi?id=10328
fb drivers are using ioremap()/ioremap_nocache(), followed by mtrr_add with
WC attribute. Recent changes in page attribute code made both
ioremap()/ioremap_nocache() mappings as UC (instead of previous UC-). This
breaks the graphics performance, as the effective memory type is UC instead
of expected WC.
The correct way to fix this is to add ioremap_wc() (which uses UC- in the
absence of PAT kernel support and WC with PAT) and change all the
fb drivers to use this new ioremap_wc() API.
We can take this correct and longer route for post 2.6.25. For now,
revert back to the UC- behavior for ioremap/ioremap_nocache.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/ioremap.c')
-rw-r--r-- | arch/x86/mm/ioremap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 4afaba0ed722..794895c6dcc9 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -137,7 +137,11 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size, | |||
137 | switch (mode) { | 137 | switch (mode) { |
138 | case IOR_MODE_UNCACHED: | 138 | case IOR_MODE_UNCACHED: |
139 | default: | 139 | default: |
140 | prot = PAGE_KERNEL_NOCACHE; | 140 | /* |
141 | * FIXME: we will use UC MINUS for now, as video fb drivers | ||
142 | * depend on it. Upcoming ioremap_wc() will fix this behavior. | ||
143 | */ | ||
144 | prot = PAGE_KERNEL_UC_MINUS; | ||
141 | break; | 145 | break; |
142 | case IOR_MODE_CACHED: | 146 | case IOR_MODE_CACHED: |
143 | prot = PAGE_KERNEL; | 147 | prot = PAGE_KERNEL; |