aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-06-19 00:27:53 -0400
committerDave Airlie <airlied@redhat.com>2008-06-19 00:27:53 -0400
commit62c96b9d0917894c164aa3e474a3ff3bca1554ae (patch)
tree71b88f16aaf88385f6dfbc59dabafc9f699abf61 /drivers
parent25ce77abf8be3a96b3673e46722a9bd05f149584 (diff)
agp/intel: cleanup some serious whitespace badness
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/agp/intel-agp.c134
1 files changed, 66 insertions, 68 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index b52988df2979..30aa01b738b4 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -1198,45 +1198,45 @@ static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size)
1198 */ 1198 */
1199static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge) 1199static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge)
1200{ 1200{
1201 int page_order; 1201 int page_order;
1202 struct aper_size_info_fixed *size; 1202 struct aper_size_info_fixed *size;
1203 int num_entries; 1203 int num_entries;
1204 u32 temp; 1204 u32 temp;
1205 int gtt_offset, gtt_size; 1205 int gtt_offset, gtt_size;
1206 1206
1207 size = agp_bridge->current_size; 1207 size = agp_bridge->current_size;
1208 page_order = size->page_order; 1208 page_order = size->page_order;
1209 num_entries = size->num_entries; 1209 num_entries = size->num_entries;
1210 agp_bridge->gatt_table_real = NULL; 1210 agp_bridge->gatt_table_real = NULL;
1211 1211
1212 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp); 1212 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp);
1213 1213
1214 temp &= 0xfff00000; 1214 temp &= 0xfff00000;
1215 1215
1216 intel_i965_get_gtt_range(&gtt_offset, &gtt_size); 1216 intel_i965_get_gtt_range(&gtt_offset, &gtt_size);
1217 1217
1218 intel_private.gtt = ioremap((temp + gtt_offset) , gtt_size); 1218 intel_private.gtt = ioremap((temp + gtt_offset) , gtt_size);
1219 1219
1220 if (!intel_private.gtt) 1220 if (!intel_private.gtt)
1221 return -ENOMEM; 1221 return -ENOMEM;
1222 1222
1223 intel_private.registers = ioremap(temp, 128 * 4096); 1223 intel_private.registers = ioremap(temp, 128 * 4096);
1224 if (!intel_private.registers) { 1224 if (!intel_private.registers) {
1225 iounmap(intel_private.gtt); 1225 iounmap(intel_private.gtt);
1226 return -ENOMEM; 1226 return -ENOMEM;
1227 } 1227 }
1228 1228
1229 temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000; 1229 temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000;
1230 global_cache_flush(); /* FIXME: ? */ 1230 global_cache_flush(); /* FIXME: ? */
1231 1231
1232 /* we have to call this as early as possible after the MMIO base address is known */ 1232 /* we have to call this as early as possible after the MMIO base address is known */
1233 intel_i830_init_gtt_entries(); 1233 intel_i830_init_gtt_entries();
1234 1234
1235 agp_bridge->gatt_table = NULL; 1235 agp_bridge->gatt_table = NULL;
1236 1236
1237 agp_bridge->gatt_bus_addr = temp; 1237 agp_bridge->gatt_bus_addr = temp;
1238 1238
1239 return 0; 1239 return 0;
1240} 1240}
1241 1241
1242 1242
@@ -1753,7 +1753,7 @@ static const struct agp_bridge_driver intel_815_driver = {
1753 .free_by_type = agp_generic_free_by_type, 1753 .free_by_type = agp_generic_free_by_type,
1754 .agp_alloc_page = agp_generic_alloc_page, 1754 .agp_alloc_page = agp_generic_alloc_page,
1755 .agp_destroy_page = agp_generic_destroy_page, 1755 .agp_destroy_page = agp_generic_destroy_page,
1756 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1756 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1757}; 1757};
1758 1758
1759static const struct agp_bridge_driver intel_830_driver = { 1759static const struct agp_bridge_driver intel_830_driver = {
@@ -1954,28 +1954,26 @@ static const struct agp_bridge_driver intel_915_driver = {
1954}; 1954};
1955 1955
1956static const struct agp_bridge_driver intel_i965_driver = { 1956static const struct agp_bridge_driver intel_i965_driver = {
1957 .owner = THIS_MODULE, 1957 .owner = THIS_MODULE,
1958 .aperture_sizes = intel_i830_sizes, 1958 .aperture_sizes = intel_i830_sizes,
1959 .size_type = FIXED_APER_SIZE, 1959 .size_type = FIXED_APER_SIZE,
1960 .num_aperture_sizes = 4, 1960 .num_aperture_sizes = 4,
1961 .needs_scratch_page = true, 1961 .needs_scratch_page = true,
1962 .configure = intel_i915_configure, 1962 .cleanup = intel_i915_cleanup,
1963 .fetch_size = intel_i9xx_fetch_size, 1963 .tlb_flush = intel_i810_tlbflush,
1964 .cleanup = intel_i915_cleanup, 1964 .mask_memory = intel_i965_mask_memory,
1965 .tlb_flush = intel_i810_tlbflush, 1965 .masks = intel_i810_masks,
1966 .mask_memory = intel_i965_mask_memory, 1966 .agp_enable = intel_i810_agp_enable,
1967 .masks = intel_i810_masks, 1967 .cache_flush = global_cache_flush,
1968 .agp_enable = intel_i810_agp_enable, 1968 .create_gatt_table = intel_i965_create_gatt_table,
1969 .cache_flush = global_cache_flush, 1969 .free_gatt_table = intel_i830_free_gatt_table,
1970 .create_gatt_table = intel_i965_create_gatt_table, 1970 .insert_memory = intel_i915_insert_entries,
1971 .free_gatt_table = intel_i830_free_gatt_table, 1971 .remove_memory = intel_i915_remove_entries,
1972 .insert_memory = intel_i915_insert_entries, 1972 .alloc_by_type = intel_i830_alloc_by_type,
1973 .remove_memory = intel_i915_remove_entries, 1973 .free_by_type = intel_i810_free_by_type,
1974 .alloc_by_type = intel_i830_alloc_by_type, 1974 .agp_alloc_page = agp_generic_alloc_page,
1975 .free_by_type = intel_i810_free_by_type, 1975 .agp_destroy_page = agp_generic_destroy_page,
1976 .agp_alloc_page = agp_generic_alloc_page, 1976 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
1977 .agp_destroy_page = agp_generic_destroy_page,
1978 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
1979 .chipset_flush = intel_i915_chipset_flush, 1977 .chipset_flush = intel_i915_chipset_flush,
1980}; 1978};
1981 1979
@@ -2004,28 +2002,28 @@ static const struct agp_bridge_driver intel_7505_driver = {
2004}; 2002};
2005 2003
2006static const struct agp_bridge_driver intel_g33_driver = { 2004static const struct agp_bridge_driver intel_g33_driver = {
2007 .owner = THIS_MODULE, 2005 .owner = THIS_MODULE,
2008 .aperture_sizes = intel_i830_sizes, 2006 .aperture_sizes = intel_i830_sizes,
2009 .size_type = FIXED_APER_SIZE, 2007 .size_type = FIXED_APER_SIZE,
2010 .num_aperture_sizes = 4, 2008 .num_aperture_sizes = 4,
2011 .needs_scratch_page = true, 2009 .needs_scratch_page = true,
2012 .configure = intel_i915_configure, 2010 .configure = intel_i915_configure,
2013 .fetch_size = intel_i9xx_fetch_size, 2011 .fetch_size = intel_i9xx_fetch_size,
2014 .cleanup = intel_i915_cleanup, 2012 .cleanup = intel_i915_cleanup,
2015 .tlb_flush = intel_i810_tlbflush, 2013 .tlb_flush = intel_i810_tlbflush,
2016 .mask_memory = intel_i965_mask_memory, 2014 .mask_memory = intel_i965_mask_memory,
2017 .masks = intel_i810_masks, 2015 .masks = intel_i810_masks,
2018 .agp_enable = intel_i810_agp_enable, 2016 .agp_enable = intel_i810_agp_enable,
2019 .cache_flush = global_cache_flush, 2017 .cache_flush = global_cache_flush,
2020 .create_gatt_table = intel_i915_create_gatt_table, 2018 .create_gatt_table = intel_i915_create_gatt_table,
2021 .free_gatt_table = intel_i830_free_gatt_table, 2019 .free_gatt_table = intel_i830_free_gatt_table,
2022 .insert_memory = intel_i915_insert_entries, 2020 .insert_memory = intel_i915_insert_entries,
2023 .remove_memory = intel_i915_remove_entries, 2021 .remove_memory = intel_i915_remove_entries,
2024 .alloc_by_type = intel_i830_alloc_by_type, 2022 .alloc_by_type = intel_i830_alloc_by_type,
2025 .free_by_type = intel_i810_free_by_type, 2023 .free_by_type = intel_i810_free_by_type,
2026 .agp_alloc_page = agp_generic_alloc_page, 2024 .agp_alloc_page = agp_generic_alloc_page,
2027 .agp_destroy_page = agp_generic_destroy_page, 2025 .agp_destroy_page = agp_generic_destroy_page,
2028 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 2026 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
2029 .chipset_flush = intel_i915_chipset_flush, 2027 .chipset_flush = intel_i915_chipset_flush,
2030}; 2028};
2031 2029