]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.16/0001-drm-i915-mask-transcoder-select-bits-before-setting-.patch
linux-ti33x-psp 3.2: rebase patches onto latest git
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / 3.2.16 / 0001-drm-i915-mask-transcoder-select-bits-before-setting-.patch
1 From 23bf11c621c4c3acfdf83cf7f5587a2463d039ec Mon Sep 17 00:00:00 2001
2 From: Jesse Barnes <jbarnes@virtuousgeek.org>
3 Date: Thu, 12 Jan 2012 14:51:17 -0800
4 Subject: [PATCH 01/68] drm/i915: mask transcoder select bits before setting
5  them on LVDS
7 commit 7885d2052bd94395e337709cfba093a41f273ff1 upstream.
9 The transcoder port may changed from mode set to mode set, so make sure
10 to mask out the selection bits before setting the right ones or we'll
11 get black screens when going from transcoder B to A.
13 Tested-by: Vincent Vanackere <vincent.vanackere@gmail.com>
14 Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 Reviewed-by: Keith Packard <keithp@keithp.com>
16 Signed-off-by: Keith Packard <keithp@keithp.com>
17 Cc: Jonathan Nieder <jrnieder@gmail.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 ---
20  drivers/gpu/drm/i915/intel_display.c |   13 ++++++++-----
21  1 file changed, 8 insertions(+), 5 deletions(-)
23 diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
24 index 9011f48..390768f 100644
25 --- a/drivers/gpu/drm/i915/intel_display.c
26 +++ b/drivers/gpu/drm/i915/intel_display.c
27 @@ -5646,12 +5646,15 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
28         if (is_lvds) {
29                 temp = I915_READ(PCH_LVDS);
30                 temp |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;
31 -               if (HAS_PCH_CPT(dev))
32 +               if (HAS_PCH_CPT(dev)) {
33 +                       temp &= ~PORT_TRANS_SEL_MASK;
34                         temp |= PORT_TRANS_SEL_CPT(pipe);
35 -               else if (pipe == 1)
36 -                       temp |= LVDS_PIPEB_SELECT;
37 -               else
38 -                       temp &= ~LVDS_PIPEB_SELECT;
39 +               } else {
40 +                       if (pipe == 1)
41 +                               temp |= LVDS_PIPEB_SELECT;
42 +                       else
43 +                               temp &= ~LVDS_PIPEB_SELECT;
44 +               }
45  
46                 /* set the corresponsding LVDS_BORDER bit */
47                 temp |= dev_priv->lvds_border_bits;
48 -- 
49 1.7.10