summaryrefslogtreecommitdiff
path: root/linux-core/ffb_drv.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/ffb_drv.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/ffb_drv.c')
-rw-r--r--linux-core/ffb_drv.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/linux-core/ffb_drv.c b/linux-core/ffb_drv.c
index 8122e95e..7b028c86 100644
--- a/linux-core/ffb_drv.c
+++ b/linux-core/ffb_drv.c
@@ -238,7 +238,7 @@ unsigned long ffb_get_unmapped_area(struct file *filp,
/* This functions must be here since it references drm_numdevs)
* which drm_drv.h declares.
*/
-int ffb_presetup(drm_device_t *dev)
+static int ffb_driver_firstopen(drm_device_t *dev)
{
ffb_dev_priv_t *ffb_priv;
drm_device_t *temp_dev;
@@ -274,49 +274,20 @@ int ffb_presetup(drm_device_t *dev)
#include "drm_pciids.h"
-static int postinit( struct drm_device *dev, unsigned long flags )
-{
- DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
- DRIVER_NAME,
- DRIVER_MAJOR,
- DRIVER_MINOR,
- DRIVER_PATCHLEVEL,
- DRIVER_DATE,
- dev->minor,
- pci_pretty_name(pdev)
- );
- return 0;
-}
-
-static int version( drm_version_t *version )
-{
- int len;
-
- version->version_major = DRIVER_MAJOR;
- version->version_minor = DRIVER_MINOR;
- version->version_patchlevel = DRIVER_PATCHLEVEL;
- DRM_COPY( version->name, DRIVER_NAME );
- DRM_COPY( version->date, DRIVER_DATE );
- DRM_COPY( version->desc, DRIVER_DESC );
- return 0;
-}
-
static struct pci_device_id pciidlist[] = {
ffb_PCI_IDS
};
static struct drm_driver ffb_driver = {
- .release = ffb_driver_release,
- .presetup = ffb_driver_presetup,
- .pretakedown = ffb_driver_pretakedown,
- .postcleanup = ffb_driver_postcleanup,
+ .release = ffb_driver_reclaim_buffers_locked,
+ .firstopen = ffb_driver_firstopen,
+ .lastclose = ffb_driver_lastclose,
+ .unload = ffb_driver_unload,
.kernel_context_switch = ffb_context_switch,
.kernel_context_switch_unlock = ffb_driver_kernel_context_switch_unlock,
.get_map_ofs = ffb_driver_get_map_ofs,
.get_reg_ofs = ffb_driver_get_reg_ofs,
.reclaim_buffers = drm_core_reclaim_buffers,
- .postinit = postinit,
- .version = version,
fops = {
.owner = THIS_MODULE,
.open = drm_open,