summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_irq.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-03-30 12:56:08 -0700
committerEric Anholt <eric@anholt.net>2007-03-30 12:56:08 -0700
commitcd4c82176f3f429e722ca3fac2abf231af479780 (patch)
tree6c658f8ea8cbfcdbb5d3c8518a5f13ca90b465e3 /shared-core/nouveau_irq.c
parent5d69640a6ad15522fa37c3b232eb34acef955892 (diff)
parent3f70518f0bcf36a1e2c82db962324dbdee106f67 (diff)
Merge branch 'origin'
Diffstat (limited to 'shared-core/nouveau_irq.c')
-rw-r--r--shared-core/nouveau_irq.c27
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 */