Patchwork UBUNTU: SAUCE: (drop after 3.5) drm/i915: ignore pipe select bit when checking for LVDS register initialization

login
register
mail settings
Submitter Seth Forshee
Date June 29, 2012, 10:12 p.m.
Message ID <1341007940-10207-2-git-send-email-seth.forshee@canonical.com>
Download mbox | patch
Permalink /patch/168268/
State New
Headers show

Comments

Seth Forshee - June 29, 2012, 10:12 p.m.
The Lenovo Thinkpad T410 has the LVDS_PIPEB_SELECT bit set in the LVDS
register when booted with the lid closed, even though the LVDS hasn't
really been initialized. Ignore this bit so that the VBT value will be
used instead.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 14d94a3d82ab3ef6b3a9f881e134d5b48323b202
 git://people.freedesktop.org/~danvet/drm-intel drm-intel-next)
BugLink: http://bugs.launchpad.net/bugs/1012800
---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Leann Ogasawara - July 1, 2012, 1:32 a.m.
Applied to Quantal master-next.

Thanks,
Leann

On 06/29/2012 03:12 PM, Seth Forshee wrote:
> The Lenovo Thinkpad T410 has the LVDS_PIPEB_SELECT bit set in the LVDS
> register when booted with the lid closed, even though the LVDS hasn't
> really been initialized. Ignore this bit so that the VBT value will be
> used instead.
>
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> (cherry picked from commit 14d94a3d82ab3ef6b3a9f881e134d5b48323b202
>  git://people.freedesktop.org/~danvet/drm-intel drm-intel-next)
> BugLink: http://bugs.launchpad.net/bugs/1012800
> ---
>  drivers/gpu/drm/i915/intel_display.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index a7c727d..d2c59cd 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -434,7 +434,7 @@ static bool is_dual_link_lvds(struct drm_i915_private *dev_priv,
>  		 * register is uninitialized.
>  		 */
>  		val = I915_READ(reg);
> -		if (!(val & ~LVDS_DETECTED))
> +		if (!(val & ~(LVDS_PIPE_MASK | LVDS_DETECTED)))
>  			val = dev_priv->bios_lvds_val;
>  		dev_priv->lvds_val = val;
>  	}

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a7c727d..d2c59cd 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -434,7 +434,7 @@  static bool is_dual_link_lvds(struct drm_i915_private *dev_priv,
 		 * register is uninitialized.
 		 */
 		val = I915_READ(reg);
-		if (!(val & ~LVDS_DETECTED))
+		if (!(val & ~(LVDS_PIPE_MASK | LVDS_DETECTED)))
 			val = dev_priv->bios_lvds_val;
 		dev_priv->lvds_val = val;
 	}