diff options
| -rw-r--r-- | arch/alpha/include/asm/agp.h | 4 | ||||
| -rw-r--r-- | arch/ia64/include/asm/agp.h | 4 | ||||
| -rw-r--r-- | arch/parisc/include/asm/agp.h | 4 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/agp.h | 4 | ||||
| -rw-r--r-- | arch/sparc/include/asm/agp.h | 4 | ||||
| -rw-r--r-- | arch/x86/include/asm/agp.h | 4 | ||||
| -rw-r--r-- | drivers/char/agp/agp.h | 15 | ||||
| -rw-r--r-- | drivers/char/agp/ali-agp.c | 4 | ||||
| -rw-r--r-- | drivers/char/agp/amd-k7-agp.c | 10 | ||||
| -rw-r--r-- | drivers/char/agp/amd64-agp.c | 7 | ||||
| -rw-r--r-- | drivers/char/agp/ati-agp.c | 7 | ||||
| -rw-r--r-- | drivers/char/agp/backend.c | 32 | ||||
| -rw-r--r-- | drivers/char/agp/efficeon-agp.c | 4 | ||||
| -rw-r--r-- | drivers/char/agp/generic.c | 20 | ||||
| -rw-r--r-- | drivers/char/agp/hp-agp.c | 8 | ||||
| -rw-r--r-- | drivers/char/agp/i460-agp.c | 17 | ||||
| -rw-r--r-- | drivers/char/agp/intel-agp.c | 182 | ||||
| -rw-r--r-- | drivers/char/agp/nvidia-agp.c | 2 | ||||
| -rw-r--r-- | drivers/char/agp/parisc-agp.c | 12 | ||||
| -rw-r--r-- | drivers/char/agp/sgi-agp.c | 8 | ||||
| -rw-r--r-- | drivers/char/agp/sworks-agp.c | 10 | ||||
| -rw-r--r-- | drivers/char/agp/uninorth-agp.c | 4 | ||||
| -rw-r--r-- | include/linux/agp_backend.h | 5 |
23 files changed, 254 insertions, 117 deletions
diff --git a/arch/alpha/include/asm/agp.h b/arch/alpha/include/asm/agp.h index 26c179135293..a94d48b8677f 100644 --- a/arch/alpha/include/asm/agp.h +++ b/arch/alpha/include/asm/agp.h | |||
| @@ -9,10 +9,6 @@ | |||
| 9 | #define unmap_page_from_agp(page) | 9 | #define unmap_page_from_agp(page) |
| 10 | #define flush_agp_cache() mb() | 10 | #define flush_agp_cache() mb() |
| 11 | 11 | ||
| 12 | /* Convert a physical address to an address suitable for the GART. */ | ||
| 13 | #define phys_to_gart(x) (x) | ||
| 14 | #define gart_to_phys(x) (x) | ||
| 15 | |||
| 16 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | 12 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ |
| 17 | #define alloc_gatt_pages(order) \ | 13 | #define alloc_gatt_pages(order) \ |
| 18 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | 14 | ((char *)__get_free_pages(GFP_KERNEL, (order))) |
diff --git a/arch/ia64/include/asm/agp.h b/arch/ia64/include/asm/agp.h index c11fdd8ab4d7..01d09c401c5c 100644 --- a/arch/ia64/include/asm/agp.h +++ b/arch/ia64/include/asm/agp.h | |||
| @@ -17,10 +17,6 @@ | |||
| 17 | #define unmap_page_from_agp(page) /* nothing */ | 17 | #define unmap_page_from_agp(page) /* nothing */ |
| 18 | #define flush_agp_cache() mb() | 18 | #define flush_agp_cache() mb() |
| 19 | 19 | ||
| 20 | /* Convert a physical address to an address suitable for the GART. */ | ||
| 21 | #define phys_to_gart(x) (x) | ||
| 22 | #define gart_to_phys(x) (x) | ||
| 23 | |||
| 24 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | 20 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ |
| 25 | #define alloc_gatt_pages(order) \ | 21 | #define alloc_gatt_pages(order) \ |
| 26 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | 22 | ((char *)__get_free_pages(GFP_KERNEL, (order))) |
diff --git a/arch/parisc/include/asm/agp.h b/arch/parisc/include/asm/agp.h index 9651660da639..d226ffa8fc12 100644 --- a/arch/parisc/include/asm/agp.h +++ b/arch/parisc/include/asm/agp.h | |||
| @@ -11,10 +11,6 @@ | |||
| 11 | #define unmap_page_from_agp(page) /* nothing */ | 11 | #define unmap_page_from_agp(page) /* nothing */ |
| 12 | #define flush_agp_cache() mb() | 12 | #define flush_agp_cache() mb() |
| 13 | 13 | ||
| 14 | /* Convert a physical address to an address suitable for the GART. */ | ||
| 15 | #define phys_to_gart(x) (x) | ||
| 16 | #define gart_to_phys(x) (x) | ||
| 17 | |||
| 18 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | 14 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ |
| 19 | #define alloc_gatt_pages(order) \ | 15 | #define alloc_gatt_pages(order) \ |
| 20 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | 16 | ((char *)__get_free_pages(GFP_KERNEL, (order))) |
diff --git a/arch/powerpc/include/asm/agp.h b/arch/powerpc/include/asm/agp.h index 86455c4c31ee..416e12c2d505 100644 --- a/arch/powerpc/include/asm/agp.h +++ b/arch/powerpc/include/asm/agp.h | |||
| @@ -8,10 +8,6 @@ | |||
| 8 | #define unmap_page_from_agp(page) | 8 | #define unmap_page_from_agp(page) |
| 9 | #define flush_agp_cache() mb() | 9 | #define flush_agp_cache() mb() |
| 10 | 10 | ||
| 11 | /* Convert a physical address to an address suitable for the GART. */ | ||
| 12 | #define phys_to_gart(x) (x) | ||
| 13 | #define gart_to_phys(x) (x) | ||
| 14 | |||
| 15 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | 11 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ |
| 16 | #define alloc_gatt_pages(order) \ | 12 | #define alloc_gatt_pages(order) \ |
| 17 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | 13 | ((char *)__get_free_pages(GFP_KERNEL, (order))) |
diff --git a/arch/sparc/include/asm/agp.h b/arch/sparc/include/asm/agp.h index c2456870b05c..70f52c1661bc 100644 --- a/arch/sparc/include/asm/agp.h +++ b/arch/sparc/include/asm/agp.h | |||
| @@ -7,10 +7,6 @@ | |||
| 7 | #define unmap_page_from_agp(page) | 7 | #define unmap_page_from_agp(page) |
| 8 | #define flush_agp_cache() mb() | 8 | #define flush_agp_cache() mb() |
| 9 | 9 | ||
| 10 | /* Convert a physical address to an address suitable for the GART. */ | ||
| 11 | #define phys_to_gart(x) (x) | ||
| 12 | #define gart_to_phys(x) (x) | ||
| 13 | |||
| 14 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | 10 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ |
| 15 | #define alloc_gatt_pages(order) \ | 11 | #define alloc_gatt_pages(order) \ |
| 16 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | 12 | ((char *)__get_free_pages(GFP_KERNEL, (order))) |
diff --git a/arch/x86/include/asm/agp.h b/arch/x86/include/asm/agp.h index 9825cd64c9b6..eec2a70d4376 100644 --- a/arch/x86/include/asm/agp.h +++ b/arch/x86/include/asm/agp.h | |||
| @@ -22,10 +22,6 @@ | |||
| 22 | */ | 22 | */ |
| 23 | #define flush_agp_cache() wbinvd() | 23 | #define flush_agp_cache() wbinvd() |
| 24 | 24 | ||
| 25 | /* Convert a physical address to an address suitable for the GART. */ | ||
| 26 | #define phys_to_gart(x) (x) | ||
| 27 | #define gart_to_phys(x) (x) | ||
| 28 | |||
| 29 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | 25 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ |
| 30 | #define alloc_gatt_pages(order) \ | 26 | #define alloc_gatt_pages(order) \ |
| 31 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | 27 | ((char *)__get_free_pages(GFP_KERNEL, (order))) |
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h index 178e2e9e9f09..d6f36c004d9b 100644 --- a/drivers/char/agp/agp.h +++ b/drivers/char/agp/agp.h | |||
| @@ -107,7 +107,7 @@ struct agp_bridge_driver { | |||
| 107 | void (*agp_enable)(struct agp_bridge_data *, u32); | 107 | void (*agp_enable)(struct agp_bridge_data *, u32); |
| 108 | void (*cleanup)(void); | 108 | void (*cleanup)(void); |
| 109 | void (*tlb_flush)(struct agp_memory *); | 109 | void (*tlb_flush)(struct agp_memory *); |
| 110 | unsigned long (*mask_memory)(struct agp_bridge_data *, struct page *, int); | 110 | unsigned long (*mask_memory)(struct agp_bridge_data *, dma_addr_t, int); |
| 111 | void (*cache_flush)(void); | 111 | void (*cache_flush)(void); |
| 112 | int (*create_gatt_table)(struct agp_bridge_data *); | 112 | int (*create_gatt_table)(struct agp_bridge_data *); |
| 113 | int (*free_gatt_table)(struct agp_bridge_data *); | 113 | int (*free_gatt_table)(struct agp_bridge_data *); |
| @@ -121,6 +121,11 @@ struct agp_bridge_driver { | |||
| 121 | void (*agp_destroy_pages)(struct agp_memory *); | 121 | void (*agp_destroy_pages)(struct agp_memory *); |
| 122 | int (*agp_type_to_mask_type) (struct agp_bridge_data *, int); | 122 | int (*agp_type_to_mask_type) (struct agp_bridge_data *, int); |
| 123 | void (*chipset_flush)(struct agp_bridge_data *); | 123 | void (*chipset_flush)(struct agp_bridge_data *); |
| 124 | |||
| 125 | int (*agp_map_page)(struct page *page, dma_addr_t *ret); | ||
| 126 | void (*agp_unmap_page)(struct page *page, dma_addr_t dma); | ||
| 127 | int (*agp_map_memory)(struct agp_memory *mem); | ||
| 128 | void (*agp_unmap_memory)(struct agp_memory *mem); | ||
| 124 | }; | 129 | }; |
| 125 | 130 | ||
| 126 | struct agp_bridge_data { | 131 | struct agp_bridge_data { |
| @@ -134,7 +139,8 @@ struct agp_bridge_data { | |||
| 134 | u32 __iomem *gatt_table; | 139 | u32 __iomem *gatt_table; |
| 135 | u32 *gatt_table_real; | 140 | u32 *gatt_table_real; |
| 136 | unsigned long scratch_page; | 141 | unsigned long scratch_page; |
| 137 | unsigned long scratch_page_real; | 142 | struct page *scratch_page_page; |
| 143 | dma_addr_t scratch_page_dma; | ||
| 138 | unsigned long gart_bus_addr; | 144 | unsigned long gart_bus_addr; |
| 139 | unsigned long gatt_bus_addr; | 145 | unsigned long gatt_bus_addr; |
| 140 | u32 mode; | 146 | u32 mode; |
| @@ -291,7 +297,7 @@ int agp_3_5_enable(struct agp_bridge_data *bridge); | |||
| 291 | void global_cache_flush(void); | 297 | void global_cache_flush(void); |
| 292 | void get_agp_version(struct agp_bridge_data *bridge); | 298 | void get_agp_version(struct agp_bridge_data *bridge); |
| 293 | unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge, | 299 | unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge, |
| 294 | struct page *page, int type); | 300 | dma_addr_t phys, int type); |
| 295 | int agp_generic_type_to_mask_type(struct agp_bridge_data *bridge, | 301 | int agp_generic_type_to_mask_type(struct agp_bridge_data *bridge, |
| 296 | int type); | 302 | int type); |
| 297 | struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev); | 303 | struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev); |
| @@ -312,9 +318,6 @@ void agp3_generic_cleanup(void); | |||
| 312 | #define AGP_GENERIC_SIZES_ENTRIES 11 | 318 | #define AGP_GENERIC_SIZES_ENTRIES 11 |
| 313 | extern const struct aper_size_info_16 agp3_generic_sizes[]; | 319 | extern const struct aper_size_info_16 agp3_generic_sizes[]; |
| 314 | 320 | ||
| 315 | #define virt_to_gart(x) (phys_to_gart(virt_to_phys(x))) | ||
| 316 | #define gart_to_virt(x) (phys_to_virt(gart_to_phys(x))) | ||
| 317 | |||
| 318 | extern int agp_off; | 321 | extern int agp_off; |
| 319 | extern int agp_try_unsupported_boot; | 322 | extern int agp_try_unsupported_boot; |
| 320 | 323 | ||
diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c index 201ef3ffd484..d2ce68f27e4b 100644 --- a/drivers/char/agp/ali- | |||
