11da177e4SLinus Torvalds /* 21da177e4SLinus Torvalds * AGPGART driver backend routines. 31da177e4SLinus Torvalds * Copyright (C) 2004 Silicon Graphics, Inc. 41da177e4SLinus Torvalds * Copyright (C) 2002-2003 Dave Jones. 51da177e4SLinus Torvalds * Copyright (C) 1999 Jeff Hartmann. 61da177e4SLinus Torvalds * Copyright (C) 1999 Precision Insight, Inc. 71da177e4SLinus Torvalds * Copyright (C) 1999 Xi Graphics, Inc. 81da177e4SLinus Torvalds * 91da177e4SLinus Torvalds * Permission is hereby granted, free of charge, to any person obtaining a 101da177e4SLinus Torvalds * copy of this software and associated documentation files (the "Software"), 111da177e4SLinus Torvalds * to deal in the Software without restriction, including without limitation 121da177e4SLinus Torvalds * the rights to use, copy, modify, merge, publish, distribute, sublicense, 131da177e4SLinus Torvalds * and/or sell copies of the Software, and to permit persons to whom the 141da177e4SLinus Torvalds * Software is furnished to do so, subject to the following conditions: 151da177e4SLinus Torvalds * 161da177e4SLinus Torvalds * The above copyright notice and this permission notice shall be included 171da177e4SLinus Torvalds * in all copies or substantial portions of the Software. 181da177e4SLinus Torvalds * 191da177e4SLinus Torvalds * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 201da177e4SLinus Torvalds * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 211da177e4SLinus Torvalds * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 221da177e4SLinus Torvalds * JEFF HARTMANN, DAVE JONES, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, 231da177e4SLinus Torvalds * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 241da177e4SLinus Torvalds * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 251da177e4SLinus Torvalds * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 261da177e4SLinus Torvalds * 271da177e4SLinus Torvalds * TODO: 281da177e4SLinus Torvalds * - Allocate more than order 0 pages to avoid too much linear map splitting. 291da177e4SLinus Torvalds */ 301da177e4SLinus Torvalds #include <linux/module.h> 311da177e4SLinus Torvalds #include <linux/pci.h> 321da177e4SLinus Torvalds #include <linux/init.h> 331da177e4SLinus Torvalds #include <linux/pagemap.h> 341da177e4SLinus Torvalds #include <linux/miscdevice.h> 351da177e4SLinus Torvalds #include <linux/pm.h> 361da177e4SLinus Torvalds #include <linux/agp_backend.h> 371da177e4SLinus Torvalds #include <linux/agpgart.h> 381da177e4SLinus Torvalds #include <linux/vmalloc.h> 391da177e4SLinus Torvalds #include <asm/io.h> 401da177e4SLinus Torvalds #include "agp.h" 411da177e4SLinus Torvalds 421da177e4SLinus Torvalds /* Due to XFree86 brain-damage, we can't go to 1.0 until they 431da177e4SLinus Torvalds * fix some real stupidity. It's only by chance we can bump 441da177e4SLinus Torvalds * past 0.99 at all due to some boolean logic error. */ 451da177e4SLinus Torvalds #define AGPGART_VERSION_MAJOR 0 46a13af4b4SDave Airlie #define AGPGART_VERSION_MINOR 103 47e7745d4eSDave Jones static const struct agp_version agp_current_version = 481da177e4SLinus Torvalds { 491da177e4SLinus Torvalds .major = AGPGART_VERSION_MAJOR, 501da177e4SLinus Torvalds .minor = AGPGART_VERSION_MINOR, 511da177e4SLinus Torvalds }; 521da177e4SLinus Torvalds 531da177e4SLinus Torvalds struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *) = 541da177e4SLinus Torvalds &agp_generic_find_bridge; 551da177e4SLinus Torvalds 561da177e4SLinus Torvalds struct agp_bridge_data *agp_bridge; 571da177e4SLinus Torvalds LIST_HEAD(agp_bridges); 581da177e4SLinus Torvalds EXPORT_SYMBOL(agp_bridge); 591da177e4SLinus Torvalds EXPORT_SYMBOL(agp_bridges); 601da177e4SLinus Torvalds EXPORT_SYMBOL(agp_find_bridge); 611da177e4SLinus Torvalds 621da177e4SLinus Torvalds /** 631da177e4SLinus Torvalds * agp_backend_acquire - attempt to acquire an agp backend. 641da177e4SLinus Torvalds * 651da177e4SLinus Torvalds */ 661da177e4SLinus Torvalds struct agp_bridge_data *agp_backend_acquire(struct pci_dev *pdev) 671da177e4SLinus Torvalds { 681da177e4SLinus Torvalds struct agp_bridge_data *bridge; 691da177e4SLinus Torvalds 701da177e4SLinus Torvalds bridge = agp_find_bridge(pdev); 711da177e4SLinus Torvalds 721da177e4SLinus Torvalds if (!bridge) 731da177e4SLinus Torvalds return NULL; 741da177e4SLinus Torvalds 751da177e4SLinus Torvalds if (atomic_read(&bridge->agp_in_use)) 761da177e4SLinus Torvalds return NULL; 771da177e4SLinus Torvalds atomic_inc(&bridge->agp_in_use); 781da177e4SLinus Torvalds return bridge; 791da177e4SLinus Torvalds } 801da177e4SLinus Torvalds EXPORT_SYMBOL(agp_backend_acquire); 811da177e4SLinus Torvalds 821da177e4SLinus Torvalds 831da177e4SLinus Torvalds /** 841da177e4SLinus Torvalds * agp_backend_release - release the lock on the agp backend. 851da177e4SLinus Torvalds * 861da177e4SLinus Torvalds * The caller must insure that the graphics aperture translation table 871da177e4SLinus Torvalds * is read for use by another entity. 881da177e4SLinus Torvalds * 891da177e4SLinus Torvalds * (Ensure that all memory it bound is unbound.) 901da177e4SLinus Torvalds */ 911da177e4SLinus Torvalds void agp_backend_release(struct agp_bridge_data *bridge) 921da177e4SLinus Torvalds { 931da177e4SLinus Torvalds 941da177e4SLinus Torvalds if (bridge) 951da177e4SLinus Torvalds atomic_dec(&bridge->agp_in_use); 961da177e4SLinus Torvalds } 971da177e4SLinus Torvalds EXPORT_SYMBOL(agp_backend_release); 981da177e4SLinus Torvalds 991da177e4SLinus Torvalds 1005e9ad06aSDave Jones static const struct { int mem, agp; } maxes_table[] = { 1011da177e4SLinus Torvalds {0, 0}, 1021da177e4SLinus Torvalds {32, 4}, 1031da177e4SLinus Torvalds {64, 28}, 1041da177e4SLinus Torvalds {128, 96}, 1051da177e4SLinus Torvalds {256, 204}, 1061da177e4SLinus Torvalds {512, 440}, 1071da177e4SLinus Torvalds {1024, 942}, 1081da177e4SLinus Torvalds {2048, 1920}, 1091da177e4SLinus Torvalds {4096, 3932} 1101da177e4SLinus Torvalds }; 1111da177e4SLinus Torvalds 1121da177e4SLinus Torvalds static int agp_find_max(void) 1131da177e4SLinus Torvalds { 1141da177e4SLinus Torvalds long memory, index, result; 1151da177e4SLinus Torvalds 1161da177e4SLinus Torvalds #if PAGE_SHIFT < 20 1171da177e4SLinus Torvalds memory = num_physpages >> (20 - PAGE_SHIFT); 1181da177e4SLinus Torvalds #else 1191da177e4SLinus Torvalds memory = num_physpages << (PAGE_SHIFT - 20); 1201da177e4SLinus Torvalds #endif 1211da177e4SLinus Torvalds index = 1; 1221da177e4SLinus Torvalds 1231da177e4SLinus Torvalds while ((memory > maxes_table[index].mem) && (index < 8)) 1241da177e4SLinus Torvalds index++; 1251da177e4SLinus Torvalds 1261da177e4SLinus Torvalds result = maxes_table[index - 1].agp + 1271da177e4SLinus Torvalds ( (memory - maxes_table[index - 1].mem) * 1281da177e4SLinus Torvalds (maxes_table[index].agp - maxes_table[index - 1].agp)) / 1291da177e4SLinus Torvalds (maxes_table[index].mem - maxes_table[index - 1].mem); 1301da177e4SLinus Torvalds 1311da177e4SLinus Torvalds result = result << (20 - PAGE_SHIFT); 1321da177e4SLinus Torvalds return result; 1331da177e4SLinus Torvalds } 1341da177e4SLinus Torvalds 1351da177e4SLinus Torvalds 1361da177e4SLinus Torvalds static int agp_backend_initialize(struct agp_bridge_data *bridge) 1371da177e4SLinus Torvalds { 1381da177e4SLinus Torvalds int size_value, rc, got_gatt=0, got_keylist=0; 1391da177e4SLinus Torvalds 1401da177e4SLinus Torvalds bridge->max_memory_agp = agp_find_max(); 1411da177e4SLinus Torvalds bridge->version = &agp_current_version; 1421da177e4SLinus Torvalds 1431da177e4SLinus Torvalds if (bridge->driver->needs_scratch_page) { 14407613ba2SDave Airlie struct page *page = bridge->driver->agp_alloc_page(bridge); 1451da177e4SLinus Torvalds 14607613ba2SDave Airlie if (!page) { 147e3cf6951SBjorn Helgaas dev_err(&bridge->dev->dev, 148e3cf6951SBjorn Helgaas "can't get memory for scratch page\n"); 1491da177e4SLinus Torvalds return -ENOMEM; 1501da177e4SLinus Torvalds } 1511da177e4SLinus Torvalds 15207613ba2SDave Airlie bridge->scratch_page_real = phys_to_gart(page_to_phys(page)); 153*56ec4c1eSDavid Woodhouse if (bridge->driver->agp_map_page) { 154*56ec4c1eSDavid Woodhouse if (bridge->driver->agp_map_page(phys_to_virt(page_to_phys(page)), 155ff663cf8SZhenyu Wang &bridge->scratch_page_dma)) { 156ff663cf8SZhenyu Wang dev_err(&bridge->dev->dev, 157ff663cf8SZhenyu Wang "unable to dma-map scratch page\n"); 158ff663cf8SZhenyu Wang rc = -ENOMEM; 159ff663cf8SZhenyu Wang goto err_out_nounmap; 160ff663cf8SZhenyu Wang } 161*56ec4c1eSDavid Woodhouse } else { 162*56ec4c1eSDavid Woodhouse bridge->scratch_page_dma = phys_to_gart(page_to_phys(page)); 163*56ec4c1eSDavid Woodhouse } 164*56ec4c1eSDavid Woodhouse 165*56ec4c1eSDavid Woodhouse bridge->scratch_page = bridge->driver->mask_memory(bridge, 166*56ec4c1eSDavid Woodhouse bridge->scratch_page_dma, 0); 1671da177e4SLinus Torvalds } 1681da177e4SLinus Torvalds 1691da177e4SLinus Torvalds size_value = bridge->driver->fetch_size(); 1701da177e4SLinus Torvalds if (size_value == 0) { 171e3cf6951SBjorn Helgaas dev_err(&bridge->dev->dev, "can't determine aperture size\n"); 1721da177e4SLinus Torvalds rc = -EINVAL; 1731da177e4SLinus Torvalds goto err_out; 1741da177e4SLinus Torvalds } 1751da177e4SLinus Torvalds if (bridge->driver->create_gatt_table(bridge)) { 176e3cf6951SBjorn Helgaas dev_err(&bridge->dev->dev, 177e3cf6951SBjorn Helgaas "can't get memory for graphics translation table\n"); 1781da177e4SLinus Torvalds rc = -ENOMEM; 1791da177e4SLinus Torvalds goto err_out; 1801da177e4SLinus Torvalds } 1811da177e4SLinus Torvalds got_gatt = 1; 1821da177e4SLinus Torvalds 1831da177e4SLinus Torvalds bridge->key_list = vmalloc(PAGE_SIZE * 4); 1841da177e4SLinus Torvalds if (bridge->key_list == NULL) { 185e3cf6951SBjorn Helgaas dev_err(&bridge->dev->dev, 186e3cf6951SBjorn Helgaas "can't allocate memory for key lists\n"); 1871da177e4SLinus Torvalds rc = -ENOMEM; 1881da177e4SLinus Torvalds goto err_out; 1891da177e4SLinus Torvalds } 1901da177e4SLinus Torvalds got_keylist = 1; 1911da177e4SLinus Torvalds 1921da177e4SLinus Torvalds /* FIXME vmalloc'd memory not guaranteed contiguous */ 1931da177e4SLinus Torvalds memset(bridge->key_list, 0, PAGE_SIZE * 4); 1941da177e4SLinus Torvalds 1951da177e4SLinus Torvalds if (bridge->driver->configure()) { 196e3cf6951SBjorn Helgaas dev_err(&bridge->dev->dev, "error configuring host chipset\n"); 1971da177e4SLinus Torvalds rc = -EINVAL; 1981da177e4SLinus Torvalds goto err_out; 1991da177e4SLinus Torvalds } 200a8c84df9SKeith Packard INIT_LIST_HEAD(&bridge->mapped_list); 201a8c84df9SKeith Packard spin_lock_init(&bridge->mapped_lock); 2021da177e4SLinus Torvalds 2031da177e4SLinus Torvalds return 0; 2041da177e4SLinus Torvalds 2051da177e4SLinus Torvalds err_out: 206ff663cf8SZhenyu Wang if (bridge->driver->needs_scratch_page && 207ff663cf8SZhenyu Wang bridge->driver->agp_unmap_page) { 208ff663cf8SZhenyu Wang void *va = gart_to_virt(bridge->scratch_page_real); 209ff663cf8SZhenyu Wang 210ff663cf8SZhenyu Wang bridge->driver->agp_unmap_page(va, bridge->scratch_page_dma); 211ff663cf8SZhenyu Wang } 212ff663cf8SZhenyu Wang err_out_nounmap: 21388d51967SAlan Hourihane if (bridge->driver->needs_scratch_page) { 214da503fa6SJan Beulich void *va = gart_to_virt(bridge->scratch_page_real); 215da503fa6SJan Beulich 216da503fa6SJan Beulich bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_UNMAP); 217da503fa6SJan Beulich bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_FREE); 21888d51967SAlan Hourihane } 2191da177e4SLinus Torvalds if (got_gatt) 2201da177e4SLinus Torvalds bridge->driver->free_gatt_table(bridge); 2211da177e4SLinus Torvalds if (got_keylist) { 2221da177e4SLinus Torvalds vfree(bridge->key_list); 2231da177e4SLinus Torvalds bridge->key_list = NULL; 2241da177e4SLinus Torvalds } 2251da177e4SLinus Torvalds return rc; 2261da177e4SLinus Torvalds } 2271da177e4SLinus Torvalds 2281da177e4SLinus Torvalds /* cannot be __exit b/c as it could be called from __init code */ 2291da177e4SLinus Torvalds static void agp_backend_cleanup(struct agp_bridge_data *bridge) 2301da177e4SLinus Torvalds { 2311da177e4SLinus Torvalds if (bridge->driver->cleanup) 2321da177e4SLinus Torvalds bridge->driver->cleanup(); 2331da177e4SLinus Torvalds if (bridge->driver->free_gatt_table) 2341da177e4SLinus Torvalds bridge->driver->free_gatt_table(bridge); 235f9101210SJesper Juhl 2361da177e4SLinus Torvalds vfree(bridge->key_list); 2371da177e4SLinus Torvalds bridge->key_list = NULL; 2381da177e4SLinus Torvalds 2391da177e4SLinus Torvalds if (bridge->driver->agp_destroy_page && 24088d51967SAlan Hourihane bridge->driver->needs_scratch_page) { 241da503fa6SJan Beulich void *va = gart_to_virt(bridge->scratch_page_real); 242da503fa6SJan Beulich 243ff663cf8SZhenyu Wang if (bridge->driver->agp_unmap_page) 244ff663cf8SZhenyu Wang bridge->driver->agp_unmap_page(va, 245ff663cf8SZhenyu Wang bridge->scratch_page_dma); 246ff663cf8SZhenyu Wang 247da503fa6SJan Beulich bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_UNMAP); 248da503fa6SJan Beulich bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_FREE); 24988d51967SAlan Hourihane } 2501da177e4SLinus Torvalds } 2511da177e4SLinus Torvalds 2521da177e4SLinus Torvalds /* When we remove the global variable agp_bridge from all drivers 2531da177e4SLinus Torvalds * then agp_alloc_bridge and agp_generic_find_bridge need to be updated 2541da177e4SLinus Torvalds */ 2551da177e4SLinus Torvalds 2561da177e4SLinus Torvalds struct agp_bridge_data *agp_alloc_bridge(void) 2571da177e4SLinus Torvalds { 2580ea27d9fSDave Jones struct agp_bridge_data *bridge; 2591da177e4SLinus Torvalds 2600ea27d9fSDave Jones bridge = kzalloc(sizeof(*bridge), GFP_KERNEL); 2611da177e4SLinus Torvalds if (!bridge) 2621da177e4SLinus Torvalds return NULL; 2631da177e4SLinus Torvalds 2641da177e4SLinus Torvalds atomic_set(&bridge->agp_in_use, 0); 2651da177e4SLinus Torvalds atomic_set(&bridge->current_memory_agp, 0); 2661da177e4SLinus Torvalds 2671da177e4SLinus Torvalds if (list_empty(&agp_bridges)) 2681da177e4SLinus Torvalds agp_bridge = bridge; 2691da177e4SLinus Torvalds 2701da177e4SLinus Torvalds return bridge; 2711da177e4SLinus Torvalds } 2721da177e4SLinus Torvalds EXPORT_SYMBOL(agp_alloc_bridge); 2731da177e4SLinus Torvalds 2741da177e4SLinus Torvalds 2751da177e4SLinus Torvalds void agp_put_bridge(struct agp_bridge_data *bridge) 2761da177e4SLinus Torvalds { 2771da177e4SLinus Torvalds kfree(bridge); 2781da177e4SLinus Torvalds 2791da177e4SLinus Torvalds if (list_empty(&agp_bridges)) 2801da177e4SLinus Torvalds agp_bridge = NULL; 2811da177e4SLinus Torvalds } 2821da177e4SLinus Torvalds EXPORT_SYMBOL(agp_put_bridge); 2831da177e4SLinus Torvalds 2841da177e4SLinus Torvalds 2851da177e4SLinus Torvalds int agp_add_bridge(struct agp_bridge_data *bridge) 2861da177e4SLinus Torvalds { 2871da177e4SLinus Torvalds int error; 2881da177e4SLinus Torvalds 2891da177e4SLinus Torvalds if (agp_off) 2901da177e4SLinus Torvalds return -ENODEV; 2911da177e4SLinus Torvalds 2921da177e4SLinus Torvalds if (!bridge->dev) { 2931da177e4SLinus Torvalds printk (KERN_DEBUG PFX "Erk, registering with no pci_dev!\n"); 2941da177e4SLinus Torvalds return -EINVAL; 2951da177e4SLinus Torvalds } 2961da177e4SLinus Torvalds 2971da177e4SLinus Torvalds /* Grab reference on the chipset driver. */ 2981da177e4SLinus Torvalds if (!try_module_get(bridge->driver->owner)) { 299e3cf6951SBjorn Helgaas dev_info(&bridge->dev->dev, "can't lock chipset driver\n"); 3001da177e4SLinus Torvalds return -EINVAL; 3011da177e4SLinus Torvalds } 3021da177e4SLinus Torvalds 3031da177e4SLinus Torvalds error = agp_backend_initialize(bridge); 3041da177e4SLinus Torvalds if (error) { 305e3cf6951SBjorn Helgaas dev_info(&bridge->dev->dev, 306e3cf6951SBjorn Helgaas "agp_backend_initialize() failed\n"); 3071da177e4SLinus Torvalds goto err_out; 3081da177e4SLinus Torvalds } 3091da177e4SLinus Torvalds 3101da177e4SLinus Torvalds if (list_empty(&agp_bridges)) { 3111da177e4SLinus Torvalds error = agp_frontend_initialize(); 3121da177e4SLinus Torvalds if (error) { 313e3cf6951SBjorn Helgaas dev_info(&bridge->dev->dev, 314e3cf6951SBjorn Helgaas "agp_frontend_initialize() failed\n"); 3151da177e4SLinus Torvalds goto frontend_err; 3161da177e4SLinus Torvalds } 3171da177e4SLinus Torvalds 318e3cf6951SBjorn Helgaas dev_info(&bridge->dev->dev, "AGP aperture is %dM @ 0x%lx\n", 3191da177e4SLinus Torvalds bridge->driver->fetch_size(), bridge->gart_bus_addr); 3201da177e4SLinus Torvalds 3211da177e4SLinus Torvalds } 3221da177e4SLinus Torvalds 3231da177e4SLinus Torvalds list_add(&bridge->list, &agp_bridges); 3241da177e4SLinus Torvalds return 0; 3251da177e4SLinus Torvalds 3261da177e4SLinus Torvalds frontend_err: 3271da177e4SLinus Torvalds agp_backend_cleanup(bridge); 3281da177e4SLinus Torvalds err_out: 3291da177e4SLinus Torvalds module_put(bridge->driver->owner); 3301da177e4SLinus Torvalds agp_put_bridge(bridge); 3311da177e4SLinus Torvalds return error; 3321da177e4SLinus Torvalds } 3331da177e4SLinus Torvalds EXPORT_SYMBOL_GPL(agp_add_bridge); 3341da177e4SLinus Torvalds 3351da177e4SLinus Torvalds 3361da177e4SLinus Torvalds void agp_remove_bridge(struct agp_bridge_data *bridge) 3371da177e4SLinus Torvalds { 3381da177e4SLinus Torvalds agp_backend_cleanup(bridge); 3391da177e4SLinus Torvalds list_del(&bridge->list); 3401da177e4SLinus Torvalds if (list_empty(&agp_bridges)) 3411da177e4SLinus Torvalds agp_frontend_cleanup(); 3421da177e4SLinus Torvalds module_put(bridge->driver->owner); 3431da177e4SLinus Torvalds } 3441da177e4SLinus Torvalds EXPORT_SYMBOL_GPL(agp_remove_bridge); 3451da177e4SLinus Torvalds 3461da177e4SLinus Torvalds int agp_off; 3471da177e4SLinus Torvalds int agp_try_unsupported_boot; 3481da177e4SLinus Torvalds EXPORT_SYMBOL(agp_off); 3491da177e4SLinus Torvalds EXPORT_SYMBOL(agp_try_unsupported_boot); 3501da177e4SLinus Torvalds 3511da177e4SLinus Torvalds static int __init agp_init(void) 3521da177e4SLinus Torvalds { 3531da177e4SLinus Torvalds if (!agp_off) 35470e8992eSDave Jones printk(KERN_INFO "Linux agpgart interface v%d.%d\n", 3551da177e4SLinus Torvalds AGPGART_VERSION_MAJOR, AGPGART_VERSION_MINOR); 3561da177e4SLinus Torvalds return 0; 3571da177e4SLinus Torvalds } 3581da177e4SLinus Torvalds 359408b664aSAdrian Bunk static void __exit agp_exit(void) 3601da177e4SLinus Torvalds { 3611da177e4SLinus Torvalds } 3621da177e4SLinus Torvalds 3631da177e4SLinus Torvalds #ifndef MODULE 3641da177e4SLinus Torvalds static __init int agp_setup(char *s) 3651da177e4SLinus Torvalds { 3661da177e4SLinus Torvalds if (!strcmp(s,"off")) 3671da177e4SLinus Torvalds agp_off = 1; 3681da177e4SLinus Torvalds if (!strcmp(s,"try_unsupported")) 3691da177e4SLinus Torvalds agp_try_unsupported_boot = 1; 3701da177e4SLinus Torvalds return 1; 3711da177e4SLinus Torvalds } 3721da177e4SLinus Torvalds __setup("agp=", agp_setup); 3731da177e4SLinus Torvalds #endif 3741da177e4SLinus Torvalds 375f4432c5cSDave Jones MODULE_AUTHOR("Dave Jones <davej@redhat.com>"); 3761da177e4SLinus Torvalds MODULE_DESCRIPTION("AGP GART driver"); 3771da177e4SLinus Torvalds MODULE_LICENSE("GPL and additional rights"); 3781da177e4SLinus Torvalds MODULE_ALIAS_MISCDEV(AGPGART_MINOR); 3791da177e4SLinus Torvalds 3801da177e4SLinus Torvalds module_init(agp_init); 3811da177e4SLinus Torvalds module_exit(agp_exit); 3821da177e4SLinus Torvalds 383