diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-03-26 19:43:48 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-03-26 20:59:37 +1000 |
commit | 674cefd4fe4b537a20a10edcb4ec5df55facca8e (patch) | |
tree | a4df293b2fd8b5224821faa537f2631342f7407c /shared-core/nouveau_irq.c | |
parent | 5ad43f46759ff1eb473c9101e7de0d46a4ed8177 (diff) |
nouveau: move card initialisation into the drm
The PGRAPH init for the various cards will need cleaning up at some point,
a lot of the values written there are per-context state left over from the
all the hardcoding done in the ddx.
It's possible some cards get broken by this commit, let me know.
Tested on: NV5, NV18, NV28, NV35, NV40, NV4E
Diffstat (limited to 'shared-core/nouveau_irq.c')
-rw-r--r-- | shared-core/nouveau_irq.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/shared-core/nouveau_irq.c b/shared-core/nouveau_irq.c index 32b33070..b7c1d532 100644 --- a/shared-core/nouveau_irq.c +++ b/shared-core/nouveau_irq.c @@ -42,6 +42,15 @@ void nouveau_irq_preinstall(drm_device_t *dev) DRM_DEBUG("IRQ: preinst\n"); + if (!dev_priv) { + DRM_ERROR("AIII, no dev_priv\n"); + return; + } + if (!dev_priv->mmio) { + DRM_ERROR("AIII, no dev_priv->mmio\n"); + return; + } + /* Disable/Clear PFIFO interrupts */ NV_WRITE(NV03_PFIFO_INTR_EN_0, 0); NV_WRITE(NV03_PFIFO_INTR_0, 0xFFFFFFFF); @@ -66,6 +75,15 @@ void nouveau_irq_postinstall(drm_device_t *dev) { drm_nouveau_private_t *dev_priv = dev->dev_private; + if (!dev_priv) { + DRM_ERROR("AIII, no dev_priv\n"); + return; + } + if (!dev_priv->mmio) { + DRM_ERROR("AIII, no dev_priv->mmio\n"); + return; + } + DRM_DEBUG("IRQ: postinst\n"); /* Enable PFIFO error reporting */ @@ -113,6 +131,15 @@ void nouveau_irq_uninstall(drm_device_t *dev) { drm_nouveau_private_t *dev_priv = dev->dev_private; + if (!dev_priv) { + DRM_ERROR("AIII, no dev_priv\n"); + return; + } + if (!dev_priv->mmio) { + DRM_ERROR("AIII, no dev_priv->mmio\n"); + return; + } + DRM_DEBUG("IRQ: uninst\n"); /* Disable PFIFO interrupts */ |