]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/agp/intel-agp.c
Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[linux-2.6-omap-h63xx.git] / drivers / char / agp / intel-agp.c
index 51266d6b4d78af9bf138f52dbbdf6f43413ac0c7..e7bed5047dcc9b8da874ef2e4007e795cc847a87 100644 (file)
@@ -270,6 +270,7 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type)
 
        switch (pg_count) {
        case 1: addr = agp_bridge->driver->agp_alloc_page(agp_bridge);
+               global_flush_tlb();
                break;
        case 4:
                /* kludge to get 4 physical pages for ARGB cursor */
@@ -330,9 +331,11 @@ static void intel_i810_free_by_type(struct agp_memory *curr)
        if(curr->type == AGP_PHYS_MEMORY) {
                if (curr->page_count == 4)
                        i8xx_destroy_pages(gart_to_virt(curr->memory[0]));
-               else
+               else {
                        agp_bridge->driver->agp_destroy_page(
                                 gart_to_virt(curr->memory[0]));
+                       global_flush_tlb();
+               }
                vfree(curr->memory);
        }
        kfree(curr);
@@ -1047,9 +1050,15 @@ static int intel_845_configure(void)
        /* aperture size */
        pci_write_config_byte(agp_bridge->dev, INTEL_APSIZE, current_size->size_value);
 
-       /* address to map to */
-       pci_read_config_dword(agp_bridge->dev, AGP_APBASE, &temp);
-       agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
+       if (agp_bridge->apbase_config != 0) {
+               pci_write_config_dword(agp_bridge->dev, AGP_APBASE,
+                                      agp_bridge->apbase_config);
+       } else {
+               /* address to map to */
+               pci_read_config_dword(agp_bridge->dev, AGP_APBASE, &temp);
+               agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
+               agp_bridge->apbase_config = temp;
+       }
 
        /* attbase - aperture base */
        pci_write_config_dword(agp_bridge->dev, INTEL_ATTBASE, agp_bridge->gatt_bus_addr);