aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Castet <castet.matthieu@free.fr>2007-08-07 23:09:44 +0200
committerMatthieu Castet <castet.matthieu@free.fr>2007-08-07 23:09:44 +0200
commita4759b85139dd8d81de25e170777309b770f5316 (patch)
tree910b989e26a89d487811a2866316ed6c7a1d1a6f
parentd749cc9ae8c50157a1588369222a591410002c26 (diff)
nouveau : fix enable irq (in the previous code all irq were masked by engine
init after irq_postinstall)
-rw-r--r--shared-core/nouveau_irq.c3
-rw-r--r--shared-core/nouveau_state.c9
2 files changed, 9 insertions, 3 deletions
diff --git a/shared-core/nouveau_irq.c b/shared-core/nouveau_irq.c
index 2ee77d83..84a37040 100644
--- a/shared-core/nouveau_irq.c
+++ b/shared-core/nouveau_irq.c
@@ -39,6 +39,9 @@
void nouveau_irq_preinstall(struct drm_device *dev)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
+ /* TODO this should be removed as this stuff is done in
+ * engine.*init
+ */
DRM_DEBUG("IRQ: preinst\n");
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index a23d6001..e80e77a5 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -296,9 +296,6 @@ nouveau_card_init(struct drm_device *dev)
engine = &dev_priv->Engine;
dev_priv->init_state = NOUVEAU_CARD_INIT_FAILED;
- ret = drm_irq_install(dev);
- if (ret) return ret;
-
INIT_LIST_HEAD(&dev_priv->gpuobj_list);
/* Initialise instance memory, must happen before mem_init so we
@@ -337,6 +334,12 @@ nouveau_card_init(struct drm_device *dev)
ret = engine->fifo.init(dev);
if (ret) return ret;
+ /* this call irq_preinstall, register irq handler and
+ * call irq_postinstall
+ */
+ ret = drm_irq_install(dev);
+ if (ret) return ret;
+
/* what about PVIDEO/PCRTC/PRAMDAC etc? */
ret = nouveau_dma_channel_init(dev);