aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/intel-gtt.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 7fa655ac24d8..e01f5eaaec82 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -666,9 +666,14 @@ static int intel_gtt_init(void)
666 666
667 gtt_map_size = intel_private.base.gtt_total_entries * 4; 667 gtt_map_size = intel_private.base.gtt_total_entries * 4;
668 668
669 intel_private.gtt = ioremap(intel_private.gtt_bus_addr, 669 intel_private.gtt = NULL;
670 gtt_map_size); 670 if (INTEL_GTT_GEN < 6)
671 if (!intel_private.gtt) { 671 intel_private.gtt = ioremap_wc(intel_private.gtt_bus_addr,
672 gtt_map_size);
673 if (intel_private.gtt == NULL)
674 intel_private.gtt = ioremap(intel_private.gtt_bus_addr,
675 gtt_map_size);
676 if (intel_private.gtt == NULL) {
672 intel_private.driver->cleanup(); 677 intel_private.driver->cleanup();
673 iounmap(intel_private.registers); 678 iounmap(intel_private.registers);
674 return -ENOMEM; 679 return -ENOMEM;