aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/radeon_cp.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2005-11-10 06:16:34 -0500
committerDave Airlie <airlied@linux.ie>2005-11-10 06:16:34 -0500
commit22eae947bf76e236ba972f2f11cfd1b083b736ad (patch)
treee18a2cdfef9ac0f606eb249df4924fef5e7daebd /drivers/char/drm/radeon_cp.c
parent3b44f137b9a846c5452d9e6e1271b79b1dbcc942 (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/radeon_cp.c')
-rw-r--r--drivers/char/drm/radeon_cp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c
index 03839ea31092..dc3a15a1819a 100644
--- a/drivers/char/drm/radeon_cp.c
+++ b/drivers/char/drm/radeon_cp.c
@@ -2103,7 +2103,7 @@ int radeon_cp_buffers(DRM_IOCTL_ARGS)
2103 return ret; 2103 return ret;
2104} 2104}
2105 2105
2106int radeon_driver_preinit(struct drm_device *dev, unsigned long flags) 2106int radeon_driver_load(struct drm_device *dev, unsigned long flags)
2107{ 2107{
2108 drm_radeon_private_t *dev_priv; 2108 drm_radeon_private_t *dev_priv;
2109 int ret = 0; 2109 int ret = 0;
@@ -2140,7 +2140,10 @@ int radeon_driver_preinit(struct drm_device *dev, unsigned long flags)
2140 return ret; 2140 return ret;
2141} 2141}
2142 2142
2143int radeon_presetup(struct drm_device *dev) 2143/* Create mappings for registers and framebuffer so userland doesn't necessarily
2144 * have to find them.
2145 */
2146int radeon_driver_firstopen(struct drm_device *dev)
2144{ 2147{
2145 int ret; 2148 int ret;
2146 drm_local_map_t *map; 2149 drm_local_map_t *map;
@@ -2161,7 +2164,7 @@ int radeon_presetup(struct drm_device *dev)
2161 return 0; 2164 return 0;
2162} 2165}
2163 2166
2164int radeon_driver_postcleanup(struct drm_device *dev) 2167int radeon_driver_unload(struct drm_device *dev)
2165{ 2168{
2166 drm_radeon_private_t *dev_priv = dev->dev_private; 2169 drm_radeon_private_t *dev_priv = dev->dev_private;
2167 2170