diff options
Diffstat (limited to 'drivers/char/drm/radeon_drv.c')
-rw-r--r-- | drivers/char/drm/radeon_drv.c | 62 |
1 files changed, 27 insertions, 35 deletions
diff --git a/drivers/char/drm/radeon_drv.c b/drivers/char/drm/radeon_drv.c index ee49670d8162..b04ed1b562b9 100644 --- a/drivers/char/drm/radeon_drv.c +++ b/drivers/char/drm/radeon_drv.c | |||
@@ -42,29 +42,15 @@ int radeon_no_wb; | |||
42 | MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers\n"); | 42 | MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers\n"); |
43 | module_param_named(no_wb, radeon_no_wb, int, 0444); | 43 | module_param_named(no_wb, radeon_no_wb, int, 0444); |
44 | 44 | ||
45 | static int postinit(struct drm_device *dev, unsigned long flags) | 45 | static int dri_library_name(struct drm_device *dev, char *buf) |
46 | { | 46 | { |
47 | DRM_INFO("Initialized %s %d.%d.%d %s on minor %d: %s\n", | 47 | drm_radeon_private_t *dev_priv = dev->dev_private; |
48 | DRIVER_NAME, | 48 | int family = dev_priv->flags & CHIP_FAMILY_MASK; |
49 | DRIVER_MAJOR, | ||
50 | DRIVER_MINOR, | ||
51 | DRIVER_PATCHLEVEL, | ||
52 | DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev) | ||
53 | ); | ||
54 | return 0; | ||
55 | } | ||
56 | |||
57 | static int version(drm_version_t * version) | ||
58 | { | ||
59 | int len; | ||
60 | 49 | ||
61 | version->version_major = DRIVER_MAJOR; | 50 | return snprintf(buf, PAGE_SIZE, "%s\n", |
62 | version->version_minor = DRIVER_MINOR; | 51 | (family < CHIP_R200) ? "radeon" : |
63 | version->version_patchlevel = DRIVER_PATCHLEVEL; | 52 | ((family < CHIP_R300) ? "r200" : |
64 | DRM_COPY(version->name, DRIVER_NAME); | 53 | "r300")); |
65 | DRM_COPY(version->date, DRIVER_DATE); | ||
66 | DRM_COPY(version->desc, DRIVER_DESC); | ||
67 | return 0; | ||
68 | } | 54 | } |
69 | 55 | ||
70 | static struct pci_device_id pciidlist[] = { | 56 | static struct pci_device_id pciidlist[] = { |
@@ -77,23 +63,22 @@ static struct drm_driver driver = { | |||
77 | DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | | 63 | DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | |
78 | DRIVER_IRQ_VBL, | 64 | DRIVER_IRQ_VBL, |
79 | .dev_priv_size = sizeof(drm_radeon_buf_priv_t), | 65 | .dev_priv_size = sizeof(drm_radeon_buf_priv_t), |
80 | .preinit = radeon_driver_preinit, | 66 | .load = radeon_driver_load, |
81 | .presetup = radeon_presetup, | 67 | .firstopen = radeon_driver_firstopen, |
82 | .postcleanup = radeon_driver_postcleanup, | 68 | .open = radeon_driver_open, |
83 | .prerelease = radeon_driver_prerelease, | 69 | .preclose = radeon_driver_preclose, |
84 | .pretakedown = radeon_driver_pretakedown, | 70 | .postclose = radeon_driver_postclose, |
85 | .open_helper = radeon_driver_open_helper, | 71 | .lastclose = radeon_driver_lastclose, |
72 | .unload = radeon_driver_unload, | ||
86 | .vblank_wait = radeon_driver_vblank_wait, | 73 | .vblank_wait = radeon_driver_vblank_wait, |
74 | .dri_library_name = dri_library_name, | ||
87 | .irq_preinstall = radeon_driver_irq_preinstall, | 75 | .irq_preinstall = radeon_driver_irq_preinstall, |
88 | .irq_postinstall = radeon_driver_irq_postinstall, | 76 | .irq_postinstall = radeon_driver_irq_postinstall, |
89 | .irq_uninstall = radeon_driver_irq_uninstall, | 77 | .irq_uninstall = radeon_driver_irq_uninstall, |
90 | .irq_handler = radeon_driver_irq_handler, | 78 | .irq_handler = radeon_driver_irq_handler, |
91 | .free_filp_priv = radeon_driver_free_filp_priv, | ||
92 | .reclaim_buffers = drm_core_reclaim_buffers, | 79 | .reclaim_buffers = drm_core_reclaim_buffers, |
93 | .get_map_ofs = drm_core_get_map_ofs, | 80 | .get_map_ofs = drm_core_get_map_ofs, |
94 | .get_reg_ofs = drm_core_get_reg_ofs, | 81 | .get_reg_ofs = drm_core_get_reg_ofs, |
95 | .postinit = postinit, | ||
96 | .version = version, | ||
97 | .ioctls = radeon_ioctls, | 82 | .ioctls = radeon_ioctls, |
98 | .dma_ioctl = radeon_cp_buffers, | 83 | .dma_ioctl = radeon_cp_buffers, |
99 | .fops = { | 84 | .fops = { |
@@ -107,12 +92,19 @@ static struct drm_driver driver = { | |||
107 | #ifdef CONFIG_COMPAT | 92 | #ifdef CONFIG_COMPAT |
108 | .compat_ioctl = radeon_compat_ioctl, | 93 | .compat_ioctl = radeon_compat_ioctl, |
109 | #endif | 94 | #endif |
110 | } | 95 | }, |
111 | , | 96 | |
112 | .pci_driver = { | 97 | .pci_driver = { |
113 | .name = DRIVER_NAME, | 98 | .name = DRIVER_NAME, |
114 | .id_table = pciidlist, | 99 | .id_table = pciidlist, |
115 | } | 100 | }, |
101 | |||
102 | .name = DRIVER_NAME, | ||
103 | .desc = DRIVER_DESC, | ||
104 | .date = DRIVER_DATE, | ||
105 | .major = DRIVER_MAJOR, | ||
106 | .minor = DRIVER_MINOR, | ||
107 | .patchlevel = DRIVER_PATCHLEVEL, | ||
116 | }; | 108 | }; |
117 | 109 | ||
118 | static int __init radeon_init(void) | 110 | static int __init radeon_init(void) |