summaryrefslogtreecommitdiff
path: root/linux-core/drm_stub.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-08-05 03:50:23 +0000
committerEric Anholt <anholt@freebsd.org>2005-08-05 03:50:23 +0000
commitc789ea1521ac9e935f2a1c6c043619d89bae9c16 (patch)
treebb8bcecf000f78f71db8dc70484d7ea82cc0b260 /linux-core/drm_stub.c
parent143622a987745ca2084f7a188e9993ffd5f28fe3 (diff)
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)
Diffstat (limited to 'linux-core/drm_stub.c')
-rw-r--r--linux-core/drm_stub.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index 5496ed89..52b5e9c6 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -94,8 +94,8 @@ static int fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
dev->driver = driver;
- if (dev->driver->preinit)
- if ((retcode = dev->driver->preinit(dev, ent->driver_data)))
+ if (dev->driver->load)
+ if ((retcode = dev->driver->load(dev, ent->driver_data)))
goto error_out_unreg;
if (drm_core_has_AGP(dev)) {
@@ -126,7 +126,7 @@ static int fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
return 0;
error_out_unreg:
- drm_takedown(dev);
+ drm_lastclose(dev);
return retcode;
}
@@ -222,15 +222,12 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
if ((ret = drm_get_head(dev, &dev->primary)))
goto err_g1;
- /* postinit is a required function to display the signon banner */
- /* drivers add secondary heads here if needed */
- if ((ret = dev->driver->postinit(dev, ent->driver_data)))
- goto err_g2;
+ DRM_INFO("Initialized %s %d.%d.%d %s on minor %d: %s\n",
+ driver->name, driver->major, driver->minor, driver->patchlevel,
+ driver->date, dev->primary.minor, pci_pretty_name(dev->pdev));
return 0;
-err_g2:
- drm_put_head(&dev->primary);
err_g1:
if (!drm_fb_loaded) {
pci_set_drvdata(pdev, NULL);