diff options
author | Ian Romanick <idr@us.ibm.com> | 2005-05-21 02:27:51 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2005-05-21 02:27:51 +0000 |
commit | a686be5bc8c5d8a260513b680f322e3b790aadf7 (patch) | |
tree | be71a5caab8c261c913edf8f2423528ca99befde /shared-core/mga_drv.h | |
parent | fced784140c7b347ea9d3091a8bc0c06c1a760f7 (diff) |
Change the MGA initialization and cleanup a bit. The dev_private structure
is now allocated (and partially filled in) by the new
mga_driver_preinit function.
This allows the driver to detect the type of card (i.e., G200 class vs.
G400 class) on its own. The chipset value passed to mga_dma_init is now
ignored. This same technique is used by the radeon DRM.
As a result of this, mga_driver_pretakedown was converted to
mga_driver_postcleanup. This routine gets called in some other places
than might be expected, and it sets the dev_private pointer to NULL.
That little gem took over an hour to track down. :(
Diffstat (limited to 'shared-core/mga_drv.h')
-rw-r--r-- | shared-core/mga_drv.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shared-core/mga_drv.h b/shared-core/mga_drv.h index f1c3cf3e..54373cc7 100644 --- a/shared-core/mga_drv.h +++ b/shared-core/mga_drv.h @@ -113,11 +113,12 @@ typedef struct drm_mga_private { } drm_mga_private_t; /* mga_dma.c */ +extern int mga_driver_preinit(drm_device_t * dev, unsigned long flags); extern int mga_dma_init(DRM_IOCTL_ARGS); extern int mga_dma_flush(DRM_IOCTL_ARGS); extern int mga_dma_reset(DRM_IOCTL_ARGS); extern int mga_dma_buffers(DRM_IOCTL_ARGS); -extern void mga_driver_pretakedown(drm_device_t * dev); +extern int mga_driver_postcleanup(drm_device_t * dev); extern int mga_driver_dma_quiescent(drm_device_t * dev); extern int mga_do_wait_for_idle(drm_mga_private_t * dev_priv); |