summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/nv50_display.c6
-rw-r--r--shared-core/nouveau_irq.c9
-rw-r--r--shared-core/nouveau_reg.h2
3 files changed, 13 insertions, 4 deletions
diff --git a/linux-core/nv50_display.c b/linux-core/nv50_display.c
index eeaa0e68..6665a32f 100644
--- a/linux-core/nv50_display.c
+++ b/linux-core/nv50_display.c
@@ -125,6 +125,9 @@ static int nv50_display_init(struct nv50_display *display)
/* enable clock change interrupts. */
NV_WRITE(NV50_PDISPLAY_SUPERVISOR_INTR, NV_READ(NV50_PDISPLAY_SUPERVISOR_INTR) | 0x70);
+ /* enable hotplug interrupts */
+ NV_WRITE(NV50_PCONNECTOR_HOTPLUG_INTR, 0x7FFF7FFF);
+
display->init_done = true;
return 0;
@@ -171,6 +174,9 @@ static int nv50_display_disable(struct nv50_display *display)
/* disable clock change interrupts. */
NV_WRITE(NV50_PDISPLAY_SUPERVISOR_INTR, NV_READ(NV50_PDISPLAY_SUPERVISOR_INTR) & ~0x70);
+ /* disable hotplug interrupts */
+ NV_WRITE(NV50_PCONNECTOR_HOTPLUG_INTR, 0);
+
display->init_done = false;
return 0;
diff --git a/shared-core/nouveau_irq.c b/shared-core/nouveau_irq.c
index 4c46da8d..5b700915 100644
--- a/shared-core/nouveau_irq.c
+++ b/shared-core/nouveau_irq.c
@@ -41,6 +41,8 @@
#include "nv50_display.h"
#include "nv50_crtc.h"
#include "nv50_output.h"
+/* needed for hotplug irq */
+#include "nv50_kms_wrapper.h"
void
nouveau_irq_preinstall(struct drm_device *dev)
@@ -591,10 +593,13 @@ nouveau_nv50_i2c_irq_handler(struct drm_device *dev)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
- DRM_INFO("NV50_I2C_INTR - 0x%08X\n", NV_READ(NV50_I2C_CONTROLLER));
+ DRM_INFO("NV50_I2C_INTR - 0x%08X\n", NV_READ(NV50_PCONNECTOR_HOTPLUG_CTRL));
/* This seems to be the way to acknowledge an interrupt. */
- NV_WRITE(NV50_I2C_CONTROLLER, 0x7FFF7FFF);
+ NV_WRITE(NV50_PCONNECTOR_HOTPLUG_CTRL, 0x7FFF7FFF);
+
+ /* Do a "dumb" detect all */
+ nv50_kms_connector_detect_all(dev);
}
irqreturn_t
diff --git a/shared-core/nouveau_reg.h b/shared-core/nouveau_reg.h
index 6ed23e26..091c22c4 100644
--- a/shared-core/nouveau_reg.h
+++ b/shared-core/nouveau_reg.h
@@ -128,8 +128,6 @@
#define NV04_PTIMER_TIME_1 0x00009410
#define NV04_PTIMER_ALARM_0 0x00009420
-#define NV50_I2C_CONTROLLER 0x0000E054
-
#define NV04_PFB_CFG0 0x00100200
#define NV04_PFB_CFG1 0x00100204
#define NV40_PFB_020C 0x0010020C