aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/intel-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/intel-agp.c')
-rw-r--r--drivers/char/agp/intel-agp.c202
1 files changed, 129 insertions, 73 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index a3011de51f7c..06b0bb6d982f 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -5,6 +5,7 @@
5#include <linux/module.h> 5#include <linux/module.h>
6#include <linux/pci.h> 6#include <linux/pci.h>
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/kernel.h>
8#include <linux/pagemap.h> 9#include <linux/pagemap.h>
9#include <linux/agp_backend.h> 10#include <linux/agp_backend.h>
10#include "agp.h" 11#include "agp.h"
@@ -24,6 +25,9 @@
24 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB) 25 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB)
25 26
26 27
28extern int agp_memory_reserved;
29
30
27/* Intel 815 register */ 31/* Intel 815 register */
28#define INTEL_815_APCONT 0x51 32#define INTEL_815_APCONT 0x51
29#define INTEL_815_ATTBASE_MASK ~0x1FFFFFFF 33#define INTEL_815_ATTBASE_MASK ~0x1FFFFFFF
@@ -68,12 +72,15 @@ static struct aper_size_info_fixed intel_i810_sizes[] =
68 72
69#define AGP_DCACHE_MEMORY 1 73#define AGP_DCACHE_MEMORY 1
70#define AGP_PHYS_MEMORY 2 74#define AGP_PHYS_MEMORY 2
75#define INTEL_AGP_CACHED_MEMORY 3
71 76
72static struct gatt_mask intel_i810_masks[] = 77static struct gatt_mask intel_i810_masks[] =
73{ 78{
74 {.mask = I810_PTE_VALID, .type = 0}, 79 {.mask = I810_PTE_VALID, .type = 0},
75 {.mask = (I810_PTE_VALID | I810_PTE_LOCAL), .type = AGP_DCACHE_MEMORY}, 80 {.mask = (I810_PTE_VALID | I810_PTE_LOCAL), .type = AGP_DCACHE_MEMORY},
76 {.mask = I810_PTE_VALID, .type = 0} 81 {.mask = I810_PTE_VALID, .type = 0},
82 {.mask = I810_PTE_VALID | I830_PTE_SYSTEM_CACHED,
83 .type = INTEL_AGP_CACHED_MEMORY}
77}; 84};
78 85
79static struct _intel_i810_private { 86static struct _intel_i810_private {
@@ -117,13 +124,15 @@ static int intel_i810_configure(void)
117 124
118 current_size = A_SIZE_FIX(agp_bridge->current_size); 125 current_size = A_SIZE_FIX(agp_bridge->current_size);
119 126
120 pci_read_config_dword(intel_i810_private.i810_dev, I810_MMADDR, &temp);
121 temp &= 0xfff80000;
122
123 intel_i810_private.registers = ioremap(temp, 128 * 4096);
124 if (!intel_i810_private.registers) { 127 if (!intel_i810_private.registers) {
125 printk(KERN_ERR PFX "Unable to remap memory.\n"); 128 pci_read_config_dword(intel_i810_private.i810_dev, I810_MMADDR, &temp);
126 return -ENOMEM; 129 temp &= 0xfff80000;
130
131 intel_i810_private.registers = ioremap(temp, 128 * 4096);
132 if (!intel_i810_private.registers) {
133 printk(KERN_ERR PFX "Unable to remap memory.\n");
134 return -ENOMEM;
135 }
127 } 136 }
128 137
129 if ((readl(intel_i810_private.registers+I810_DRAM_CTL) 138 if ((readl(intel_i810_private.registers+I810_DRAM_CTL)
@@ -201,62 +210,79 @@ static void i8xx_destroy_pages(void *addr)
201 atomic_dec(&agp_bridge->current_memory_agp); 210 atomic_dec(&agp_bridge->current_memory_agp);
202} 211}
203 212
213static int intel_i830_type_to_mask_type(struct agp_bridge_data *bridge,
214 int type)
215{
216 if (type < AGP_USER_TYPES)
217 return type;
218 else if (type == AGP_USER_CACHED_MEMORY)
219 return INTEL_AGP_CACHED_MEMORY;
220 else
221 return 0;
222}
223
204static int intel_i810_insert_entries(struct agp_memory *mem, off_t pg_start, 224static int intel_i810_insert_entries(struct agp_memory *mem, off_t pg_start,
205 int type) 225 int type)
206{ 226{
207 int i, j, num_entries; 227 int i, j, num_entries;
208 void *temp; 228 void *temp;
229 int ret = -EINVAL;
230 int mask_type;
209 231
210 if (mem->page_count == 0) 232 if (mem->page_count == 0)
211 return 0; 233 goto out;
212 234
213 temp = agp_bridge->current_size; 235 temp = agp_bridge->current_size;
214 num_entries = A_SIZE_FIX(temp)->num_entries; 236 num_entries = A_SIZE_FIX(temp)->num_entries;
215 237
216 if ((pg_start + mem->page_count) > num_entries) 238 if ((pg_start + mem->page_count) > num_entries)
217 return -EINVAL; 239 goto out_err;
218 240
219 for (j = pg_start; j < (pg_start + mem->page_count); j++) {
220 if (!PGE_EMPTY(agp_bridge, readl(agp_bridge->gatt_table+j)))
221 return -EBUSY;
222 }
223 241
224 if (type != 0 || mem->type != 0) { 242 for (j = pg_start; j < (pg_start + mem->page_count); j++) {
225 if ((type == AGP_DCACHE_MEMORY) && (mem->type == AGP_DCACHE_MEMORY)) { 243 if (!PGE_EMPTY(agp_bridge, readl(agp_bridge->gatt_table+j))) {
226 /* special insert */ 244 ret = -EBUSY;
227 if (!mem->is_flushed) { 245 goto out_err;
228 global_cache_flush();
229 mem->is_flushed = TRUE;
230 }
231
232 for (i = pg_start; i < (pg_start + mem->page_count); i++) {
233 writel((i*4096)|I810_PTE_LOCAL|I810_PTE_VALID, intel_i810_private.registers+I810_PTE_BASE+(i*4));
234 }
235 readl(intel_i810_private.registers+I810_PTE_BASE+((i-1)*4)); /* PCI Posting. */
236
237 agp_bridge->driver->tlb_flush(mem);
238 return 0;
239 } 246 }
240 if ((type == AGP_PHYS_MEMORY) && (mem->type == AGP_PHYS_MEMORY))
241 goto insert;
242 return -EINVAL;
243 } 247 }
244 248
245insert: 249 if (type != mem->type)
246 if (!mem->is_flushed) { 250 goto out_err;
247 global_cache_flush();
248 mem->is_flushed = TRUE;
249 }
250 251
251 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 252 mask_type = agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type);
252 writel(agp_bridge->driver->mask_memory(agp_bridge, 253
253 mem->memory[i], mem->type), 254 switch (mask_type) {
254 intel_i810_private.registers+I810_PTE_BASE+(j*4)); 255 case AGP_DCACHE_MEMORY:
256 if (!mem->is_flushed)
257 global_cache_flush();
258 for (i = pg_start; i < (pg_start + mem->page_count); i++) {
259 writel((i*4096)|I810_PTE_LOCAL|I810_PTE_VALID,
260 intel_i810_private.registers+I810_PTE_BASE+(i*4));
261 }
262 readl(intel_i810_private.registers+I810_PTE_BASE+((i-1)*4));
263 break;
264 case AGP_PHYS_MEMORY:
265 case AGP_NORMAL_MEMORY:
266 if (!mem->is_flushed)
267 global_cache_flush();
268 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
269 writel(agp_bridge->driver->mask_memory(agp_bridge,
270 mem->memory[i],
271 mask_type),
272 intel_i810_private.registers+I810_PTE_BASE+(j*4));
273 }
274 readl(intel_i810_private.registers+I810_PTE_BASE+((j-1)*4));
275 break;
276 default:
277 goto out_err;
255 } 278 }
256 readl(intel_i810_private.registers+I810_PTE_BASE+((j-1)*4)); /* PCI Posting. */
257 279
258 agp_bridge->driver->tlb_flush(mem); 280 agp_bridge->driver->tlb_flush(mem);
259 return 0; 281out:
282 ret = 0;
283out_err:
284 mem->is_flushed = 1;
285 return ret;
260} 286}
261 287
262static int intel_i810_remove_entries(struct agp_memory *mem, off_t pg_start, 288static int intel_i810_remove_entries(struct agp_memory *mem, off_t pg_start,
@@ -337,12 +363,11 @@ static struct agp_memory *intel_i810_alloc_by_type(size_t pg_count, int type)
337 new->type = AGP_DCACHE_MEMORY; 363 new->type = AGP_DCACHE_MEMORY;
338 new->page_count = pg_count; 364 new->page_count = pg_count;
339 new->num_scratch_pages = 0; 365 new->num_scratch_pages = 0;
340 vfree(new->memory); 366 agp_free_page_array(new);
341 return new; 367 return new;
342 } 368 }
343 if (type == AGP_PHYS_MEMORY) 369 if (type == AGP_PHYS_MEMORY)
344 return alloc_agpphysmem_i8xx(pg_count, type); 370 return alloc_agpphysmem_i8xx(pg_count, type);
345
346 return NULL; 371 return NULL;
347} 372}
348 373
@@ -357,7 +382,7 @@ static void intel_i810_free_by_type(struct agp_memory *curr)
357 gart_to_virt(curr->memory[0])); 382 gart_to_virt(curr->memory[0]));
358 global_flush_tlb(); 383 global_flush_tlb();
359 } 384 }
360 vfree(curr->memory); 385 agp_free_page_array(curr);
361 } 386 }
362 kfree(curr); 387 kfree(curr);
363} 388}
@@ -619,9 +644,11 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int
619{ 644{
620 int i,j,num_entries; 645 int i,j,num_entries;
621 void *temp; 646 void *temp;
647 int ret = -EINVAL;
648 int mask_type;
622 649
623 if (mem->page_count == 0) 650 if (mem->page_count == 0)
624 return 0; 651 goto out;
625 652
626 temp = agp_bridge->current_size; 653 temp = agp_bridge->current_size;
627 num_entries = A_SIZE_FIX(temp)->num_entries; 654 num_entries = A_SIZE_FIX(temp)->num_entries;
@@ -631,34 +658,41 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int
631 pg_start,intel_i830_private.gtt_entries); 658 pg_start,intel_i830_private.gtt_entries);
632 659
633 printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n"); 660 printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n");
634 return -EINVAL; 661 goto out_err;
635 } 662 }
636 663
637 if ((pg_start + mem->page_count) > num_entries) 664 if ((pg_start + mem->page_count) > num_entries)
638 return -EINVAL; 665 goto out_err;
639 666
640 /* The i830 can't check the GTT for entries since its read only, 667 /* The i830 can't check the GTT for entries since its read only,
641 * depend on the caller to make the correct offset decisions. 668 * depend on the caller to make the correct offset decisions.
642 */ 669 */
643 670
644 if ((type != 0 && type != AGP_PHYS_MEMORY) || 671 if (type != mem->type)
645 (mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) 672 goto out_err;
646 return -EINVAL; 673
674 mask_type = agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type);
647 675
648 if (!mem->is_flushed) { 676 if (mask_type != 0 && mask_type != AGP_PHYS_MEMORY &&
677 mask_type != INTEL_AGP_CACHED_MEMORY)
678 goto out_err;
679
680 if (!mem->is_flushed)
649 global_cache_flush(); 681 global_cache_flush();
650 mem->is_flushed = TRUE;
651 }
652 682
653 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 683 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
654 writel(agp_bridge->driver->mask_memory(agp_bridge, 684 writel(agp_bridge->driver->mask_memory(agp_bridge,
655 mem->memory[i], mem->type), 685 mem->memory[i], mask_type),
656 intel_i830_private.registers+I810_PTE_BASE+(j*4)); 686 intel_i830_private.registers+I810_PTE_BASE+(j*4));
657 } 687 }
658 readl(intel_i830_private.registers+I810_PTE_BASE+((j-1)*4)); 688 readl(intel_i830_private.registers+I810_PTE_BASE+((j-1)*4));
659
660 agp_bridge->driver->tlb_flush(mem); 689 agp_bridge->driver->tlb_flush(mem);
661 return 0; 690
691out:
692 ret = 0;
693out_err:
694 mem->is_flushed = 1;
695 return ret;
662} 696}
663 697
664static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, 698static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
@@ -687,7 +721,6 @@ static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type)
687{ 721{
688 if (type == AGP_PHYS_MEMORY) 722 if (type == AGP_PHYS_MEMORY)
689 return alloc_agpphysmem_i8xx(pg_count, type); 723 return alloc_agpphysmem_i8xx(pg_count, type);
690
691 /* always return NULL for other allocation types for now */ 724 /* always return NULL for other allocation types for now */
692 return NULL; 725 return NULL;
693} 726}
@@ -734,9 +767,11 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start,
734{ 767{
735 int i,j,num_entries; 768 int i,j,num_entries;
736 void *temp; 769 void *temp;
770 int ret = -EINVAL;
771 int mask_type;
737 772
738 if (mem->page_count == 0) 773 if (mem->page_count == 0)
739 return 0; 774 goto out;
740 775
741 temp = agp_bridge->current_size; 776 temp = agp_bridge->current_size;
742 num_entries = A_SIZE_FIX(temp)->num_entries; 777 num_entries = A_SIZE_FIX(temp)->num_entries;
@@ -746,33 +781,41 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start,
746 pg_start,intel_i830_private.gtt_entries); 781 pg_start,intel_i830_private.gtt_entries);
747 782
748 printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n"); 783 printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n");
749 return -EINVAL; 784 goto out_err;
750 } 785 }
751 786
752 if ((pg_start + mem->page_count) > num_entries) 787 if ((pg_start + mem->page_count) > num_entries)
753 return -EINVAL; 788 goto out_err;
754 789
755 /* The i830 can't check the GTT for entries since its read only, 790 /* The i915 can't check the GTT for entries since its read only,
756 * depend on the caller to make the correct offset decisions. 791 * depend on the caller to make the correct offset decisions.
757 */ 792 */
758 793
759 if ((type != 0 && type != AGP_PHYS_MEMORY) || 794 if (type != mem->type)
760 (mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) 795 goto out_err;
761 return -EINVAL; 796
797 mask_type = agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type);
762 798
763 if (!mem->is_flushed) { 799 if (mask_type != 0 && mask_type != AGP_PHYS_MEMORY &&
800 mask_type != INTEL_AGP_CACHED_MEMORY)
801 goto out_err;
802
803 if (!mem->is_flushed)
764 global_cache_flush(); 804 global_cache_flush();
765 mem->is_flushed = TRUE;
766 }
767 805
768 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 806 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
769 writel(agp_bridge->driver->mask_memory(agp_bridge, 807 writel(agp_bridge->driver->mask_memory(agp_bridge,
770 mem->memory[i], mem->type), intel_i830_private.gtt+j); 808 mem->memory[i], mask_type), intel_i830_private.gtt+j);
771 } 809 }
772 readl(intel_i830_private.gtt+j-1);
773 810
811 readl(intel_i830_private.gtt+j-1);
774 agp_bridge->driver->tlb_flush(mem); 812 agp_bridge->driver->tlb_flush(mem);
775 return 0; 813
814 out:
815 ret = 0;
816 out_err:
817 mem->is_flushed = 1;
818 return ret;
776} 819}
777 820
778static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start, 821static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
@@ -803,7 +846,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
803 */ 846 */
804static int intel_i9xx_fetch_size(void) 847static int intel_i9xx_fetch_size(void)
805{ 848{
806 int num_sizes = sizeof(intel_i830_sizes) / sizeof(*intel_i830_sizes); 849 int num_sizes = ARRAY_SIZE(intel_i830_sizes);
807 int aper_size; /* size in megabytes */ 850 int aper_size; /* size in megabytes */
808 int i; 851 int i;
809 852
@@ -1384,6 +1427,7 @@ static struct agp_bridge_driver intel_generic_driver = {
1384 .free_by_type = agp_generic_free_by_type, 1427 .free_by_type = agp_generic_free_by_type,
1385 .agp_alloc_page = agp_generic_alloc_page, 1428 .agp_alloc_page = agp_generic_alloc_page,
1386 .agp_destroy_page = agp_generic_destroy_page, 1429 .agp_destroy_page = agp_generic_destroy_page,
1430 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1387}; 1431};
1388 1432
1389static struct agp_bridge_driver intel_810_driver = { 1433static struct agp_bridge_driver intel_810_driver = {
@@ -1408,6 +1452,7 @@ static struct agp_bridge_driver intel_810_driver = {
1408 .free_by_type = intel_i810_free_by_type, 1452 .free_by_type = intel_i810_free_by_type,
1409 .agp_alloc_page = agp_generic_alloc_page, 1453 .agp_alloc_page = agp_generic_alloc_page,
1410 .agp_destroy_page = agp_generic_destroy_page, 1454 .agp_destroy_page = agp_generic_destroy_page,
1455 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1411}; 1456};
1412 1457
1413static struct agp_bridge_driver intel_815_driver = { 1458static struct agp_bridge_driver intel_815_driver = {
@@ -1431,6 +1476,7 @@ static struct agp_bridge_driver intel_815_driver = {
1431 .free_by_type = agp_generic_free_by_type, 1476 .free_by_type = agp_generic_free_by_type,
1432 .agp_alloc_page = agp_generic_alloc_page, 1477 .agp_alloc_page = agp_generic_alloc_page,
1433 .agp_destroy_page = agp_generic_destroy_page, 1478 .agp_destroy_page = agp_generic_destroy_page,
1479 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1434}; 1480};
1435 1481
1436static struct agp_bridge_driver intel_830_driver = { 1482static struct agp_bridge_driver intel_830_driver = {
@@ -1455,6 +1501,7 @@ static struct agp_bridge_driver intel_830_driver = {
1455 .free_by_type = intel_i810_free_by_type, 1501 .free_by_type = intel_i810_free_by_type,
1456 .agp_alloc_page = agp_generic_alloc_page, 1502 .agp_alloc_page = agp_generic_alloc_page,
1457 .agp_destroy_page = agp_generic_destroy_page, 1503 .agp_destroy_page = agp_generic_destroy_page,
1504 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
1458}; 1505};
1459 1506
1460static struct agp_bridge_driver intel_820_driver = { 1507static struct agp_bridge_driver intel_820_driver = {
@@ -1478,6 +1525,7 @@ static struct agp_bridge_driver intel_820_driver = {
1478 .free_by_type = agp_generic_free_by_type, 1525 .free_by_type = agp_generic_free_by_type,
1479 .agp_alloc_page = agp_generic_alloc_page, 1526 .agp_alloc_page = agp_generic_alloc_page,
1480 .agp_destroy_page = agp_generic_destroy_page, 1527 .agp_destroy_page = agp_generic_destroy_page,
1528 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1481}; 1529};
1482 1530
1483static struct agp_bridge_driver intel_830mp_driver = { 1531static struct agp_bridge_driver intel_830mp_driver = {
@@ -1501,6 +1549,7 @@ static struct agp_bridge_driver intel_830mp_driver = {
1501 .free_by_type = agp_generic_free_by_type, 1549 .free_by_type = agp_generic_free_by_type,
1502 .agp_alloc_page = agp_generic_alloc_page, 1550 .agp_alloc_page = agp_generic_alloc_page,
1503 .agp_destroy_page = agp_generic_destroy_page, 1551 .agp_destroy_page = agp_generic_destroy_page,
1552 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1504}; 1553};
1505 1554
1506static struct agp_bridge_driver intel_840_driver = { 1555static struct agp_bridge_driver intel_840_driver = {
@@ -1524,6 +1573,7 @@ static struct agp_bridge_driver intel_840_driver = {
1524 .free_by_type = agp_generic_free_by_type, 1573 .free_by_type = agp_generic_free_by_type,
1525 .agp_alloc_page = agp_generic_alloc_page, 1574 .agp_alloc_page = agp_generic_alloc_page,
1526 .agp_destroy_page = agp_generic_destroy_page, 1575 .agp_destroy_page = agp_generic_destroy_page,
1576 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1527}; 1577};
1528 1578
1529static struct agp_bridge_driver intel_845_driver = { 1579static struct agp_bridge_driver intel_845_driver = {
@@ -1547,6 +1597,7 @@ static struct agp_bridge_driver intel_845_driver = {
1547 .free_by_type = agp_generic_free_by_type, 1597 .free_by_type = agp_generic_free_by_type,
1548 .agp_alloc_page = agp_generic_alloc_page, 1598 .agp_alloc_page = agp_generic_alloc_page,
1549 .agp_destroy_page = agp_generic_destroy_page, 1599 .agp_destroy_page = agp_generic_destroy_page,
1600 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1550}; 1601};
1551 1602
1552static struct agp_bridge_driver intel_850_driver = { 1603static struct agp_bridge_driver intel_850_driver = {
@@ -1570,6 +1621,7 @@ static struct agp_bridge_driver intel_850_driver = {
1570 .free_by_type = agp_generic_free_by_type, 1621 .free_by_type = agp_generic_free_by_type,
1571 .agp_alloc_page = agp_generic_alloc_page, 1622 .agp_alloc_page = agp_generic_alloc_page,
1572 .agp_destroy_page = agp_generic_destroy_page, 1623 .agp_destroy_page = agp_generic_destroy_page,
1624 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1573}; 1625};
1574 1626
1575static struct agp_bridge_driver intel_860_driver = { 1627static struct agp_bridge_driver intel_860_driver = {
@@ -1593,6 +1645,7 @@ static struct agp_bridge_driver intel_860_driver = {
1593 .free_by_type = agp_generic_free_by_type, 1645 .free_by_type = agp_generic_free_by_type,
1594 .agp_alloc_page = agp_generic_alloc_page, 1646 .agp_alloc_page = agp_generic_alloc_page,
1595 .agp_destroy_page = agp_generic_destroy_page, 1647 .agp_destroy_page = agp_generic_destroy_page,
1648 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1596}; 1649};
1597 1650
1598static struct agp_bridge_driver intel_915_driver = { 1651static struct agp_bridge_driver intel_915_driver = {
@@ -1617,6 +1670,7 @@ static struct agp_bridge_driver intel_915_driver = {
1617 .free_by_type = intel_i810_free_by_type, 1670 .free_by_type = intel_i810_free_by_type,
1618 .agp_alloc_page = agp_generic_alloc_page, 1671 .agp_alloc_page = agp_generic_alloc_page,
1619 .agp_destroy_page = agp_generic_destroy_page, 1672 .agp_destroy_page = agp_generic_destroy_page,
1673 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
1620}; 1674};
1621 1675
1622static struct agp_bridge_driver intel_i965_driver = { 1676static struct agp_bridge_driver intel_i965_driver = {
@@ -1641,6 +1695,7 @@ static struct agp_bridge_driver intel_i965_driver = {
1641 .free_by_type = intel_i810_free_by_type, 1695 .free_by_type = intel_i810_free_by_type,
1642 .agp_alloc_page = agp_generic_alloc_page, 1696 .agp_alloc_page = agp_generic_alloc_page,
1643 .agp_destroy_page = agp_generic_destroy_page, 1697 .agp_destroy_page = agp_generic_destroy_page,
1698 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
1644}; 1699};
1645 1700
1646static struct agp_bridge_driver intel_7505_driver = { 1701static struct agp_bridge_driver intel_7505_driver = {
@@ -1664,6 +1719,7 @@ static struct agp_bridge_driver intel_7505_driver = {
1664 .free_by_type = agp_generic_free_by_type, 1719 .free_by_type = agp_generic_free_by_type,
1665 .agp_alloc_page = agp_generic_alloc_page, 1720 .agp_alloc_page = agp_generic_alloc_page,
1666 .agp_destroy_page = agp_generic_destroy_page, 1721 .agp_destroy_page = agp_generic_destroy_page,
1722 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1667}; 1723};
1668 1724
1669static int find_i810(u16 device) 1725static int find_i810(u16 device)