summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-05-21 02:27:51 +0000
committerIan Romanick <idr@us.ibm.com>2005-05-21 02:27:51 +0000
commita686be5bc8c5d8a260513b680f322e3b790aadf7 (patch)
treebe71a5caab8c261c913edf8f2423528ca99befde /bsd-core
parentfced784140c7b347ea9d3091a8bc0c06c1a760f7 (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 'bsd-core')
-rw-r--r--bsd-core/mga_drv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bsd-core/mga_drv.c b/bsd-core/mga_drv.c
index 1dd4c81b..e088ceca 100644
--- a/bsd-core/mga_drv.c
+++ b/bsd-core/mga_drv.c
@@ -52,7 +52,8 @@ static void mga_configure(drm_device_t *dev)
{
dev->dev_priv_size = sizeof(drm_mga_buf_priv_t);
/* XXX dev->prerelease = mga_driver_prerelease; */
- dev->pretakedown = mga_driver_pretakedown;
+ dev->preinit = mga_driver_preinit;
+ dev->postcleanup = mga_driver_postcleanup;
dev->vblank_wait = mga_driver_vblank_wait;
dev->irq_preinstall = mga_driver_irq_preinstall;
dev->irq_postinstall = mga_driver_irq_postinstall;