diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-11-10 06:16:34 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-11-10 06:16:34 -0500 |
commit | 22eae947bf76e236ba972f2f11cfd1b083b736ad (patch) | |
tree | e18a2cdfef9ac0f606eb249df4924fef5e7daebd /drivers/char/drm/r128_drv.c | |
parent | 3b44f137b9a846c5452d9e6e1271b79b1dbcc942 (diff) |
drm: rename driver hooks more understandably
Rename the driver hooks in the DRM to something a little more understandable:
preinit -> load
postinit -> (removed)
presetup -> firstopen
postsetup -> (removed)
open_helper -> open
prerelease -> preclose
free_filp_priv -> postclose
pretakedown -> lastclose
postcleanup -> unload
release -> reclaim_buffers_locked
version -> (removed)
postinit and version were replaced with generic code in the Linux DRM (drivers
now set their version numbers and description in the driver structure, like on
BSD). postsetup wasn't used at all. Fixes the savage hooks for
initializing and tearing down mappings at the right times. Testing involved at
least starting X, running glxgears, killing glxgears, exiting X, and repeating.
Tested on: FreeBSD (g200, g400, r200, r128)
Linux (r200, savage4)
From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/r128_drv.c')
-rw-r--r-- | drivers/char/drm/r128_drv.c | 48 |
1 files changed, 14 insertions, 34 deletions
diff --git a/drivers/char/drm/r128_drv.c b/drivers/char/drm/r128_drv.c index 1661e7351402..e20450ae220e 100644 --- a/drivers/char/drm/r128_drv.c +++ b/drivers/char/drm/r128_drv.c | |||
@@ -37,31 +37,6 @@ | |||
37 | 37 | ||
38 | #include "drm_pciids.h" | 38 | #include "drm_pciids.h" |
39 | 39 | ||
40 | static int postinit(struct drm_device *dev, unsigned long flags) | ||
41 | { | ||
42 | DRM_INFO("Initialized %s %d.%d.%d %s on minor %d: %s\n", | ||
43 | DRIVER_NAME, | ||
44 | DRIVER_MAJOR, | ||
45 | DRIVER_MINOR, | ||
46 | DRIVER_PATCHLEVEL, | ||
47 | DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev) | ||
48 | ); | ||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | static int version(drm_version_t * version) | ||
53 | { | ||
54 | int len; | ||
55 | |||
56 | version->version_major = DRIVER_MAJOR; | ||
57 | version->version_minor = DRIVER_MINOR; | ||
58 | version->version_patchlevel = DRIVER_PATCHLEVEL; | ||
59 | DRM_COPY(version->name, DRIVER_NAME); | ||
60 | DRM_COPY(version->date, DRIVER_DATE); | ||
61 | DRM_COPY(version->desc, DRIVER_DESC); | ||
62 | return 0; | ||
63 | } | ||
64 | |||
65 | static struct pci_device_id pciidlist[] = { | 40 | static struct pci_device_id pciidlist[] = { |
66 | r128_PCI_IDS | 41 | r128_PCI_IDS |
67 | }; | 42 | }; |
@@ -72,8 +47,8 @@ static struct drm_driver driver = { | |||
72 | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | | 47 | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | |
73 | DRIVER_IRQ_VBL, | 48 | DRIVER_IRQ_VBL, |
74 | .dev_priv_size = sizeof(drm_r128_buf_priv_t), | 49 | .dev_priv_size = sizeof(drm_r128_buf_priv_t), |
75 | .prerelease = r128_driver_prerelease, | 50 | .preclose = r128_driver_preclose, |
76 | .pretakedown = r128_driver_pretakedown, | 51 | .lastclose = r128_driver_lastclose, |
77 | .vblank_wait = r128_driver_vblank_wait, | 52 | .vblank_wait = r128_driver_vblank_wait, |
78 | .irq_preinstall = r128_driver_irq_preinstall, | 53 | .irq_preinstall = r128_driver_irq_preinstall, |
79 | .irq_postinstall = r128_driver_irq_postinstall, | 54 | .irq_postinstall = r128_driver_irq_postinstall, |
@@ -82,8 +57,6 @@ static struct drm_driver driver = { | |||
82 | .reclaim_buffers = drm_core_reclaim_buffers, | 57 | .reclaim_buffers = drm_core_reclaim_buffers, |
83 | .get_map_ofs = drm_core_get_map_ofs, | 58 | .get_map_ofs = drm_core_get_map_ofs, |
84 | .get_reg_ofs = drm_core_get_reg_ofs, | 59 | .get_reg_ofs = drm_core_get_reg_ofs, |
85 | .postinit = postinit, | ||
86 | .version = version, | ||
87 | .ioctls = r128_ioctls, | 60 | .ioctls = r128_ioctls, |
88 | .dma_ioctl = r128_cce_buffers, | 61 | .dma_ioctl = r128_cce_buffers, |
89 | .fops = { | 62 | .fops = { |
@@ -97,12 +70,19 @@ static struct drm_driver driver = { | |||
97 | #ifdef CONFIG_COMPAT | 70 | #ifdef CONFIG_COMPAT |
98 | .compat_ioctl = r128_compat_ioctl, | 71 | .compat_ioctl = r128_compat_ioctl, |
99 | #endif | 72 | #endif |
100 | } | 73 | }, |
101 | , | 74 | |
102 | .pci_driver = { | 75 | .pci_driver = { |
103 | .name = DRIVER_NAME, | 76 | .name = DRIVER_NAME, |
104 | .id_table = pciidlist, | 77 | .id_table = pciidlist, |
105 | } | 78 | }, |
79 | |||
80 | .name = DRIVER_NAME, | ||
81 | .desc = DRIVER_DESC, | ||
82 | .date = DRIVER_DATE, | ||
83 | .major = DRIVER_MAJOR, | ||
84 | .minor = DRIVER_MINOR, | ||
85 | .patchlevel = DRIVER_PATCHLEVEL, | ||
106 | }; | 86 | }; |
107 | 87 | ||
108 | static int __init r128_init(void) | 88 | static int __init r128_init(void) |