5 * \author Gareth Hughes <gareth@valinux.com>
9 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
10 * All Rights Reserved.
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
19 * The above copyright notice and this permission notice (including the next
20 * paragraph) shall be included in all copies or substantial portions of the
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29 * OTHER DEALINGS IN THE SOFTWARE.
32 #include <linux/config.h>
35 #include "radeon_drm.h"
36 #include "radeon_drv.h"
38 #include "drm_pciids.h"
42 MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers\n");
43 module_param_named(no_wb, radeon_no_wb, int, 0444);
45 static int postinit(struct drm_device *dev, unsigned long flags)
47 DRM_INFO("Initialized %s %d.%d.%d %s on minor %d: %s\n",
52 DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev)
57 static int version(drm_version_t * version)
61 version->version_major = DRIVER_MAJOR;
62 version->version_minor = DRIVER_MINOR;
63 version->version_patchlevel = DRIVER_PATCHLEVEL;
64 DRM_COPY(version->name, DRIVER_NAME);
65 DRM_COPY(version->date, DRIVER_DATE);
66 DRM_COPY(version->desc, DRIVER_DESC);
70 static struct pci_device_id pciidlist[] = {
74 extern drm_ioctl_desc_t radeon_ioctls[];
75 extern int radeon_max_ioctl;
77 static struct drm_driver driver = {
79 DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG |
80 DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED |
82 .dev_priv_size = sizeof(drm_radeon_buf_priv_t),
83 .preinit = radeon_driver_preinit,
84 .presetup = radeon_presetup,
85 .postcleanup = radeon_driver_postcleanup,
86 .prerelease = radeon_driver_prerelease,
87 .pretakedown = radeon_driver_pretakedown,
88 .open_helper = radeon_driver_open_helper,
89 .vblank_wait = radeon_driver_vblank_wait,
90 .irq_preinstall = radeon_driver_irq_preinstall,
91 .irq_postinstall = radeon_driver_irq_postinstall,
92 .irq_uninstall = radeon_driver_irq_uninstall,
93 .irq_handler = radeon_driver_irq_handler,
94 .free_filp_priv = radeon_driver_free_filp_priv,
95 .reclaim_buffers = drm_core_reclaim_buffers,
96 .get_map_ofs = drm_core_get_map_ofs,
97 .get_reg_ofs = drm_core_get_reg_ofs,
100 .ioctls = radeon_ioctls,
101 .dma_ioctl = radeon_cp_buffers,
103 .owner = THIS_MODULE,
105 .release = drm_release,
109 .fasync = drm_fasync,
111 .compat_ioctl = radeon_compat_ioctl,
117 .id_table = pciidlist,
121 static int __init radeon_init(void)
123 driver.num_ioctls = radeon_max_ioctl;
124 return drm_init(&driver);
127 static void __exit radeon_exit(void)
132 module_init(radeon_init);
133 module_exit(radeon_exit);
135 MODULE_AUTHOR(DRIVER_AUTHOR);
136 MODULE_DESCRIPTION(DRIVER_DESC);
137 MODULE_LICENSE("GPL and additional rights");