Merge branch 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6

* 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6:
agp: remove flush_agp_mappings calls from new flush handling code
intel-agp: introduce IS_I915 and do some cleanups..
[intel_agp] fix name for G35 chipset
intel-agp: fixup resource handling in flush code.
intel-agp: add new chipset ID
agp: remove unnecessary pci_dev_put
agp: remove uid comparison as security check
fix AGP warning
agp/intel: Add chipset flushing support for i8xx chipsets.
intel-agp: add chipset flushing support
agp: add chipset flushing support to AGP interface

+276 -71
+1 -1
arch/x86/pci/i386.c
··· 72 } 73 } 74 } 75 - 76 77 /* 78 * Handle resources of PCI devices. If the world were perfect, we could
··· 72 } 73 } 74 } 75 + EXPORT_SYMBOL(pcibios_align_resource); 76 77 /* 78 * Handle resources of PCI devices. If the world were perfect, we could
+5 -1
drivers/char/agp/agp.h
··· 117 void (*free_by_type)(struct agp_memory *); 118 void *(*agp_alloc_page)(struct agp_bridge_data *); 119 void (*agp_destroy_page)(void *, int flags); 120 - int (*agp_type_to_mask_type) (struct agp_bridge_data *, int); 121 }; 122 123 struct agp_bridge_data { ··· 236 #define I965_PGETBL_SIZE_512KB (0 << 1) 237 #define I965_PGETBL_SIZE_256KB (1 << 1) 238 #define I965_PGETBL_SIZE_128KB (2 << 1) 239 #define G33_PGETBL_SIZE_MASK (3 << 8) 240 #define G33_PGETBL_SIZE_1M (1 << 8) 241 #define G33_PGETBL_SIZE_2M (2 << 8)
··· 117 void (*free_by_type)(struct agp_memory *); 118 void *(*agp_alloc_page)(struct agp_bridge_data *); 119 void (*agp_destroy_page)(void *, int flags); 120 + int (*agp_type_to_mask_type) (struct agp_bridge_data *, int); 121 + void (*chipset_flush)(struct agp_bridge_data *); 122 }; 123 124 struct agp_bridge_data { ··· 235 #define I965_PGETBL_SIZE_512KB (0 << 1) 236 #define I965_PGETBL_SIZE_256KB (1 << 1) 237 #define I965_PGETBL_SIZE_128KB (2 << 1) 238 + #define I965_PGETBL_SIZE_1MB (3 << 1) 239 + #define I965_PGETBL_SIZE_2MB (4 << 1) 240 + #define I965_PGETBL_SIZE_1_5MB (5 << 1) 241 #define G33_PGETBL_SIZE_MASK (3 << 8) 242 #define G33_PGETBL_SIZE_1M (1 << 8) 243 #define G33_PGETBL_SIZE_2M (2 << 8)
-4
drivers/char/agp/amd-k7-agp.c
··· 436 return -ENODEV; 437 } 438 cap_ptr = pci_find_capability(gfxcard, PCI_CAP_ID_AGP); 439 - if (!cap_ptr) { 440 - pci_dev_put(gfxcard); 441 - continue; 442 - } 443 } 444 445 /* With so many variants of NVidia cards, it's simpler just
··· 436 return -ENODEV; 437 } 438 cap_ptr = pci_find_capability(gfxcard, PCI_CAP_ID_AGP); 439 } 440 441 /* With so many variants of NVidia cards, it's simpler just
+1 -1
drivers/char/agp/backend.c
··· 43 * fix some real stupidity. It's only by chance we can bump 44 * past 0.99 at all due to some boolean logic error. */ 45 #define AGPGART_VERSION_MAJOR 0 46 - #define AGPGART_VERSION_MINOR 102 47 static const struct agp_version agp_current_version = 48 { 49 .major = AGPGART_VERSION_MAJOR,
··· 43 * fix some real stupidity. It's only by chance we can bump 44 * past 0.99 at all due to some boolean logic error. */ 45 #define AGPGART_VERSION_MAJOR 0 46 + #define AGPGART_VERSION_MINOR 103 47 static const struct agp_version agp_current_version = 48 { 49 .major = AGPGART_VERSION_MAJOR,
+4
drivers/char/agp/compat_ioctl.c
··· 273 case AGPIOC_UNBIND32: 274 ret_val = compat_agpioc_unbind_wrap(curr_priv, (void __user *) arg); 275 break; 276 } 277 278 ioctl_out:
··· 273 case AGPIOC_UNBIND32: 274 ret_val = compat_agpioc_unbind_wrap(curr_priv, (void __user *) arg); 275 break; 276 + 277 + case AGPIOC_CHIPSET_FLUSH32: 278 + ret_val = agpioc_chipset_flush_wrap(curr_priv); 279 + break; 280 } 281 282 ioctl_out:
+2
drivers/char/agp/compat_ioctl.h
··· 39 #define AGPIOC_DEALLOCATE32 _IOW (AGPIOC_BASE, 7, compat_int_t) 40 #define AGPIOC_BIND32 _IOW (AGPIOC_BASE, 8, compat_uptr_t) 41 #define AGPIOC_UNBIND32 _IOW (AGPIOC_BASE, 9, compat_uptr_t) 42 43 struct agp_info32 { 44 struct agp_version version; /* version of the driver */ ··· 102 struct agp_memory *agp_allocate_memory_wrap(size_t pg_count, u32 type); 103 struct agp_memory *agp_find_mem_by_key(int key); 104 struct agp_client *agp_find_client_by_pid(pid_t id); 105 106 #endif /* _AGP_COMPAT_H */
··· 39 #define AGPIOC_DEALLOCATE32 _IOW (AGPIOC_BASE, 7, compat_int_t) 40 #define AGPIOC_BIND32 _IOW (AGPIOC_BASE, 8, compat_uptr_t) 41 #define AGPIOC_UNBIND32 _IOW (AGPIOC_BASE, 9, compat_uptr_t) 42 + #define AGPIOC_CHIPSET_FLUSH32 _IO (AGPIOC_BASE, 10) 43 44 struct agp_info32 { 45 struct agp_version version; /* version of the driver */ ··· 101 struct agp_memory *agp_allocate_memory_wrap(size_t pg_count, u32 type); 102 struct agp_memory *agp_find_mem_by_key(int key); 103 struct agp_client *agp_find_client_by_pid(pid_t id); 104 + int agpioc_chipset_flush_wrap(struct agp_file_private *priv); 105 106 #endif /* _AGP_COMPAT_H */
+12 -1
drivers/char/agp/frontend.c
··· 689 set_bit(AGP_FF_ALLOW_CLIENT, &priv->access_flags); 690 priv->my_pid = current->pid; 691 692 - if ((current->uid == 0) || (current->suid == 0)) { 693 /* Root priv, can be controller */ 694 set_bit(AGP_FF_ALLOW_CONTROLLER, &priv->access_flags); 695 } ··· 960 return agp_unbind_memory(memory); 961 } 962 963 static int agp_ioctl(struct inode *inode, struct file *file, 964 unsigned int cmd, unsigned long arg) 965 { ··· 1039 1040 case AGPIOC_UNBIND: 1041 ret_val = agpioc_unbind_wrap(curr_priv, (void __user *) arg); 1042 break; 1043 } 1044
··· 689 set_bit(AGP_FF_ALLOW_CLIENT, &priv->access_flags); 690 priv->my_pid = current->pid; 691 692 + if (capable(CAP_SYS_RAWIO)) { 693 /* Root priv, can be controller */ 694 set_bit(AGP_FF_ALLOW_CONTROLLER, &priv->access_flags); 695 } ··· 960 return agp_unbind_memory(memory); 961 } 962 963 + int agpioc_chipset_flush_wrap(struct agp_file_private *priv) 964 + { 965 + DBG(""); 966 + agp_flush_chipset(agp_bridge); 967 + return 0; 968 + } 969 + 970 static int agp_ioctl(struct inode *inode, struct file *file, 971 unsigned int cmd, unsigned long arg) 972 { ··· 1032 1033 case AGPIOC_UNBIND: 1034 ret_val = agpioc_unbind_wrap(curr_priv, (void __user *) arg); 1035 + break; 1036 + 1037 + case AGPIOC_CHIPSET_FLUSH: 1038 + ret_val = agpioc_chipset_flush_wrap(curr_priv); 1039 break; 1040 } 1041
+7
drivers/char/agp/generic.c
··· 80 return -1; 81 } 82 83 /* 84 * Use kmalloc if possible for the page list. Otherwise fall back to 85 * vmalloc. This speeds things up and also saves memory for small AGP
··· 80 return -1; 81 } 82 83 + void agp_flush_chipset(struct agp_bridge_data *bridge) 84 + { 85 + if (bridge->driver->chipset_flush) 86 + bridge->driver->chipset_flush(bridge); 87 + } 88 + EXPORT_SYMBOL(agp_flush_chipset); 89 + 90 /* 91 * Use kmalloc if possible for the page list. Otherwise fall back to 92 * vmalloc. This speeds things up and also saves memory for small AGP
+242 -63
drivers/char/agp/intel-agp.c
··· 14 #define PCI_DEVICE_ID_INTEL_E7221_IG 0x258a 15 #define PCI_DEVICE_ID_INTEL_82946GZ_HB 0x2970 16 #define PCI_DEVICE_ID_INTEL_82946GZ_IG 0x2972 17 - #define PCI_DEVICE_ID_INTEL_82965G_1_HB 0x2980 18 - #define PCI_DEVICE_ID_INTEL_82965G_1_IG 0x2982 19 #define PCI_DEVICE_ID_INTEL_82965Q_HB 0x2990 20 #define PCI_DEVICE_ID_INTEL_82965Q_IG 0x2992 21 #define PCI_DEVICE_ID_INTEL_82965G_HB 0x29A0 ··· 32 #define PCI_DEVICE_ID_INTEL_Q35_IG 0x29B2 33 #define PCI_DEVICE_ID_INTEL_Q33_HB 0x29D0 34 #define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2 35 36 #define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \ 37 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_1_HB || \ 38 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \ 39 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \ 40 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \ 41 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB) 42 43 #define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \ 44 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \ ··· 82 #define I915_GMCH_GMS_STOLEN_64M (0x7 << 4) 83 #define G33_GMCH_GMS_STOLEN_128M (0x8 << 4) 84 #define G33_GMCH_GMS_STOLEN_256M (0x9 << 4) 85 86 /* Intel 965G registers */ 87 #define I965_MSAC 0x62 88 89 /* Intel 7505 registers */ 90 #define INTEL_I7505_APSIZE 0x74 ··· 128 * popup and for the GTT. 129 */ 130 int gtt_entries; /* i830+ */ 131 } intel_private; 132 133 static int intel_i810_fetch_size(void) ··· 224 /* Exists to support ARGB cursors */ 225 static void *i8xx_alloc_pages(void) 226 { 227 - struct page * page; 228 229 page = alloc_pages(GFP_KERNEL | GFP_DMA32, 2); 230 if (page == NULL) ··· 453 static const int ddt[4] = { 0, 16, 32, 64 }; 454 int size; /* reserved space (in kb) at the top of stolen memory */ 455 456 - pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); 457 458 if (IS_I965) { 459 u32 pgetbl_ctl; ··· 472 break; 473 case I965_PGETBL_SIZE_512KB: 474 size = 512; 475 break; 476 default: 477 printk(KERN_INFO PFX "Unknown page table size, " ··· 552 break; 553 case I915_GMCH_GMS_STOLEN_48M: 554 /* Check it's really I915G */ 555 - if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB || 556 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || 557 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB || 558 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB || 559 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB || 560 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GME_HB || 561 - IS_I965 || IS_G33) 562 gtt_entries = MB(48) - KB(size); 563 else 564 gtt_entries = 0; 565 break; 566 case I915_GMCH_GMS_STOLEN_64M: 567 /* Check it's really I915G */ 568 - if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB || 569 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || 570 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB || 571 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB || 572 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB || 573 - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GME_HB || 574 - IS_I965 || IS_G33) 575 gtt_entries = MB(64) - KB(size); 576 else 577 gtt_entries = 0; ··· 592 intel_private.gtt_entries = gtt_entries; 593 } 594 595 /* The intel i830 automatically initializes the agp aperture during POST. 596 * Use the memory already set aside for in the GTT. 597 */ ··· 646 num_entries = size->num_entries; 647 agp_bridge->gatt_table_real = NULL; 648 649 - pci_read_config_dword(intel_private.pcidev,I810_MMADDR,&temp); 650 temp &= 0xfff80000; 651 652 - intel_private.registers = ioremap(temp,128 * 4096); 653 if (!intel_private.registers) 654 return -ENOMEM; 655 ··· 689 return values[0].size; 690 } 691 692 - pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); 693 694 if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) { 695 agp_bridge->previous_size = agp_bridge->current_size = (void *) values; ··· 713 714 current_size = A_SIZE_FIX(agp_bridge->current_size); 715 716 - pci_read_config_dword(intel_private.pcidev,I810_GMADDR,&temp); 717 agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); 718 719 - pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); 720 gmch_ctrl |= I830_GMCH_ENABLED; 721 - pci_write_config_word(agp_bridge->dev,I830_GMCH_CTRL,gmch_ctrl); 722 723 writel(agp_bridge->gatt_bus_addr|I810_PGETBL_ENABLED, intel_private.registers+I810_PGETBL_CTL); 724 readl(intel_private.registers+I810_PGETBL_CTL); /* PCI Posting. */ ··· 731 } 732 733 global_cache_flush(); 734 return 0; 735 } 736 ··· 741 iounmap(intel_private.registers); 742 } 743 744 - static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int type) 745 { 746 - int i,j,num_entries; 747 void *temp; 748 int ret = -EINVAL; 749 int mask_type; ··· 756 num_entries = A_SIZE_FIX(temp)->num_entries; 757 758 if (pg_start < intel_private.gtt_entries) { 759 - printk (KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_private.gtt_entries == 0x%.8x\n", 760 - pg_start,intel_private.gtt_entries); 761 762 - printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n"); 763 goto out_err; 764 } 765 ··· 797 return ret; 798 } 799 800 - static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, 801 - int type) 802 { 803 int i; 804 ··· 806 return 0; 807 808 if (pg_start < intel_private.gtt_entries) { 809 - printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); 810 return -EINVAL; 811 } 812 ··· 819 return 0; 820 } 821 822 - static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type) 823 { 824 if (type == AGP_PHYS_MEMORY) 825 return alloc_agpphysmem_i8xx(pg_count, type); 826 /* always return NULL for other allocation types for now */ 827 return NULL; 828 } 829 830 static int intel_i915_configure(void) ··· 929 930 agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); 931 932 - pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); 933 gmch_ctrl |= I830_GMCH_ENABLED; 934 - pci_write_config_word(agp_bridge->dev,I830_GMCH_CTRL,gmch_ctrl); 935 936 writel(agp_bridge->gatt_bus_addr|I810_PGETBL_ENABLED, intel_private.registers+I810_PGETBL_CTL); 937 readl(intel_private.registers+I810_PGETBL_CTL); /* PCI Posting. */ ··· 944 } 945 946 global_cache_flush(); 947 return 0; 948 } 949 950 static void intel_i915_cleanup(void) 951 { 952 iounmap(intel_private.gtt); 953 iounmap(intel_private.registers); 954 } 955 956 - static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start, 957 - int type) 958 { 959 - int i,j,num_entries; 960 void *temp; 961 int ret = -EINVAL; 962 int mask_type; ··· 983 num_entries = A_SIZE_FIX(temp)->num_entries; 984 985 if (pg_start < intel_private.gtt_entries) { 986 - printk (KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_private.gtt_entries == 0x%.8x\n", 987 - pg_start,intel_private.gtt_entries); 988 989 - printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n"); 990 goto out_err; 991 } 992 ··· 1024 return ret; 1025 } 1026 1027 - static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start, 1028 - int type) 1029 { 1030 int i; 1031 ··· 1033 return 0; 1034 1035 if (pg_start < intel_private.gtt_entries) { 1036 - printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); 1037 return -EINVAL; 1038 } 1039 1040 - for (i = pg_start; i < (mem->page_count + pg_start); i++) { 1041 writel(agp_bridge->scratch_page, intel_private.gtt+i); 1042 - } 1043 readl(intel_private.gtt+i-1); 1044 1045 agp_bridge->driver->tlb_flush(mem); ··· 1086 agp_bridge->gatt_table_real = NULL; 1087 1088 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp); 1089 - pci_read_config_dword(intel_private.pcidev, I915_PTEADDR,&temp2); 1090 1091 if (IS_G33) 1092 gtt_map_size = 1024 * 1024; /* 1M on G33 */ ··· 1096 1097 temp &= 0xfff80000; 1098 1099 - intel_private.registers = ioremap(temp,128 * 4096); 1100 if (!intel_private.registers) { 1101 iounmap(intel_private.gtt); 1102 return -ENOMEM; ··· 1143 struct aper_size_info_fixed *size; 1144 int num_entries; 1145 u32 temp; 1146 1147 size = agp_bridge->current_size; 1148 page_order = size->page_order; ··· 1153 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp); 1154 1155 temp &= 0xfff00000; 1156 - intel_private.gtt = ioremap((temp + (512 * 1024)) , 512 * 1024); 1157 1158 - if (!intel_private.gtt) 1159 - return -ENOMEM; 1160 1161 1162 - intel_private.registers = ioremap(temp,128 * 4096); 1163 if (!intel_private.registers) { 1164 iounmap(intel_private.gtt); 1165 return -ENOMEM; ··· 1323 /* the Intel 815 chipset spec. says that bits 29-31 in the 1324 * ATTBASE register are reserved -> try not to write them */ 1325 if (agp_bridge->gatt_bus_addr & INTEL_815_ATTBASE_MASK) { 1326 - printk (KERN_EMERG PFX "gatt bus addr too high"); 1327 return -EINVAL; 1328 } 1329 ··· 1465 pci_write_config_byte(agp_bridge->dev, INTEL_I845_AGPM, temp2 | (1 << 1)); 1466 /* clear any possible error conditions */ 1467 pci_write_config_word(agp_bridge->dev, INTEL_I845_ERRSTS, 0x001c); 1468 return 0; 1469 } 1470 ··· 1723 .agp_alloc_page = agp_generic_alloc_page, 1724 .agp_destroy_page = agp_generic_destroy_page, 1725 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1726 }; 1727 1728 static const struct agp_bridge_driver intel_820_driver = { ··· 1820 .agp_alloc_page = agp_generic_alloc_page, 1821 .agp_destroy_page = agp_generic_destroy_page, 1822 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1823 }; 1824 1825 static const struct agp_bridge_driver intel_850_driver = { ··· 1894 .agp_alloc_page = agp_generic_alloc_page, 1895 .agp_destroy_page = agp_generic_destroy_page, 1896 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1897 }; 1898 1899 static const struct agp_bridge_driver intel_i965_driver = { ··· 1920 .agp_alloc_page = agp_generic_alloc_page, 1921 .agp_destroy_page = agp_generic_destroy_page, 1922 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1923 }; 1924 1925 static const struct agp_bridge_driver intel_7505_driver = { ··· 1970 .agp_alloc_page = agp_generic_alloc_page, 1971 .agp_destroy_page = agp_generic_destroy_page, 1972 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1973 }; 1974 1975 static int find_gmch(u16 device) ··· 1980 gmch_device = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL); 1981 if (gmch_device && PCI_FUNC(gmch_device->devfn) != 0) { 1982 gmch_device = pci_get_device(PCI_VENDOR_ID_INTEL, 1983 - device, gmch_device); 1984 } 1985 1986 if (!gmch_device) ··· 2043 NULL, &intel_915_driver }, 2044 { PCI_DEVICE_ID_INTEL_82946GZ_HB, PCI_DEVICE_ID_INTEL_82946GZ_IG, 0, "946GZ", 2045 NULL, &intel_i965_driver }, 2046 - { PCI_DEVICE_ID_INTEL_82965G_1_HB, PCI_DEVICE_ID_INTEL_82965G_1_IG, 0, "965G", 2047 NULL, &intel_i965_driver }, 2048 { PCI_DEVICE_ID_INTEL_82965Q_HB, PCI_DEVICE_ID_INTEL_82965Q_IG, 0, "965Q", 2049 NULL, &intel_i965_driver }, ··· 2061 NULL, &intel_g33_driver }, 2062 { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33", 2063 NULL, &intel_g33_driver }, 2064 { 0, 0, 0, NULL, NULL, NULL } 2065 }; 2066 ··· 2102 if (intel_agp_chipsets[i].name == NULL) { 2103 if (cap_ptr) 2104 printk(KERN_WARNING PFX "Unsupported Intel chipset" 2105 - "(device id: %04x)\n", pdev->device); 2106 agp_put_bridge(bridge); 2107 return -ENODEV; 2108 } ··· 2115 intel_agp_chipsets[i].gmch_chip_id); 2116 agp_put_bridge(bridge); 2117 return -ENODEV; 2118 - } 2119 2120 bridge->dev = pdev; 2121 bridge->capndx = cap_ptr; ··· 2245 ID(PCI_DEVICE_ID_INTEL_82945GM_HB), 2246 ID(PCI_DEVICE_ID_INTEL_82945GME_HB), 2247 ID(PCI_DEVICE_ID_INTEL_82946GZ_HB), 2248 - ID(PCI_DEVICE_ID_INTEL_82965G_1_HB), 2249 ID(PCI_DEVICE_ID_INTEL_82965Q_HB), 2250 ID(PCI_DEVICE_ID_INTEL_82965G_HB), 2251 ID(PCI_DEVICE_ID_INTEL_82965GM_HB), ··· 2253 ID(PCI_DEVICE_ID_INTEL_G33_HB), 2254 ID(PCI_DEVICE_ID_INTEL_Q35_HB), 2255 ID(PCI_DEVICE_ID_INTEL_Q33_HB), 2256 { } 2257 }; 2258
··· 14 #define PCI_DEVICE_ID_INTEL_E7221_IG 0x258a 15 #define PCI_DEVICE_ID_INTEL_82946GZ_HB 0x2970 16 #define PCI_DEVICE_ID_INTEL_82946GZ_IG 0x2972 17 + #define PCI_DEVICE_ID_INTEL_82G35_HB 0x2980 18 + #define PCI_DEVICE_ID_INTEL_82G35_IG 0x2982 19 #define PCI_DEVICE_ID_INTEL_82965Q_HB 0x2990 20 #define PCI_DEVICE_ID_INTEL_82965Q_IG 0x2992 21 #define PCI_DEVICE_ID_INTEL_82965G_HB 0x29A0 ··· 32 #define PCI_DEVICE_ID_INTEL_Q35_IG 0x29B2 33 #define PCI_DEVICE_ID_INTEL_Q33_HB 0x29D0 34 #define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2 35 + #define PCI_DEVICE_ID_INTEL_IGD_HB 0x2A40 36 + #define PCI_DEVICE_ID_INTEL_IGD_IG 0x2A42 37 + 38 + /* cover 915 and 945 variants */ 39 + #define IS_I915 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB || \ 40 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || \ 41 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB || \ 42 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB || \ 43 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB || \ 44 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GME_HB) 45 46 #define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \ 47 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82G35_HB || \ 48 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \ 49 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \ 50 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \ 51 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB || \ 52 + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_HB) 53 54 #define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \ 55 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \ ··· 71 #define I915_GMCH_GMS_STOLEN_64M (0x7 << 4) 72 #define G33_GMCH_GMS_STOLEN_128M (0x8 << 4) 73 #define G33_GMCH_GMS_STOLEN_256M (0x9 << 4) 74 + #define I915_IFPADDR 0x60 75 76 /* Intel 965G registers */ 77 #define I965_MSAC 0x62 78 + #define I965_IFPADDR 0x70 79 80 /* Intel 7505 registers */ 81 #define INTEL_I7505_APSIZE 0x74 ··· 115 * popup and for the GTT. 116 */ 117 int gtt_entries; /* i830+ */ 118 + union { 119 + void __iomem *i9xx_flush_page; 120 + void *i8xx_flush_page; 121 + }; 122 + struct page *i8xx_page; 123 + struct resource ifp_resource; 124 + int resource_valid; 125 } intel_private; 126 127 static int intel_i810_fetch_size(void) ··· 204 /* Exists to support ARGB cursors */ 205 static void *i8xx_alloc_pages(void) 206 { 207 + struct page *page; 208 209 page = alloc_pages(GFP_KERNEL | GFP_DMA32, 2); 210 if (page == NULL) ··· 433 static const int ddt[4] = { 0, 16, 32, 64 }; 434 int size; /* reserved space (in kb) at the top of stolen memory */ 435 436 + pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl); 437 438 if (IS_I965) { 439 u32 pgetbl_ctl; ··· 452 break; 453 case I965_PGETBL_SIZE_512KB: 454 size = 512; 455 + break; 456 + case I965_PGETBL_SIZE_1MB: 457 + size = 1024; 458 + break; 459 + case I965_PGETBL_SIZE_2MB: 460 + size = 2048; 461 + break; 462 + case I965_PGETBL_SIZE_1_5MB: 463 + size = 1024 + 512; 464 break; 465 default: 466 printk(KERN_INFO PFX "Unknown page table size, " ··· 523 break; 524 case I915_GMCH_GMS_STOLEN_48M: 525 /* Check it's really I915G */ 526 + if (IS_I915 || IS_I965 || IS_G33) 527 gtt_entries = MB(48) - KB(size); 528 else 529 gtt_entries = 0; 530 break; 531 case I915_GMCH_GMS_STOLEN_64M: 532 /* Check it's really I915G */ 533 + if (IS_I915 || IS_I965 || IS_G33) 534 gtt_entries = MB(64) - KB(size); 535 else 536 gtt_entries = 0; ··· 575 intel_private.gtt_entries = gtt_entries; 576 } 577 578 + static void intel_i830_fini_flush(void) 579 + { 580 + kunmap(intel_private.i8xx_page); 581 + intel_private.i8xx_flush_page = NULL; 582 + unmap_page_from_agp(intel_private.i8xx_page); 583 + 584 + __free_page(intel_private.i8xx_page); 585 + intel_private.i8xx_page = NULL; 586 + } 587 + 588 + static void intel_i830_setup_flush(void) 589 + { 590 + /* return if we've already set the flush mechanism up */ 591 + if (intel_private.i8xx_page) 592 + return; 593 + 594 + intel_private.i8xx_page = alloc_page(GFP_KERNEL | __GFP_ZERO | GFP_DMA32); 595 + if (!intel_private.i8xx_page) 596 + return; 597 + 598 + /* make page uncached */ 599 + map_page_into_agp(intel_private.i8xx_page); 600 + 601 + intel_private.i8xx_flush_page = kmap(intel_private.i8xx_page); 602 + if (!intel_private.i8xx_flush_page) 603 + intel_i830_fini_flush(); 604 + } 605 + 606 + static void intel_i830_chipset_flush(struct agp_bridge_data *bridge) 607 + { 608 + unsigned int *pg = intel_private.i8xx_flush_page; 609 + int i; 610 + 611 + for (i = 0; i < 256; i += 2) 612 + *(pg + i) = i; 613 + 614 + wmb(); 615 + } 616 + 617 /* The intel i830 automatically initializes the agp aperture during POST. 618 * Use the memory already set aside for in the GTT. 619 */ ··· 590 num_entries = size->num_entries; 591 agp_bridge->gatt_table_real = NULL; 592 593 + pci_read_config_dword(intel_private.pcidev, I810_MMADDR, &temp); 594 temp &= 0xfff80000; 595 596 + intel_private.registers = ioremap(temp, 128 * 4096); 597 if (!intel_private.registers) 598 return -ENOMEM; 599 ··· 633 return values[0].size; 634 } 635 636 + pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl); 637 638 if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) { 639 agp_bridge->previous_size = agp_bridge->current_size = (void *) values; ··· 657 658 current_size = A_SIZE_FIX(agp_bridge->current_size); 659 660 + pci_read_config_dword(intel_private.pcidev, I810_GMADDR, &temp); 661 agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); 662 663 + pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl); 664 gmch_ctrl |= I830_GMCH_ENABLED; 665 + pci_write_config_word(agp_bridge->dev, I830_GMCH_CTRL, gmch_ctrl); 666 667 writel(agp_bridge->gatt_bus_addr|I810_PGETBL_ENABLED, intel_private.registers+I810_PGETBL_CTL); 668 readl(intel_private.registers+I810_PGETBL_CTL); /* PCI Posting. */ ··· 675 } 676 677 global_cache_flush(); 678 + 679 + intel_i830_setup_flush(); 680 return 0; 681 } 682 ··· 683 iounmap(intel_private.registers); 684 } 685 686 + static int intel_i830_insert_entries(struct agp_memory *mem, off_t pg_start, 687 + int type) 688 { 689 + int i, j, num_entries; 690 void *temp; 691 int ret = -EINVAL; 692 int mask_type; ··· 697 num_entries = A_SIZE_FIX(temp)->num_entries; 698 699 if (pg_start < intel_private.gtt_entries) { 700 + printk(KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_private.gtt_entries == 0x%.8x\n", 701 + pg_start, intel_private.gtt_entries); 702 703 + printk(KERN_INFO PFX "Trying to insert into local/stolen memory\n"); 704 goto out_err; 705 } 706 ··· 738 return ret; 739 } 740 741 + static int intel_i830_remove_entries(struct agp_memory *mem, off_t pg_start, 742 + int type) 743 { 744 int i; 745 ··· 747 return 0; 748 749 if (pg_start < intel_private.gtt_entries) { 750 + printk(KERN_INFO PFX "Trying to disable local/stolen memory\n"); 751 return -EINVAL; 752 } 753 ··· 760 return 0; 761 } 762 763 + static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count, int type) 764 { 765 if (type == AGP_PHYS_MEMORY) 766 return alloc_agpphysmem_i8xx(pg_count, type); 767 /* always return NULL for other allocation types for now */ 768 return NULL; 769 + } 770 + 771 + static int intel_alloc_chipset_flush_resource(void) 772 + { 773 + int ret; 774 + ret = pci_bus_alloc_resource(agp_bridge->dev->bus, &intel_private.ifp_resource, PAGE_SIZE, 775 + PAGE_SIZE, PCIBIOS_MIN_MEM, 0, 776 + pcibios_align_resource, agp_bridge->dev); 777 + 778 + return ret; 779 + } 780 + 781 + static void intel_i915_setup_chipset_flush(void) 782 + { 783 + int ret; 784 + u32 temp; 785 + 786 + pci_read_config_dword(agp_bridge->dev, I915_IFPADDR, &temp); 787 + if (!(temp & 0x1)) { 788 + intel_alloc_chipset_flush_resource(); 789 + intel_private.resource_valid = 1; 790 + pci_write_config_dword(agp_bridge->dev, I915_IFPADDR, (intel_private.ifp_resource.start & 0xffffffff) | 0x1); 791 + } else { 792 + temp &= ~1; 793 + 794 + intel_private.resource_valid = 1; 795 + intel_private.ifp_resource.start = temp; 796 + intel_private.ifp_resource.end = temp + PAGE_SIZE; 797 + ret = request_resource(&iomem_resource, &intel_private.ifp_resource); 798 + /* some BIOSes reserve this area in a pnp some don't */ 799 + if (ret) 800 + intel_private.resource_valid = 0; 801 + } 802 + } 803 + 804 + static void intel_i965_g33_setup_chipset_flush(void) 805 + { 806 + u32 temp_hi, temp_lo; 807 + int ret; 808 + 809 + pci_read_config_dword(agp_bridge->dev, I965_IFPADDR + 4, &temp_hi); 810 + pci_read_config_dword(agp_bridge->dev, I965_IFPADDR, &temp_lo); 811 + 812 + if (!(temp_lo & 0x1)) { 813 + 814 + intel_alloc_chipset_flush_resource(); 815 + 816 + intel_private.resource_valid = 1; 817 + pci_write_config_dword(agp_bridge->dev, I965_IFPADDR + 4, 818 + upper_32_bits(intel_private.ifp_resource.start)); 819 + pci_write_config_dword(agp_bridge->dev, I965_IFPADDR, (intel_private.ifp_resource.start & 0xffffffff) | 0x1); 820 + } else { 821 + u64 l64; 822 + 823 + temp_lo &= ~0x1; 824 + l64 = ((u64)temp_hi << 32) | temp_lo; 825 + 826 + intel_private.resource_valid = 1; 827 + intel_private.ifp_resource.start = l64; 828 + intel_private.ifp_resource.end = l64 + PAGE_SIZE; 829 + ret = request_resource(&iomem_resource, &intel_private.ifp_resource); 830 + /* some BIOSes reserve this area in a pnp some don't */ 831 + if (ret) 832 + intel_private.resource_valid = 0; 833 + } 834 + } 835 + 836 + static void intel_i9xx_setup_flush(void) 837 + { 838 + /* return if already configured */ 839 + if (intel_private.ifp_resource.start) 840 + return; 841 + 842 + /* setup a resource for this object */ 843 + intel_private.ifp_resource.name = "Intel Flush Page"; 844 + intel_private.ifp_resource.flags = IORESOURCE_MEM; 845 + 846 + /* Setup chipset flush for 915 */ 847 + if (IS_I965 || IS_G33) { 848 + intel_i965_g33_setup_chipset_flush(); 849 + } else { 850 + intel_i915_setup_chipset_flush(); 851 + } 852 + 853 + if (intel_private.ifp_resource.start) { 854 + intel_private.i9xx_flush_page = ioremap_nocache(intel_private.ifp_resource.start, PAGE_SIZE); 855 + if (!intel_private.i9xx_flush_page) 856 + printk(KERN_INFO "unable to ioremap flush page - no chipset flushing"); 857 + } 858 } 859 860 static int intel_i915_configure(void) ··· 781 782 agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); 783 784 + pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl); 785 gmch_ctrl |= I830_GMCH_ENABLED; 786 + pci_write_config_word(agp_bridge->dev, I830_GMCH_CTRL, gmch_ctrl); 787 788 writel(agp_bridge->gatt_bus_addr|I810_PGETBL_ENABLED, intel_private.registers+I810_PGETBL_CTL); 789 readl(intel_private.registers+I810_PGETBL_CTL); /* PCI Posting. */ ··· 796 } 797 798 global_cache_flush(); 799 + 800 + intel_i9xx_setup_flush(); 801 + 802 return 0; 803 } 804 805 static void intel_i915_cleanup(void) 806 { 807 + if (intel_private.i9xx_flush_page) 808 + iounmap(intel_private.i9xx_flush_page); 809 + if (intel_private.resource_valid) 810 + release_resource(&intel_private.ifp_resource); 811 + intel_private.ifp_resource.start = 0; 812 + intel_private.resource_valid = 0; 813 iounmap(intel_private.gtt); 814 iounmap(intel_private.registers); 815 } 816 817 + static void intel_i915_chipset_flush(struct agp_bridge_data *bridge) 818 { 819 + if (intel_private.i9xx_flush_page) 820 + writel(1, intel_private.i9xx_flush_page); 821 + } 822 + 823 + static int intel_i915_insert_entries(struct agp_memory *mem, off_t pg_start, 824 + int type) 825 + { 826 + int i, j, num_entries; 827 void *temp; 828 int ret = -EINVAL; 829 int mask_type; ··· 820 num_entries = A_SIZE_FIX(temp)->num_entries; 821 822 if (pg_start < intel_private.gtt_entries) { 823 + printk(KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_private.gtt_entries == 0x%.8x\n", 824 + pg_start, intel_private.gtt_entries); 825 826 + printk(KERN_INFO PFX "Trying to insert into local/stolen memory\n"); 827 goto out_err; 828 } 829 ··· 861 return ret; 862 } 863 864 + static int intel_i915_remove_entries(struct agp_memory *mem, off_t pg_start, 865 + int type) 866 { 867 int i; 868 ··· 870 return 0; 871 872 if (pg_start < intel_private.gtt_entries) { 873 + printk(KERN_INFO PFX "Trying to disable local/stolen memory\n"); 874 return -EINVAL; 875 } 876 877 + for (i = pg_start; i < (mem->page_count + pg_start); i++) 878 writel(agp_bridge->scratch_page, intel_private.gtt+i); 879 + 880 readl(intel_private.gtt+i-1); 881 882 agp_bridge->driver->tlb_flush(mem); ··· 923 agp_bridge->gatt_table_real = NULL; 924 925 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp); 926 + pci_read_config_dword(intel_private.pcidev, I915_PTEADDR, &temp2); 927 928 if (IS_G33) 929 gtt_map_size = 1024 * 1024; /* 1M on G33 */ ··· 933 934 temp &= 0xfff80000; 935 936 + intel_private.registers = ioremap(temp, 128 * 4096); 937 if (!intel_private.registers) { 938 iounmap(intel_private.gtt); 939 return -ENOMEM; ··· 980 struct aper_size_info_fixed *size; 981 int num_entries; 982 u32 temp; 983 + int gtt_offset, gtt_size; 984 985 size = agp_bridge->current_size; 986 page_order = size->page_order; ··· 989 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp); 990 991 temp &= 0xfff00000; 992 993 + if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_HB) 994 + gtt_offset = gtt_size = MB(2); 995 + else 996 + gtt_offset = gtt_size = KB(512); 997 998 + intel_private.gtt = ioremap((temp + gtt_offset) , gtt_size); 999 1000 + if (!intel_private.gtt) 1001 + return -ENOMEM; 1002 + 1003 + intel_private.registers = ioremap(temp, 128 * 4096); 1004 if (!intel_private.registers) { 1005 iounmap(intel_private.gtt); 1006 return -ENOMEM; ··· 1154 /* the Intel 815 chipset spec. says that bits 29-31 in the 1155 * ATTBASE register are reserved -> try not to write them */ 1156 if (agp_bridge->gatt_bus_addr & INTEL_815_ATTBASE_MASK) { 1157 + printk(KERN_EMERG PFX "gatt bus addr too high"); 1158 return -EINVAL; 1159 } 1160 ··· 1296 pci_write_config_byte(agp_bridge->dev, INTEL_I845_AGPM, temp2 | (1 << 1)); 1297 /* clear any possible error conditions */ 1298 pci_write_config_word(agp_bridge->dev, INTEL_I845_ERRSTS, 0x001c); 1299 + 1300 + intel_i830_setup_flush(); 1301 return 0; 1302 } 1303 ··· 1552 .agp_alloc_page = agp_generic_alloc_page, 1553 .agp_destroy_page = agp_generic_destroy_page, 1554 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1555 + .chipset_flush = intel_i830_chipset_flush, 1556 }; 1557 1558 static const struct agp_bridge_driver intel_820_driver = { ··· 1648 .agp_alloc_page = agp_generic_alloc_page, 1649 .agp_destroy_page = agp_generic_destroy_page, 1650 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1651 + .chipset_flush = intel_i830_chipset_flush, 1652 }; 1653 1654 static const struct agp_bridge_driver intel_850_driver = { ··· 1721 .agp_alloc_page = agp_generic_alloc_page, 1722 .agp_destroy_page = agp_generic_destroy_page, 1723 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1724 + .chipset_flush = intel_i915_chipset_flush, 1725 }; 1726 1727 static const struct agp_bridge_driver intel_i965_driver = { ··· 1746 .agp_alloc_page = agp_generic_alloc_page, 1747 .agp_destroy_page = agp_generic_destroy_page, 1748 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1749 + .chipset_flush = intel_i915_chipset_flush, 1750 }; 1751 1752 static const struct agp_bridge_driver intel_7505_driver = { ··· 1795 .agp_alloc_page = agp_generic_alloc_page, 1796 .agp_destroy_page = agp_generic_destroy_page, 1797 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1798 + .chipset_flush = intel_i915_chipset_flush, 1799 }; 1800 1801 static int find_gmch(u16 device) ··· 1804 gmch_device = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL); 1805 if (gmch_device && PCI_FUNC(gmch_device->devfn) != 0) { 1806 gmch_device = pci_get_device(PCI_VENDOR_ID_INTEL, 1807 + device, gmch_device); 1808 } 1809 1810 if (!gmch_device) ··· 1867 NULL, &intel_915_driver }, 1868 { PCI_DEVICE_ID_INTEL_82946GZ_HB, PCI_DEVICE_ID_INTEL_82946GZ_IG, 0, "946GZ", 1869 NULL, &intel_i965_driver }, 1870 + { PCI_DEVICE_ID_INTEL_82G35_HB, PCI_DEVICE_ID_INTEL_82G35_IG, 0, "G35", 1871 NULL, &intel_i965_driver }, 1872 { PCI_DEVICE_ID_INTEL_82965Q_HB, PCI_DEVICE_ID_INTEL_82965Q_IG, 0, "965Q", 1873 NULL, &intel_i965_driver }, ··· 1885 NULL, &intel_g33_driver }, 1886 { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33", 1887 NULL, &intel_g33_driver }, 1888 + { PCI_DEVICE_ID_INTEL_IGD_HB, PCI_DEVICE_ID_INTEL_IGD_IG, 0, 1889 + "Intel Integrated Graphics Device", NULL, &intel_i965_driver }, 1890 { 0, 0, 0, NULL, NULL, NULL } 1891 }; 1892 ··· 1924 if (intel_agp_chipsets[i].name == NULL) { 1925 if (cap_ptr) 1926 printk(KERN_WARNING PFX "Unsupported Intel chipset" 1927 + "(device id: %04x)\n", pdev->device); 1928 agp_put_bridge(bridge); 1929 return -ENODEV; 1930 } ··· 1937 intel_agp_chipsets[i].gmch_chip_id); 1938 agp_put_bridge(bridge); 1939 return -ENODEV; 1940 + } 1941 1942 bridge->dev = pdev; 1943 bridge->capndx = cap_ptr; ··· 2067 ID(PCI_DEVICE_ID_INTEL_82945GM_HB), 2068 ID(PCI_DEVICE_ID_INTEL_82945GME_HB), 2069 ID(PCI_DEVICE_ID_INTEL_82946GZ_HB), 2070 + ID(PCI_DEVICE_ID_INTEL_82G35_HB), 2071 ID(PCI_DEVICE_ID_INTEL_82965Q_HB), 2072 ID(PCI_DEVICE_ID_INTEL_82965G_HB), 2073 ID(PCI_DEVICE_ID_INTEL_82965GM_HB), ··· 2075 ID(PCI_DEVICE_ID_INTEL_G33_HB), 2076 ID(PCI_DEVICE_ID_INTEL_Q35_HB), 2077 ID(PCI_DEVICE_ID_INTEL_Q33_HB), 2078 + ID(PCI_DEVICE_ID_INTEL_IGD_HB), 2079 { } 2080 }; 2081
+1
include/linux/agp_backend.h
··· 109 extern void agp_enable(struct agp_bridge_data *, u32); 110 extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); 111 extern void agp_backend_release(struct agp_bridge_data *); 112 113 #endif /* __KERNEL__ */ 114 #endif /* _AGP_BACKEND_H */
··· 109 extern void agp_enable(struct agp_bridge_data *, u32); 110 extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); 111 extern void agp_backend_release(struct agp_bridge_data *); 112 + extern void agp_flush_chipset(struct agp_bridge_data *); 113 114 #endif /* __KERNEL__ */ 115 #endif /* _AGP_BACKEND_H */
+1
include/linux/agpgart.h
··· 38 #define AGPIOC_DEALLOCATE _IOW (AGPIOC_BASE, 7, int) 39 #define AGPIOC_BIND _IOW (AGPIOC_BASE, 8, struct agp_bind*) 40 #define AGPIOC_UNBIND _IOW (AGPIOC_BASE, 9, struct agp_unbind*) 41 42 #define AGP_DEVICE "/dev/agpgart" 43
··· 38 #define AGPIOC_DEALLOCATE _IOW (AGPIOC_BASE, 7, int) 39 #define AGPIOC_BIND _IOW (AGPIOC_BASE, 8, struct agp_bind*) 40 #define AGPIOC_UNBIND _IOW (AGPIOC_BASE, 9, struct agp_unbind*) 41 + #define AGPIOC_CHIPSET_FLUSH _IO (AGPIOC_BASE, 10) 42 43 #define AGP_DEVICE "/dev/agpgart" 44