• Home
  • Raw
  • Download

Lines Matching refs:bridge

183 		curr->bridge->driver->free_by_type(curr);  in agp_free_memory()
187 if (curr->bridge->driver->agp_destroy_pages) { in agp_free_memory()
188 curr->bridge->driver->agp_destroy_pages(curr); in agp_free_memory()
192 curr->bridge->driver->agp_destroy_page( in agp_free_memory()
197 curr->bridge->driver->agp_destroy_page( in agp_free_memory()
222 struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge, in agp_allocate_memory() argument
230 if (!bridge) in agp_allocate_memory()
233 cur_memory = atomic_read(&bridge->current_memory_agp); in agp_allocate_memory()
234 if ((cur_memory + page_count > bridge->max_memory_agp) || in agp_allocate_memory()
241 new->bridge = bridge; in agp_allocate_memory()
246 new = bridge->driver->alloc_by_type(page_count, type); in agp_allocate_memory()
248 new->bridge = bridge; in agp_allocate_memory()
259 if (bridge->driver->agp_alloc_pages) { in agp_allocate_memory()
260 if (bridge->driver->agp_alloc_pages(bridge, new, page_count)) { in agp_allocate_memory()
264 new->bridge = bridge; in agp_allocate_memory()
269 struct page *page = bridge->driver->agp_alloc_page(bridge); in agp_allocate_memory()
278 new->bridge = bridge; in agp_allocate_memory()
367 int agp_copy_info(struct agp_bridge_data *bridge, struct agp_kern_info *info) in agp_copy_info() argument
370 if (!bridge) { in agp_copy_info()
375 info->version.major = bridge->version->major; in agp_copy_info()
376 info->version.minor = bridge->version->minor; in agp_copy_info()
378 info->device = bridge->dev; in agp_copy_info()
379 if (bridge->mode & AGPSTAT_MODE_3_0) in agp_copy_info()
380 info->mode = bridge->mode & ~AGP3_RESERVED_MASK; in agp_copy_info()
382 info->mode = bridge->mode & ~AGP2_RESERVED_MASK; in agp_copy_info()
383 info->aper_base = bridge->gart_bus_addr; in agp_copy_info()
385 info->max_memory = bridge->max_memory_agp; in agp_copy_info()
386 info->current_memory = atomic_read(&bridge->current_memory_agp); in agp_copy_info()
387 info->cant_use_aperture = bridge->driver->cant_use_aperture; in agp_copy_info()
388 info->vm_ops = bridge->vm_ops; in agp_copy_info()
423 curr->bridge->driver->cache_flush(); in agp_bind_memory()
427 ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type); in agp_bind_memory()
463 ret_val = curr->bridge->driver->remove_memory(curr, curr->pg_start, curr->type); in agp_unbind_memory()
470 spin_lock(&curr->bridge->mapped_lock); in agp_unbind_memory()
472 spin_unlock(&curr->bridge->mapped_lock); in agp_unbind_memory()
724 u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 requested_mode, u32 bridge_agpsta… in agp_collect_device_status() argument
792 void get_agp_version(struct agp_bridge_data *bridge) in get_agp_version() argument
797 if (bridge->major_version != 0) in get_agp_version()
800 pci_read_config_dword(bridge->dev, bridge->capndx, &ncapid); in get_agp_version()
801 bridge->major_version = (ncapid >> AGP_MAJOR_VERSION_SHIFT) & 0xf; in get_agp_version()
802 bridge->minor_version = (ncapid >> AGP_MINOR_VERSION_SHIFT) & 0xf; in get_agp_version()
807 void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode) in agp_generic_enable() argument
827 if (bridge->major_version >= 3) { in agp_generic_enable()
828 if (bridge->mode & AGPSTAT_MODE_3_0) { in agp_generic_enable()
830 if (bridge->minor_version >= 5) in agp_generic_enable()
831 agp_3_5_enable(bridge); in agp_generic_enable()
837 pci_read_config_dword(bridge->dev, in agp_generic_enable()
838 bridge->capndx+AGPCTRL, &temp); in agp_generic_enable()
840 pci_write_config_dword(bridge->dev, in agp_generic_enable()
841 bridge->capndx+AGPCTRL, temp); in agp_generic_enable()
843 dev_info(&bridge->dev->dev, "bridge is in legacy mode, falling back to 2.x\n"); in agp_generic_enable()
853 int agp_generic_create_gatt_table(struct agp_bridge_data *bridge) in agp_generic_create_gatt_table() argument
865 if (bridge->driver->size_type == LVL2_APER_SIZE) in agp_generic_create_gatt_table()
869 i = bridge->aperture_size_idx; in agp_generic_create_gatt_table()
870 temp = bridge->current_size; in agp_generic_create_gatt_table()
873 if (bridge->driver->size_type != FIXED_APER_SIZE) { in agp_generic_create_gatt_table()
875 switch (bridge->driver->size_type) { in agp_generic_create_gatt_table()
905 switch (bridge->driver->size_type) { in agp_generic_create_gatt_table()
907 bridge->current_size = A_IDX8(bridge); in agp_generic_create_gatt_table()
910 bridge->current_size = A_IDX16(bridge); in agp_generic_create_gatt_table()
913 bridge->current_size = A_IDX32(bridge); in agp_generic_create_gatt_table()
921 temp = bridge->current_size; in agp_generic_create_gatt_table()
923 bridge->aperture_size_idx = i; in agp_generic_create_gatt_table()
925 } while (!table && (i < bridge->driver->num_aperture_sizes)); in agp_generic_create_gatt_table()
941 bridge->gatt_table_real = (u32 *) table; in agp_generic_create_gatt_table()
944 bridge->driver->cache_flush(); in agp_generic_create_gatt_table()
949 bridge->gatt_table = (u32 __iomem *)table; in agp_generic_create_gatt_table()
951 bridge->gatt_table = ioremap_nocache(virt_to_phys(table), in agp_generic_create_gatt_table()
953 bridge->driver->cache_flush(); in agp_generic_create_gatt_table()
956 if (bridge->gatt_table == NULL) { in agp_generic_create_gatt_table()
964 bridge->gatt_bus_addr = virt_to_phys(bridge->gatt_table_real); in agp_generic_create_gatt_table()
968 writel(bridge->scratch_page, bridge->gatt_table+i); in agp_generic_create_gatt_table()
969 readl(bridge->gatt_table+i); /* PCI Posting. */ in agp_generic_create_gatt_table()
976 int agp_generic_free_gatt_table(struct agp_bridge_data *bridge) in agp_generic_free_gatt_table() argument
983 temp = bridge->current_size; in agp_generic_free_gatt_table()
985 switch (bridge->driver->size_type) { in agp_generic_free_gatt_table()
1011 set_memory_wb((unsigned long)bridge->gatt_table, 1 << page_order); in agp_generic_free_gatt_table()
1013 iounmap(bridge->gatt_table); in agp_generic_free_gatt_table()
1015 table = (char *) bridge->gatt_table_real; in agp_generic_free_gatt_table()
1021 free_gatt_pages(bridge->gatt_table_real, page_order); in agp_generic_free_gatt_table()
1024 bridge->gatt_table = NULL; in agp_generic_free_gatt_table()
1025 bridge->gatt_table_real = NULL; in agp_generic_free_gatt_table()
1026 bridge->gatt_bus_addr = 0; in agp_generic_free_gatt_table()
1039 struct agp_bridge_data *bridge; in agp_generic_insert_memory() local
1042 bridge = mem->bridge; in agp_generic_insert_memory()
1043 if (!bridge) in agp_generic_insert_memory()
1049 temp = bridge->current_size; in agp_generic_insert_memory()
1051 switch (bridge->driver->size_type) { in agp_generic_insert_memory()
1078 mask_type = bridge->driver->agp_type_to_mask_type(bridge, type); in agp_generic_insert_memory()
1091 if (!PGE_EMPTY(bridge, readl(bridge->gatt_table+j))) in agp_generic_insert_memory()
1097 bridge->driver->cache_flush(); in agp_generic_insert_memory()
1102 writel(bridge->driver->mask_memory(bridge, in agp_generic_insert_memory()
1105 bridge->gatt_table+j); in agp_generic_insert_memory()
1107 readl(bridge->gatt_table+j-1); /* PCI Posting. */ in agp_generic_insert_memory()
1109 bridge->driver->tlb_flush(mem); in agp_generic_insert_memory()
1118 struct agp_bridge_data *bridge; in agp_generic_remove_memory() local
1121 bridge = mem->bridge; in agp_generic_remove_memory()
1122 if (!bridge) in agp_generic_remove_memory()
1136 mask_type = bridge->driver->agp_type_to_mask_type(bridge, type); in agp_generic_remove_memory()
1144 writel(bridge->scratch_page, bridge->gatt_table+i); in agp_generic_remove_memory()
1146 readl(bridge->gatt_table+i-1); /* PCI Posting. */ in agp_generic_remove_memory()
1148 bridge->driver->tlb_flush(mem); in agp_generic_remove_memory()
1195 int agp_generic_alloc_pages(struct agp_bridge_data *bridge, struct agp_memory *mem, size_t num_page… in agp_generic_alloc_pages() argument
1225 struct page *agp_generic_alloc_page(struct agp_bridge_data *bridge) in agp_generic_alloc_page() argument
1291 void agp_enable(struct agp_bridge_data *bridge, u32 mode) in agp_enable() argument
1293 if (!bridge) in agp_enable()
1295 bridge->driver->agp_enable(bridge, mode); in agp_enable()
1323 unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge, in agp_generic_mask_memory() argument
1327 if (bridge->driver->masks) in agp_generic_mask_memory()
1328 return addr | bridge->driver->masks[0].mask; in agp_generic_mask_memory()
1334 int agp_generic_type_to_mask_type(struct agp_bridge_data *bridge, in agp_generic_type_to_mask_type() argument