[Intel-gfx] [PATCH 2/4] drm/i915: Update the LVDS pipe select bit correctly
Zhenyu Wang
zhenyuw at linux.intel.com
Wed Apr 7 11:11:20 CEST 2010
From: Zhao Yakui <yakui.zhao at intel.com>
The pipe A can also be assigned to LVDS port from Gen4. When the Pipe A
is selected for the LVDS port, the current code doesn't update the LVDS
pipe selection bit correctly, which causes that the incorrect pipe is
selected for LVDS. So clear select bit before pipe setting.
Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 2 ++
drivers/gpu/drm/i915/intel_display.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index cbbf59f..a7fca9b 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1141,6 +1141,8 @@
*/
#define LVDS_PORT_EN (1 << 31)
/* Selects pipe B for LVDS data. Must be set on pre-965. */
+#define LVDS_PIPE_SELECT_MASK (1 << 30)
+#define LVDS_PIPEA_SELECT (0 << 30)
#define LVDS_PIPEB_SELECT (1 << 30)
/* LVDS dithering flag on 965/g4x platform */
#define LVDS_ENABLE_DITHER (1 << 25)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index cccb99d..ee37993 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3303,8 +3303,11 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
lvds = I915_READ(lvds_reg);
lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;
+ lvds &= ~LVDS_PIPE_SELECT_MASK;
if (pipe == 1)
lvds |= LVDS_PIPEB_SELECT;
+ else
+ lvds |= LVDS_PIPEA_SELECT;
/* set the corresponsding LVDS_BORDER bit */
lvds |= dev_priv->lvds_border_bits;
/* Set the B0-B3 data pairs corresponding to whether we're going to
--
1.6.3.3
More information about the Intel-gfx
mailing list