* [PATCH] drm/i915: enable sdvo interrupt on pch platforms
@ 2012-12-09 21:28 Daniel Vetter
2012-12-09 21:30 ` Daniel Vetter
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Daniel Vetter @ 2012-12-09 21:28 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
Noticed while strolling through docs. Might make a few dual-link dvi
users happy(ier).
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_reg.h | 2 +-
drivers/gpu/drm/i915/intel_display.c | 4 +++-
drivers/gpu/drm/i915/intel_sdvo.c | 10 +++++++++-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index f2a5ea6..a981ff5 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1673,7 +1673,7 @@
#define SDVO_ENABLE (1 << 31)
#define SDVO_PIPE_B_SELECT (1 << 30)
#define SDVO_STALL_SELECT (1 << 29)
-#define SDVO_INTERRUPT_ENABLE (1 << 26)
+#define SDVO_INTERRUPT_ENABLE_PCH (1 << 23)
/**
* 915G/GM SDVO pixel multiplier.
*
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e4e6c53..3256a34 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2384,6 +2384,9 @@ static void ironlake_fdi_link_train(struct drm_crtc *crtc)
assert_pipe_enabled(dev_priv, pipe);
assert_plane_enabled(dev_priv, plane);
+ /* Ironlake workaround, control phase pointer manually */
+ I915_WRITE(FDI_RX_CHICKEN(pipe), FDI_RX_PHASE_SYNC_POINTER_OVR);
+
/* Train 1: umask FDI RX Interrupt symbol_lock and bit_lock bit
for train result */
reg = FDI_RX_IMR(pipe);
@@ -2413,7 +2416,6 @@ static void ironlake_fdi_link_train(struct drm_crtc *crtc)
udelay(150);
/* Ironlake workaround, enable clock pointer after FDI enable*/
- I915_WRITE(FDI_RX_CHICKEN(pipe), FDI_RX_PHASE_SYNC_POINTER_OVR);
I915_WRITE(FDI_RX_CHICKEN(pipe), FDI_RX_PHASE_SYNC_POINTER_OVR |
FDI_RX_PHASE_SYNC_POINTER_EN);
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index c275bf0..a9b34f0 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1085,6 +1085,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
if (!mode)
return;
+ /* Preserve the PCH interrupt enable bit. */
+ sdvox = I915_READ(intel_sdvo->sdvo_reg) & SDVO_INTERRUPT_ENABLE_PCH;
+
/* First, set the input mapping for the first input to our controlled
* output. This is only correct if we're a single-input device, in
* which case the first input is the output from the appropriate SDVO
@@ -2775,9 +2778,14 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
/* Only enable the hotplug irq if we need it, to work around noisy
* hotplug lines.
*/
- if (intel_sdvo->hotplug_active)
+ if (intel_sdvo->hotplug_active) {
dev_priv->hotplug_supported_mask |= hotplug_mask;
+ if (HAS_PCH_SPLIT(dev))
+ intel_sdvo_write_sdvox(intel_sdvo,
+ SDVO_INTERRUPT_ENABLE_PCH);
+ }
+
intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg);
/* Set the input timing to the screen. Assume always input 0. */
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/i915: enable sdvo interrupt on pch platforms
2012-12-09 21:28 [PATCH] drm/i915: enable sdvo interrupt on pch platforms Daniel Vetter
@ 2012-12-09 21:30 ` Daniel Vetter
2012-12-09 21:35 ` Daniel Vetter
2012-12-10 0:37 ` Daniel Vetter
2 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2012-12-09 21:30 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
Noticed while strolling through docs. Might make a few dual-link dvi
users happy(ier).
v2: Remove the unrelated debug hacks in intel_display.c
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_reg.h | 2 +-
drivers/gpu/drm/i915/intel_sdvo.c | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index f2a5ea6..a981ff5 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1673,7 +1673,7 @@
#define SDVO_ENABLE (1 << 31)
#define SDVO_PIPE_B_SELECT (1 << 30)
#define SDVO_STALL_SELECT (1 << 29)
-#define SDVO_INTERRUPT_ENABLE (1 << 26)
+#define SDVO_INTERRUPT_ENABLE_PCH (1 << 23)
/**
* 915G/GM SDVO pixel multiplier.
*
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index c275bf0..a9b34f0 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1085,6 +1085,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
if (!mode)
return;
+ /* Preserve the PCH interrupt enable bit. */
+ sdvox = I915_READ(intel_sdvo->sdvo_reg) & SDVO_INTERRUPT_ENABLE_PCH;
+
/* First, set the input mapping for the first input to our controlled
* output. This is only correct if we're a single-input device, in
* which case the first input is the output from the appropriate SDVO
@@ -2775,9 +2778,14 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
/* Only enable the hotplug irq if we need it, to work around noisy
* hotplug lines.
*/
- if (intel_sdvo->hotplug_active)
+ if (intel_sdvo->hotplug_active) {
dev_priv->hotplug_supported_mask |= hotplug_mask;
+ if (HAS_PCH_SPLIT(dev))
+ intel_sdvo_write_sdvox(intel_sdvo,
+ SDVO_INTERRUPT_ENABLE_PCH);
+ }
+
intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg);
/* Set the input timing to the screen. Assume always input 0. */
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/i915: enable sdvo interrupt on pch platforms
2012-12-09 21:28 [PATCH] drm/i915: enable sdvo interrupt on pch platforms Daniel Vetter
2012-12-09 21:30 ` Daniel Vetter
@ 2012-12-09 21:35 ` Daniel Vetter
2012-12-10 0:37 ` Daniel Vetter
2 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2012-12-09 21:35 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
Noticed while strolling through docs. Might make a few dual-link dvi
users happy(ier).
v2: Remove the unrelated debug hacks in intel_display.c
v3: Preserve register contexts to not upset fastboot or the modeset
hw state checker.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_reg.h | 2 +-
drivers/gpu/drm/i915/intel_sdvo.c | 14 +++++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index f2a5ea6..a981ff5 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1673,7 +1673,7 @@
#define SDVO_ENABLE (1 << 31)
#define SDVO_PIPE_B_SELECT (1 << 30)
#define SDVO_STALL_SELECT (1 << 29)
-#define SDVO_INTERRUPT_ENABLE (1 << 26)
+#define SDVO_INTERRUPT_ENABLE_PCH (1 << 23)
/**
* 915G/GM SDVO pixel multiplier.
*
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index c275bf0..2c1543b 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1085,6 +1085,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
if (!mode)
return;
+ /* Preserve the PCH interrupt enable bit. */
+ sdvox = I915_READ(intel_sdvo->sdvo_reg) & SDVO_INTERRUPT_ENABLE_PCH;
+
/* First, set the input mapping for the first input to our controlled
* output. This is only correct if we're a single-input device, in
* which case the first input is the output from the appropriate SDVO
@@ -2775,9 +2778,18 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
/* Only enable the hotplug irq if we need it, to work around noisy
* hotplug lines.
*/
- if (intel_sdvo->hotplug_active)
+ if (intel_sdvo->hotplug_active) {
dev_priv->hotplug_supported_mask |= hotplug_mask;
+ if (HAS_PCH_SPLIT(dev)) {
+ u32 temp;
+
+ temp = I915_READ(intel_sdvo->sdvo_reg);
+ temp &= SDVO_INTERRUPT_ENABLE_PCH;
+ intel_sdvo_write_sdvox(intel_sdvo, temp);
+ }
+ }
+
intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg);
/* Set the input timing to the screen. Assume always input 0. */
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/i915: enable sdvo interrupt on pch platforms
2012-12-09 21:28 [PATCH] drm/i915: enable sdvo interrupt on pch platforms Daniel Vetter
2012-12-09 21:30 ` Daniel Vetter
2012-12-09 21:35 ` Daniel Vetter
@ 2012-12-10 0:37 ` Daniel Vetter
2012-12-10 21:20 ` Jesse Barnes
2 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2012-12-10 0:37 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
Noticed while strolling through docs. Might make a few dual-link dvi
users happy(ier).
v2: Remove the unrelated debug hacks in intel_display.c
v3: Preserve register contexts to not upset fastboot or the modeset
hw state checker.
v4: Actually enable it in the irq handler/postinstall functions, too
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_irq.c | 3 +++
drivers/gpu/drm/i915/i915_reg.h | 6 ++++--
drivers/gpu/drm/i915/intel_sdvo.c | 14 +++++++++++++-
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index d02e022..e9b9460 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1910,6 +1910,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
SDE_PORTB_HOTPLUG_CPT |
SDE_PORTC_HOTPLUG_CPT |
SDE_PORTD_HOTPLUG_CPT |
+ SDE_SDVOB_HOTPLUG_CPT |
SDE_GMBUS_CPT |
SDE_AUX_MASK_CPT);
} else {
@@ -1917,6 +1918,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
SDE_PORTB_HOTPLUG |
SDE_PORTC_HOTPLUG |
SDE_PORTD_HOTPLUG |
+ SDE_SDVOB_HOTPLUG |
SDE_GMBUS |
SDE_AUX_MASK);
}
@@ -1979,6 +1981,7 @@ static int ivybridge_irq_postinstall(struct drm_device *dev)
SDE_PORTB_HOTPLUG_CPT |
SDE_PORTC_HOTPLUG_CPT |
SDE_PORTD_HOTPLUG_CPT |
+ SDE_SDVOB_HOTPLUG_CPT |
SDE_GMBUS_CPT |
SDE_AUX_MASK_CPT);
dev_priv->pch_irq_mask = ~hotplug_mask;
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index f2a5ea6..d8162f8 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1673,7 +1673,7 @@
#define SDVO_ENABLE (1 << 31)
#define SDVO_PIPE_B_SELECT (1 << 30)
#define SDVO_STALL_SELECT (1 << 29)
-#define SDVO_INTERRUPT_ENABLE (1 << 26)
+#define SDVO_INTERRUPT_ENABLE_PCH (1 << 23)
/**
* 915G/GM SDVO pixel multiplier.
*
@@ -3498,7 +3498,7 @@
#define SDE_PORTC_HOTPLUG (1 << 9)
#define SDE_PORTB_HOTPLUG (1 << 8)
#define SDE_SDVOB_HOTPLUG (1 << 6)
-#define SDE_HOTPLUG_MASK (0xf << 8)
+#define SDE_HOTPLUG_MASK ((0xf << 8) | SDE_SDVOB_HOTPLUG)
#define SDE_TRANSB_CRC_DONE (1 << 5)
#define SDE_TRANSB_CRC_ERR (1 << 4)
#define SDE_TRANSB_FIFO_UNDER (1 << 3)
@@ -3521,7 +3521,9 @@
#define SDE_PORTC_HOTPLUG_CPT (1 << 22)
#define SDE_PORTB_HOTPLUG_CPT (1 << 21)
#define SDE_CRT_HOTPLUG_CPT (1 << 19)
+#define SDE_SDVOB_HOTPLUG_CPT (1 << 18)
#define SDE_HOTPLUG_MASK_CPT (SDE_CRT_HOTPLUG_CPT | \
+ SDE_SDVOB_HOTPLUG_CPT | \
SDE_PORTD_HOTPLUG_CPT | \
SDE_PORTC_HOTPLUG_CPT | \
SDE_PORTB_HOTPLUG_CPT)
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index c275bf0..2c1543b 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1085,6 +1085,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
if (!mode)
return;
+ /* Preserve the PCH interrupt enable bit. */
+ sdvox = I915_READ(intel_sdvo->sdvo_reg) & SDVO_INTERRUPT_ENABLE_PCH;
+
/* First, set the input mapping for the first input to our controlled
* output. This is only correct if we're a single-input device, in
* which case the first input is the output from the appropriate SDVO
@@ -2775,9 +2778,18 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
/* Only enable the hotplug irq if we need it, to work around noisy
* hotplug lines.
*/
- if (intel_sdvo->hotplug_active)
+ if (intel_sdvo->hotplug_active) {
dev_priv->hotplug_supported_mask |= hotplug_mask;
+ if (HAS_PCH_SPLIT(dev)) {
+ u32 temp;
+
+ temp = I915_READ(intel_sdvo->sdvo_reg);
+ temp &= SDVO_INTERRUPT_ENABLE_PCH;
+ intel_sdvo_write_sdvox(intel_sdvo, temp);
+ }
+ }
+
intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg);
/* Set the input timing to the screen. Assume always input 0. */
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: enable sdvo interrupt on pch platforms
2012-12-10 0:37 ` Daniel Vetter
@ 2012-12-10 21:20 ` Jesse Barnes
2012-12-10 21:29 ` Daniel Vetter
0 siblings, 1 reply; 6+ messages in thread
From: Jesse Barnes @ 2012-12-10 21:20 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development
On Mon, 10 Dec 2012 01:37:18 +0100
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Noticed while strolling through docs. Might make a few dual-link dvi
> users happy(ier).
>
> v2: Remove the unrelated debug hacks in intel_display.c
>
> v3: Preserve register contexts to not upset fastboot or the modeset
> hw state checker.
>
> v4: Actually enable it in the irq handler/postinstall functions, too
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 3 +++
> drivers/gpu/drm/i915/i915_reg.h | 6 ++++--
> drivers/gpu/drm/i915/intel_sdvo.c | 14 +++++++++++++-
> 3 files changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index d02e022..e9b9460 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1910,6 +1910,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
> SDE_PORTB_HOTPLUG_CPT |
> SDE_PORTC_HOTPLUG_CPT |
> SDE_PORTD_HOTPLUG_CPT |
> + SDE_SDVOB_HOTPLUG_CPT |
> SDE_GMBUS_CPT |
> SDE_AUX_MASK_CPT);
> } else {
> @@ -1917,6 +1918,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
> SDE_PORTB_HOTPLUG |
> SDE_PORTC_HOTPLUG |
> SDE_PORTD_HOTPLUG |
> + SDE_SDVOB_HOTPLUG |
> SDE_GMBUS |
> SDE_AUX_MASK);
> }
> @@ -1979,6 +1981,7 @@ static int ivybridge_irq_postinstall(struct drm_device *dev)
> SDE_PORTB_HOTPLUG_CPT |
> SDE_PORTC_HOTPLUG_CPT |
> SDE_PORTD_HOTPLUG_CPT |
> + SDE_SDVOB_HOTPLUG_CPT |
> SDE_GMBUS_CPT |
> SDE_AUX_MASK_CPT);
> dev_priv->pch_irq_mask = ~hotplug_mask;
I guess this needs fixing on top of your latest hotplug setup changes.
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index f2a5ea6..d8162f8 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -1673,7 +1673,7 @@
> #define SDVO_ENABLE (1 << 31)
> #define SDVO_PIPE_B_SELECT (1 << 30)
> #define SDVO_STALL_SELECT (1 << 29)
> -#define SDVO_INTERRUPT_ENABLE (1 << 26)
> +#define SDVO_INTERRUPT_ENABLE_PCH (1 << 23)
Why drop the old one? Not possible to use there too?
> @@ -1085,6 +1085,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
> if (!mode)
> return;
>
> + /* Preserve the PCH interrupt enable bit. */
> + sdvox = I915_READ(intel_sdvo->sdvo_reg) & SDVO_INTERRUPT_ENABLE_PCH;
> +
Don't we unconditionally set sdvox later? Do you need to add some
s/=/|=/ later on in sdvo_mode_set?
> /* First, set the input mapping for the first input to our controlled
> * output. This is only correct if we're a single-input device, in
> * which case the first input is the output from the appropriate SDVO
> @@ -2775,9 +2778,18 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
> /* Only enable the hotplug irq if we need it, to work around noisy
> * hotplug lines.
> */
> - if (intel_sdvo->hotplug_active)
> + if (intel_sdvo->hotplug_active) {
> dev_priv->hotplug_supported_mask |= hotplug_mask;
>
> + if (HAS_PCH_SPLIT(dev)) {
> + u32 temp;
> +
> + temp = I915_READ(intel_sdvo->sdvo_reg);
> + temp &= SDVO_INTERRUPT_ENABLE_PCH;
> + intel_sdvo_write_sdvox(intel_sdvo, temp);
> + }
> + }
Clearing everything but the interrupt enable bit? Or should this be |=?
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: enable sdvo interrupt on pch platforms
2012-12-10 21:20 ` Jesse Barnes
@ 2012-12-10 21:29 ` Daniel Vetter
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2012-12-10 21:29 UTC (permalink / raw)
To: Jesse Barnes; +Cc: Daniel Vetter, Intel Graphics Development
On Mon, Dec 10, 2012 at 01:20:29PM -0800, Jesse Barnes wrote:
> On Mon, 10 Dec 2012 01:37:18 +0100
> Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>
> > Noticed while strolling through docs. Might make a few dual-link dvi
> > users happy(ier).
> >
> > v2: Remove the unrelated debug hacks in intel_display.c
> >
> > v3: Preserve register contexts to not upset fastboot or the modeset
> > hw state checker.
> >
> > v4: Actually enable it in the irq handler/postinstall functions, too
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> > drivers/gpu/drm/i915/i915_irq.c | 3 +++
> > drivers/gpu/drm/i915/i915_reg.h | 6 ++++--
> > drivers/gpu/drm/i915/intel_sdvo.c | 14 +++++++++++++-
> > 3 files changed, 20 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > index d02e022..e9b9460 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -1910,6 +1910,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
> > SDE_PORTB_HOTPLUG_CPT |
> > SDE_PORTC_HOTPLUG_CPT |
> > SDE_PORTD_HOTPLUG_CPT |
> > + SDE_SDVOB_HOTPLUG_CPT |
> > SDE_GMBUS_CPT |
> > SDE_AUX_MASK_CPT);
> > } else {
> > @@ -1917,6 +1918,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
> > SDE_PORTB_HOTPLUG |
> > SDE_PORTC_HOTPLUG |
> > SDE_PORTD_HOTPLUG |
> > + SDE_SDVOB_HOTPLUG |
> > SDE_GMBUS |
> > SDE_AUX_MASK);
> > }
> > @@ -1979,6 +1981,7 @@ static int ivybridge_irq_postinstall(struct drm_device *dev)
> > SDE_PORTB_HOTPLUG_CPT |
> > SDE_PORTC_HOTPLUG_CPT |
> > SDE_PORTD_HOTPLUG_CPT |
> > + SDE_SDVOB_HOTPLUG_CPT |
> > SDE_GMBUS_CPT |
> > SDE_AUX_MASK_CPT);
> > dev_priv->pch_irq_mask = ~hotplug_mask;
>
> I guess this needs fixing on top of your latest hotplug setup changes.
Yep.
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> > index f2a5ea6..d8162f8 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -1673,7 +1673,7 @@
> > #define SDVO_ENABLE (1 << 31)
> > #define SDVO_PIPE_B_SELECT (1 << 30)
> > #define SDVO_STALL_SELECT (1 << 29)
> > -#define SDVO_INTERRUPT_ENABLE (1 << 26)
> > +#define SDVO_INTERRUPT_ENABLE_PCH (1 << 23)
>
> Why drop the old one? Not possible to use there too?
Afaics it's totally bogus - bits 26 is reserved for the color depth
selection. I've done a bit of docs scrounging and apparently we only need
to enable the sdvo irq manually in the port reg on ilk+.
> > @@ -1085,6 +1085,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
> > if (!mode)
> > return;
> >
> > + /* Preserve the PCH interrupt enable bit. */
> > + sdvox = I915_READ(intel_sdvo->sdvo_reg) & SDVO_INTERRUPT_ENABLE_PCH;
> > +
>
> Don't we unconditionally set sdvox later? Do you need to add some
> s/=/|=/ later on in sdvo_mode_set?
Yeah, noticed that too but forgot to fix it up.
> > /* First, set the input mapping for the first input to our controlled
> > * output. This is only correct if we're a single-input device, in
> > * which case the first input is the output from the appropriate SDVO
> > @@ -2775,9 +2778,18 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
> > /* Only enable the hotplug irq if we need it, to work around noisy
> > * hotplug lines.
> > */
> > - if (intel_sdvo->hotplug_active)
> > + if (intel_sdvo->hotplug_active) {
> > dev_priv->hotplug_supported_mask |= hotplug_mask;
> >
> > + if (HAS_PCH_SPLIT(dev)) {
> > + u32 temp;
> > +
> > + temp = I915_READ(intel_sdvo->sdvo_reg);
> > + temp &= SDVO_INTERRUPT_ENABLE_PCH;
> > + intel_sdvo_write_sdvox(intel_sdvo, temp);
> > + }
> > + }
>
> Clearing everything but the interrupt enable bit? Or should this be |=?
By now you should have noticed that this is a massive [CFT] hoax ... I
guess I need to plug an sdvo in my ivb here ;-)
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-12-10 21:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-09 21:28 [PATCH] drm/i915: enable sdvo interrupt on pch platforms Daniel Vetter
2012-12-09 21:30 ` Daniel Vetter
2012-12-09 21:35 ` Daniel Vetter
2012-12-10 0:37 ` Daniel Vetter
2012-12-10 21:20 ` Jesse Barnes
2012-12-10 21:29 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).