* [RFC] Untested patches for misc DP issues.
@ 2010-11-18 1:32 Eric Anholt
2010-11-18 1:32 ` [PATCH 2/6] drm/i915: Set the transcoder port to none when disabling DP Eric Anholt
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Eric Anholt @ 2010-11-18 1:32 UTC (permalink / raw)
To: intel-gfx
Here are some things I came up with while reviewing the code compared
to the specs. They are completely untested, so don't push them.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/6] drm/i915: Set the transcoder port to none when disabling DP.
2010-11-18 1:32 [RFC] Untested patches for misc DP issues Eric Anholt
@ 2010-11-18 1:32 ` Eric Anholt
2010-11-18 1:32 ` [PATCH 3/6] drm/i915: Always set the DP transcoder config to 8BPC Eric Anholt
2010-11-18 1:32 ` [PATCH 4/6] drm/i915: Apply a workaround for transitioning from DP on pipe B to HDMI Eric Anholt
2 siblings, 0 replies; 5+ messages in thread
From: Eric Anholt @ 2010-11-18 1:32 UTC (permalink / raw)
To: intel-gfx
The specs say to do so.
Signed-off-by: Eric Anholt <eric@anholt.net>
---
drivers/gpu/drm/i915/i915_reg.h | 1 +
drivers/gpu/drm/i915/intel_display.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 886c0e0..952a686 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3053,6 +3053,7 @@
#define TRANS_DP_PORT_SEL_B (0<<29)
#define TRANS_DP_PORT_SEL_C (1<<29)
#define TRANS_DP_PORT_SEL_D (2<<29)
+#define TRANS_DP_PORT_SEL_NONE (2<<29)
#define TRANS_DP_PORT_SEL_MASK (3<<29)
#define TRANS_DP_AUDIO_ONLY (1<<26)
#define TRANS_DP_ENH_FRAMING (1<<18)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3fa5aaa..8b6472d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2276,6 +2276,7 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
reg = TRANS_DP_CTL(pipe);
temp = I915_READ(reg);
temp &= ~(TRANS_DP_OUTPUT_ENABLE | TRANS_DP_PORT_SEL_MASK);
+ temp |= TRANS_DP_PORT_SEL_NONE;
I915_WRITE(reg, temp);
/* disable DPLL_SEL */
--
1.7.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/6] drm/i915: Always set the DP transcoder config to 8BPC.
2010-11-18 1:32 [RFC] Untested patches for misc DP issues Eric Anholt
2010-11-18 1:32 ` [PATCH 2/6] drm/i915: Set the transcoder port to none when disabling DP Eric Anholt
@ 2010-11-18 1:32 ` Eric Anholt
2010-11-18 9:02 ` Eric Anholt
2010-11-18 1:32 ` [PATCH 4/6] drm/i915: Apply a workaround for transitioning from DP on pipe B to HDMI Eric Anholt
2 siblings, 1 reply; 5+ messages in thread
From: Eric Anholt @ 2010-11-18 1:32 UTC (permalink / raw)
To: intel-gfx
The pipe is always set to 8BPC, but here we were leaving whatever
previous bits were set by the BIOS in place.
Signed-off-by: Eric Anholt <eric@anholt.net>
---
drivers/gpu/drm/i915/i915_reg.h | 1 +
drivers/gpu/drm/i915/intel_display.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 952a686..00351a6 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3061,6 +3061,7 @@
#define TRANS_DP_10BPC (1<<9)
#define TRANS_DP_6BPC (2<<9)
#define TRANS_DP_12BPC (3<<9)
+#define TRANS_DP_BPC_MASK (3<<9)
#define TRANS_DP_VSYNC_ACTIVE_HIGH (1<<4)
#define TRANS_DP_VSYNC_ACTIVE_LOW 0
#define TRANS_DP_HSYNC_ACTIVE_HIGH (1<<3)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 8b6472d..841d7fe 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2119,9 +2119,11 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
reg = TRANS_DP_CTL(pipe);
temp = I915_READ(reg);
temp &= ~(TRANS_DP_PORT_SEL_MASK |
- TRANS_DP_SYNC_MASK);
+ TRANS_DP_SYNC_MASK |
+ TRANS_DP_BPC_MASK);
temp |= (TRANS_DP_OUTPUT_ENABLE |
TRANS_DP_ENH_FRAMING);
+ temp |= TRANS_DP_8BPC;
if (crtc->mode.flags & DRM_MODE_FLAG_PHSYNC)
temp |= TRANS_DP_HSYNC_ACTIVE_HIGH;
--
1.7.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/6] drm/i915: Apply a workaround for transitioning from DP on pipe B to HDMI.
2010-11-18 1:32 [RFC] Untested patches for misc DP issues Eric Anholt
2010-11-18 1:32 ` [PATCH 2/6] drm/i915: Set the transcoder port to none when disabling DP Eric Anholt
2010-11-18 1:32 ` [PATCH 3/6] drm/i915: Always set the DP transcoder config to 8BPC Eric Anholt
@ 2010-11-18 1:32 ` Eric Anholt
2 siblings, 0 replies; 5+ messages in thread
From: Eric Anholt @ 2010-11-18 1:32 UTC (permalink / raw)
To: intel-gfx
This only applies to Ironlake.
Signed-off-by: Eric Anholt <eric@anholt.net>
---
drivers/gpu/drm/i915/intel_dp.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index c8e0055..252bf7c 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1406,6 +1406,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp->base.base.dev;
struct drm_i915_private *dev_priv = dev->dev_private;
+ struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc);
uint32_t DP = intel_dp->DP;
DRM_DEBUG_KMS("\n");
@@ -1430,6 +1431,26 @@ intel_dp_link_down(struct intel_dp *intel_dp)
if (is_edp(intel_dp))
DP |= DP_LINK_TRAIN_OFF;
+
+ if (!HAS_PCH_CPT(dev) && (DP & DP_PIPEB_SELECT)) {
+ /* Hardware workaround: leaving our transcoder select
+ * set to transcoder B while it's off will prevent the
+ * corresponding HDMI output on transcoder A.
+ *
+ * Combine this with another hardware workaround:
+ * transcoder select bit can only be cleared while the
+ * port is enabled.
+ */
+ DP &= ~DP_PIPEB_SELECT;
+ I915_WRITE(intel_dp->output_reg, DP);
+
+ /* Changes to enable or select take place the vblank
+ * after being written.
+ */
+ intel_wait_for_vblank(intel_dp->base.base.dev,
+ intel_crtc->pipe);
+ }
+
I915_WRITE(intel_dp->output_reg, DP & ~DP_PORT_EN);
POSTING_READ(intel_dp->output_reg);
}
--
1.7.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3/6] drm/i915: Always set the DP transcoder config to 8BPC.
2010-11-18 1:32 ` [PATCH 3/6] drm/i915: Always set the DP transcoder config to 8BPC Eric Anholt
@ 2010-11-18 9:02 ` Eric Anholt
0 siblings, 0 replies; 5+ messages in thread
From: Eric Anholt @ 2010-11-18 9:02 UTC (permalink / raw)
To: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 378 bytes --]
On Thu, 18 Nov 2010 09:32:58 +0800, Eric Anholt <eric@anholt.net> wrote:
> The pipe is always set to 8BPC, but here we were leaving whatever
> previous bits were set by the BIOS in place.
This series has now been tested on a DP system. We got flashing garbage
due to the BIOS having configured 6BPC, until this patch was applied.
Tested-by: Keith Packard <keithp@keithp.com>
[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-11-18 9:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18 1:32 [RFC] Untested patches for misc DP issues Eric Anholt
2010-11-18 1:32 ` [PATCH 2/6] drm/i915: Set the transcoder port to none when disabling DP Eric Anholt
2010-11-18 1:32 ` [PATCH 3/6] drm/i915: Always set the DP transcoder config to 8BPC Eric Anholt
2010-11-18 9:02 ` Eric Anholt
2010-11-18 1:32 ` [PATCH 4/6] drm/i915: Apply a workaround for transitioning from DP on pipe B to HDMI Eric Anholt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox