aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/radeon_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/radeon_drv.c')
-rw-r--r--drivers/char/drm/radeon_drv.c69
1 files changed, 36 insertions, 33 deletions
diff --git a/drivers/char/drm/radeon_drv.c b/drivers/char/drm/radeon_drv.c
index e0682f64b400..ee49670d8162 100644
--- a/drivers/char/drm/radeon_drv.c
+++ b/drivers/char/drm/radeon_drv.c
@@ -29,7 +29,6 @@
29 * OTHER DEALINGS IN THE SOFTWARE. 29 * OTHER DEALINGS IN THE SOFTWARE.
30 */ 30 */
31 31
32
33#include <linux/config.h> 32#include <linux/config.h>
34#include "drmP.h" 33#include "drmP.h"
35#include "drm.h" 34#include "drm.h"
@@ -38,30 +37,33 @@
38 37
39#include "drm_pciids.h" 38#include "drm_pciids.h"
40 39
41static int postinit( struct drm_device *dev, unsigned long flags ) 40int radeon_no_wb;
41
42MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers\n");
43module_param_named(no_wb, radeon_no_wb, int, 0444);
44
45static int postinit(struct drm_device *dev, unsigned long flags)
42{ 46{
43 DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n", 47 DRM_INFO("Initialized %s %d.%d.%d %s on minor %d: %s\n",
44 DRIVER_NAME, 48 DRIVER_NAME,
45 DRIVER_MAJOR, 49 DRIVER_MAJOR,
46 DRIVER_MINOR, 50 DRIVER_MINOR,
47 DRIVER_PATCHLEVEL, 51 DRIVER_PATCHLEVEL,
48 DRIVER_DATE, 52 DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev)
49 dev->primary.minor, 53 );
50 pci_pretty_name(dev->pdev)
51 );
52 return 0; 54 return 0;
53} 55}
54 56
55static int version( drm_version_t *version ) 57static int version(drm_version_t * version)
56{ 58{
57 int len; 59 int len;
58 60
59 version->version_major = DRIVER_MAJOR; 61 version->version_major = DRIVER_MAJOR;
60 version->version_minor = DRIVER_MINOR; 62 version->version_minor = DRIVER_MINOR;
61 version->version_patchlevel = DRIVER_PATCHLEVEL; 63 version->version_patchlevel = DRIVER_PATCHLEVEL;
62 DRM_COPY( version->name, DRIVER_NAME ); 64 DRM_COPY(version->name, DRIVER_NAME);
63 DRM_COPY( version->date, DRIVER_DATE ); 65 DRM_COPY(version->date, DRIVER_DATE);
64 DRM_COPY( version->desc, DRIVER_DESC ); 66 DRM_COPY(version->desc, DRIVER_DESC);
65 return 0; 67 return 0;
66} 68}
67 69
@@ -69,11 +71,11 @@ static struct pci_device_id pciidlist[] = {
69 radeon_PCI_IDS 71 radeon_PCI_IDS
70}; 72};
71 73
72extern drm_ioctl_desc_t radeon_ioctls[];
73extern int radeon_max_ioctl;
74
75static struct drm_driver driver = { 74static struct drm_driver driver = {
76 .driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL, 75 .driver_features =
76 DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG |
77 DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED |
78 DRIVER_IRQ_VBL,
77 .dev_priv_size = sizeof(drm_radeon_buf_priv_t), 79 .dev_priv_size = sizeof(drm_radeon_buf_priv_t),
78 .preinit = radeon_driver_preinit, 80 .preinit = radeon_driver_preinit,
79 .presetup = radeon_presetup, 81 .presetup = radeon_presetup,
@@ -95,21 +97,22 @@ static struct drm_driver driver = {
95 .ioctls = radeon_ioctls, 97 .ioctls = radeon_ioctls,
96 .dma_ioctl = radeon_cp_buffers, 98 .dma_ioctl = radeon_cp_buffers,
97 .fops = { 99 .fops = {
98 .owner = THIS_MODULE, 100 .owner = THIS_MODULE,
99 .open = drm_open, 101 .open = drm_open,
100 .release = drm_release, 102 .release = drm_release,
101 .ioctl = drm_ioctl, 103 .ioctl = drm_ioctl,
102 .mmap = drm_mmap, 104 .mmap = drm_mmap,
103 .poll = drm_poll, 105 .poll = drm_poll,
104 .fasync = drm_fasync, 106 .fasync = drm_fasync,
105#ifdef CONFIG_COMPAT 107#ifdef CONFIG_COMPAT
106 .compat_ioctl = radeon_compat_ioctl, 108 .compat_ioctl = radeon_compat_ioctl,
107#endif 109#endif
108 }, 110 }
111 ,
109 .pci_driver = { 112 .pci_driver = {
110 .name = DRIVER_NAME, 113 .name = DRIVER_NAME,
111 .id_table = pciidlist, 114 .id_table = pciidlist,
112 } 115 }
113}; 116};
114 117
115static int __init radeon_init(void) 118static int __init radeon_init(void)
@@ -126,6 +129,6 @@ static void __exit radeon_exit(void)
126module_init(radeon_init); 129module_init(radeon_init);
127module_exit(radeon_exit); 130module_exit(radeon_exit);
128 131
129MODULE_AUTHOR( DRIVER_AUTHOR ); 132MODULE_AUTHOR(DRIVER_AUTHOR);
130MODULE_DESCRIPTION( DRIVER_DESC ); 133MODULE_DESCRIPTION(DRIVER_DESC);
131MODULE_LICENSE("GPL and additional rights"); 134MODULE_LICENSE("GPL and additional rights");