/freebsd/sys/dev/agp/ |
H A D | agp_amd.c | 74 struct agp_amd_gatt *gatt; member 82 struct agp_amd_gatt *gatt; in agp_amd_alloc_gatt() local 90 gatt = malloc(sizeof(struct agp_amd_gatt), M_AGP, M_NOWAIT); in agp_amd_alloc_gatt() 91 if (!gatt) in agp_amd_alloc_gatt() 100 gatt->ag_entries = entries; in agp_amd_alloc_gatt() 101 gatt->ag_virtual = kmem_alloc_attr(entries * sizeof(uint32_t), in agp_amd_alloc_gatt() 103 if (!gatt->ag_virtual) { in agp_amd_alloc_gatt() 106 free(gatt, M_AGP); in agp_amd_alloc_gatt() 113 gatt->ag_vdir = kmem_alloc_attr(AGP_PAGE_SIZE, M_NOWAIT | in agp_amd_alloc_gatt() 115 if (!gatt->ag_vdir) { in agp_amd_alloc_gatt() [all …]
|
H A D | agp_sis.c | 51 struct agp_gatt *gatt; member 128 struct agp_gatt *gatt; in agp_sis_attach() local 138 gatt = agp_alloc_gatt(dev); in agp_sis_attach() 139 if (gatt) in agp_sis_attach() 151 sc->gatt = gatt; in agp_sis_attach() 154 pci_write_config(dev, AGP_SIS_ATTBASE, gatt->ag_physical, 4); in agp_sis_attach() 186 agp_free_gatt(sc->gatt); in agp_sis_detach() 231 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_sis_bind_page() 234 sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = physical; in agp_sis_bind_page() 243 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_sis_unbind_page() [all …]
|
H A D | agp_ali.c | 51 struct agp_gatt *gatt; member 96 struct agp_gatt *gatt; in agp_ali_attach() local 111 gatt = agp_alloc_gatt(dev); in agp_ali_attach() 112 if (gatt) in agp_ali_attach() 124 sc->gatt = gatt; in agp_ali_attach() 128 pci_write_config(dev, AGP_ALI_ATTBASE, gatt->ag_physical | in agp_ali_attach() 153 agp_free_gatt(sc->gatt); in agp_ali_detach() 210 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_ali_bind_page() 213 sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = physical; in agp_ali_bind_page() 222 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_ali_unbind_page() [all …]
|
H A D | agp_via.c | 55 struct agp_gatt *gatt; member 162 struct agp_gatt *gatt; in agp_via_attach() local 184 gatt = agp_alloc_gatt(dev); in agp_via_attach() 185 if (gatt) in agp_via_attach() 197 sc->gatt = gatt; in agp_via_attach() 201 pci_write_config(dev, sc->regs[REG_ATTBASE], gatt->ag_physical | 3, 4); in agp_via_attach() 209 pci_write_config(dev, sc->regs[REG_ATTBASE], gatt->ag_physical, 4); in agp_via_attach() 232 agp_free_gatt(sc->gatt); in agp_via_detach() 354 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_via_bind_page() 357 sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = physical; in agp_via_bind_page() [all …]
|
H A D | agp_intel.c | 53 struct agp_gatt *gatt; member 139 pci_write_config(dev, AGP_INTEL_ATTBASE, sc->gatt->ag_physical, 4); in agp_intel_commit_gatt() 218 struct agp_gatt *gatt; in agp_intel_attach() local 237 gatt = agp_alloc_gatt(dev); in agp_intel_attach() 238 if (gatt) in agp_intel_attach() 250 sc->gatt = gatt; in agp_intel_attach() 301 agp_free_gatt(sc->gatt); in agp_intel_detach() 371 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_intel_bind_page() 374 sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = physical | 0x17; in agp_intel_bind_page() 385 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_intel_unbind_page() [all …]
|
H A D | agp_nvidia.c | 65 struct agp_gatt * gatt; member 125 struct agp_gatt *gatt; in agp_nvidia_attach() local 179 gatt = agp_alloc_gatt(dev); in agp_nvidia_attach() 180 if (gatt) in agp_nvidia_attach() 189 sc->gatt = gatt; in agp_nvidia_attach() 219 (sc->gatt->ag_physical + in agp_nvidia_attach() 260 agp_free_gatt(sc->gatt); in agp_nvidia_detach() 311 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_nvidia_bind_page() 315 sc->gatt->ag_virtual[index] = physical | 1; in agp_nvidia_bind_page() 326 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_nvidia_unbind_page() [all …]
|
H A D | agp_apple.c | 62 struct agp_gatt *gatt; member 142 sc->gatt = agp_alloc_gatt(dev); in agp_apple_attach() 143 if (sc->gatt) in agp_apple_attach() 181 agp_free_gatt(sc->gatt); in agp_apple_detach() 212 (sc->gatt->ag_physical & 0xfffff000) | aperture, 4); in agp_apple_set_aperture() 222 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_apple_bind_page() 225 sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = physical; in agp_apple_bind_page() 234 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_apple_unbind_page() 237 sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = 0; in agp_apple_unbind_page()
|
H A D | agp_amd64.c | 72 struct agp_gatt *gatt; member 163 struct agp_gatt *gatt; in agp_amd64_attach() local 189 gatt = agp_alloc_gatt(dev); in agp_amd64_attach() 190 if (gatt) in agp_amd64_attach() 202 sc->gatt = gatt; in agp_amd64_attach() 231 (uint32_t)(gatt->ag_physical >> 8) & AGP_AMD64_ATTBASE_MASK, in agp_amd64_attach() 257 agp_free_gatt(sc->gatt); in agp_amd64_detach() 331 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_amd64_bind_page() 334 sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = in agp_amd64_bind_page() 345 if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT)) in agp_amd64_unbind_page() [all …]
|
H A D | agp.c | 137 struct agp_gatt *gatt; in agp_alloc_gatt() local 149 gatt = malloc(sizeof(struct agp_gatt), M_AGP, M_NOWAIT); in agp_alloc_gatt() 150 if (!gatt) in agp_alloc_gatt() 153 gatt->ag_entries = entries; in agp_alloc_gatt() 154 gatt->ag_virtual = kmem_alloc_contig(entries * sizeof(uint32_t), in agp_alloc_gatt() 156 if (!gatt->ag_virtual) { in agp_alloc_gatt() 159 free(gatt, M_AGP); in agp_alloc_gatt() 162 gatt->ag_physical = vtophys((vm_offset_t) gatt->ag_virtual); in agp_alloc_gatt() 164 return gatt; in agp_alloc_gatt() 168 agp_free_gatt(struct agp_gatt *gatt) in agp_free_gatt() argument [all …]
|
H A D | agp_i810.c | 197 struct agp_gatt *gatt; member 1189 /* According to the specs the gatt on the i810 must be 64k. */ in agp_i810_install_gatt() 1190 sc->gatt->ag_virtual = kmem_alloc_contig(64 * 1024, M_NOWAIT | in agp_i810_install_gatt() 1192 if (sc->gatt->ag_virtual == NULL) { in agp_i810_install_gatt() 1198 sc->gatt->ag_physical = vtophys((vm_offset_t)sc->gatt->ag_virtual); in agp_i810_install_gatt() 1201 sc->gatt->ag_physical | 1); in agp_i810_install_gatt() 1211 * The i830 automatically initializes the 128k gatt on boot. in agp_i830_install_gatt_init() 1218 sc->gatt->ag_physical = pgtblctl & ~1; in agp_i830_install_gatt_init() 1291 sc->gatt in agp_i810_attach() [all...] |
H A D | agppriv.h | 91 void agp_free_gatt(struct agp_gatt *gatt);
|