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/drmP.h | |
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/drmP.h')
-rw-r--r-- | drivers/char/drm/drmP.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 3dc3c9d79ae4..d842cce11448 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h | |||
@@ -544,16 +544,14 @@ typedef struct ati_pcigart_info { | |||
544 | struct drm_device; | 544 | struct drm_device; |
545 | 545 | ||
546 | struct drm_driver { | 546 | struct drm_driver { |
547 | int (*preinit) (struct drm_device *, unsigned long flags); | 547 | int (*load) (struct drm_device *, unsigned long flags); |
548 | void (*prerelease) (struct drm_device *, struct file * filp); | 548 | int (*firstopen) (struct drm_device *); |
549 | void (*pretakedown) (struct drm_device *); | 549 | int (*open) (struct drm_device *, drm_file_t *); |
550 | int (*postcleanup) (struct drm_device *); | 550 | void (*preclose) (struct drm_device *, struct file * filp); |
551 | int (*presetup) (struct drm_device *); | 551 | void (*postclose) (struct drm_device *, drm_file_t *); |
552 | int (*postsetup) (struct drm_device *); | 552 | void (*lastclose) (struct drm_device *); |
553 | int (*unload) (struct drm_device *); | ||
553 | int (*dma_ioctl) (DRM_IOCTL_ARGS); | 554 | int (*dma_ioctl) (DRM_IOCTL_ARGS); |
554 | int (*open_helper) (struct drm_device *, drm_file_t *); | ||
555 | void (*free_filp_priv) (struct drm_device *, drm_file_t *); | ||
556 | void (*release) (struct drm_device *, struct file * filp); | ||
557 | void (*dma_ready) (struct drm_device *); | 555 | void (*dma_ready) (struct drm_device *); |
558 | int (*dma_quiescent) (struct drm_device *); | 556 | int (*dma_quiescent) (struct drm_device *); |
559 | int (*context_ctor) (struct drm_device * dev, int context); | 557 | int (*context_ctor) (struct drm_device * dev, int context); |
@@ -579,16 +577,25 @@ struct drm_driver { | |||
579 | 577 | ||
580 | /* these have to be filled in */ | 578 | /* these have to be filled in */ |
581 | 579 | ||
582 | int (*postinit) (struct drm_device *, unsigned long flags); | 580 | irqreturn_t(*irq_handler) (DRM_IRQ_ARGS); |
583 | irqreturn_t(*irq_handler) (DRM_IRQ_ARGS); | ||
584 | void (*irq_preinstall) (struct drm_device * dev); | 581 | void (*irq_preinstall) (struct drm_device * dev); |
585 | void (*irq_postinstall) (struct drm_device * dev); | 582 | void (*irq_postinstall) (struct drm_device * dev); |
586 | void (*irq_uninstall) (struct drm_device * dev); | 583 | void (*irq_uninstall) (struct drm_device * dev); |
587 | void (*reclaim_buffers) (struct drm_device * dev, struct file * filp); | 584 | void (*reclaim_buffers) (struct drm_device * dev, struct file * filp); |
585 | void (*reclaim_buffers_locked) (struct drm_device *drv, | ||
586 | struct file *filp); | ||
588 | unsigned long (*get_map_ofs) (drm_map_t * map); | 587 | unsigned long (*get_map_ofs) (drm_map_t * map); |
589 | unsigned long (*get_reg_ofs) (struct drm_device * dev); | 588 | unsigned long (*get_reg_ofs) (struct drm_device * dev); |
590 | void (*set_version) (struct drm_device * dev, drm_set_version_t * sv); | 589 | void (*set_version) (struct drm_device * dev, drm_set_version_t * sv); |
591 | int (*version) (drm_version_t * version); | 590 | int (*version) (drm_version_t * version); |
591 | |||
592 | int major; | ||
593 | int minor; | ||
594 | int patchlevel; | ||
595 | char *name; | ||
596 | char *desc; | ||
597 | char *date; | ||
598 | |||
592 | u32 driver_features; | 599 | u32 driver_features; |
593 | int dev_priv_size; | 600 | int dev_priv_size; |
594 | drm_ioctl_desc_t *ioctls; | 601 | drm_ioctl_desc_t *ioctls; |
@@ -772,7 +779,7 @@ extern int drm_ioctl(struct inode *inode, struct file *filp, | |||
772 | unsigned int cmd, unsigned long arg); | 779 | unsigned int cmd, unsigned long arg); |
773 | extern long drm_compat_ioctl(struct file *filp, | 780 | extern long drm_compat_ioctl(struct file *filp, |
774 | unsigned int cmd, unsigned long arg); | 781 | unsigned int cmd, unsigned long arg); |
775 | extern int drm_takedown(drm_device_t * dev); | 782 | extern int drm_lastclose(drm_device_t *dev); |
776 | 783 | ||
777 | /* Device support (drm_fops.h) */ | 784 | /* Device support (drm_fops.h) */ |
778 | extern int drm_open(struct inode *inode, struct file *filp); | 785 | extern int drm_open(struct inode *inode, struct file *filp); |