aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/intel-gtt.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-08-24 17:07:59 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-08 16:20:08 -0400
commitbfde067bebe72293b1f909a8b35ee8d82811f8f5 (patch)
treec4b15e42fb1683426e944b589994c52257d2bc49 /drivers/char/agp/intel-gtt.c
parentd7cca2f7000243ac43a389110c3d8474f582ae3f (diff)
intel-gtt: s/intel_i830_init_gtt_entries/intel_gtt_stolen_entries
First simple step towards a more generic initialization. This is needed to disentangle the agp stuff from the stuff that is actually needed by drm/i915. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/char/agp/intel-gtt.c')
-rw-r--r--drivers/char/agp/intel-gtt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 96e5fd1aa554..9edeb060efb2 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -531,10 +531,10 @@ static struct aper_size_info_fixed intel_i830_sizes[] =
531 {512, 131072, 7}, 531 {512, 131072, 7},
532}; 532};
533 533
534static void intel_i830_init_gtt_entries(void) 534static unsigned int intel_gtt_stolen_entries(void)
535{ 535{
536 u16 gmch_ctrl; 536 u16 gmch_ctrl;
537 int gtt_entries = 0; 537 unsigned int gtt_entries = 0;
538 u8 rdct; 538 u8 rdct;
539 int local = 0; 539 int local = 0;
540 static const int ddt[4] = { 0, 16, 32, 64 }; 540 static const int ddt[4] = { 0, 16, 32, 64 };
@@ -770,7 +770,7 @@ static void intel_i830_init_gtt_entries(void)
770 gtt_entries = 0; 770 gtt_entries = 0;
771 } 771 }
772 772
773 intel_private.base.gtt_stolen_entries = gtt_entries; 773 return gtt_entries;
774} 774}
775 775
776static void intel_i830_fini_flush(void) 776static void intel_i830_fini_flush(void)
@@ -846,7 +846,7 @@ static int intel_i830_create_gatt_table(struct agp_bridge_data *bridge)
846 global_cache_flush(); /* FIXME: ?? */ 846 global_cache_flush(); /* FIXME: ?? */
847 847
848 /* we have to call this as early as possible after the MMIO base address is known */ 848 /* we have to call this as early as possible after the MMIO base address is known */
849 intel_i830_init_gtt_entries(); 849 intel_private.base.gtt_stolen_entries = intel_gtt_stolen_entries();
850 if (intel_private.base.gtt_stolen_entries == 0) { 850 if (intel_private.base.gtt_stolen_entries == 0) {
851 iounmap(intel_private.registers); 851 iounmap(intel_private.registers);
852 return -ENOMEM; 852 return -ENOMEM;
@@ -1336,7 +1336,7 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
1336 global_cache_flush(); /* FIXME: ? */ 1336 global_cache_flush(); /* FIXME: ? */
1337 1337
1338 /* we have to call this as early as possible after the MMIO base address is known */ 1338 /* we have to call this as early as possible after the MMIO base address is known */
1339 intel_i830_init_gtt_entries(); 1339 intel_private.base.gtt_stolen_entries = intel_gtt_stolen_entries();
1340 if (intel_private.base.gtt_stolen_entries == 0) { 1340 if (intel_private.base.gtt_stolen_entries == 0) {
1341 iounmap(intel_private.gtt); 1341 iounmap(intel_private.gtt);
1342 iounmap(intel_private.registers); 1342 iounmap(intel_private.registers);
@@ -1460,7 +1460,7 @@ static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge)
1460 global_cache_flush(); /* FIXME: ? */ 1460 global_cache_flush(); /* FIXME: ? */
1461 1461
1462 /* we have to call this as early as possible after the MMIO base address is known */ 1462 /* we have to call this as early as possible after the MMIO base address is known */
1463 intel_i830_init_gtt_entries(); 1463 intel_private.base.gtt_stolen_entries = intel_gtt_stolen_entries();
1464 if (intel_private.base.gtt_stolen_entries == 0) { 1464 if (intel_private.base.gtt_stolen_entries == 0) {
1465 iounmap(intel_private.gtt); 1465 iounmap(intel_private.gtt);
1466 iounmap(intel_private.registers); 1466 iounmap(intel_private.registers);