On Thu, Jan 12, 2012 at 21:49, Jesse Barnes <jbar...@virtuousgeek.org>wrote:

> On Thu, 12 Jan 2012 21:37:11 +0100
> Vincent Vanackere <vincent.vanack...@gmail.com> wrote:
>
> > On Thu, Jan 12, 2012 at 21:17, Jesse Barnes <jbar...@virtuousgeek.org
> >wrote:
> >
> > > On Thu, 12 Jan 2012 21:13:40 +0100
> > > Vincent Vanackere <vincent.vanack...@gmail.com> wrote:
> [...]
> > > Another one to try... need to check if we're masking out the port
> > > selection bits correctly...
> > >
> > > --
> > > Jesse Barnes, Intel Open Source Technology Center
> > >
> > > @@ -5808,12 +5814,15 @@ static int ironlake_crtc_mode_set(struct
> drm_crtc
> > > *crtc,
> > >        if (is_lvds) {
> > >                temp = I915_READ(PCH_LVDS);
> > >                temp |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;
> > > -               if (HAS_PCH_CPT(dev))
> > > +               if (HAS_PCH_CPT(dev)) {
> > > +                       temp &= ~PORT_TRANS_SEL_MASK;
> > >                        temp |= PORT_TRANS_SEL_CPT(pipe);
> > > -               else if (pipe == 1)
> > > -                       temp |= LVDS_PIPEB_SELECT;
> > > -               else
> > > -                       temp &= ~LVDS_PIPEB_SELECT;
> > > +               } else {
> > > +                       if (pipe == 1)
> > > +                               temp |= LVDS_PIPEB_SELECT;
> > > +                       else
> > > +                               temp &= ~LVDS_PIPEB_SELECT;
> > > +               }
> > >
> > >                /* set the corresponsding LVDS_BORDER bit */
> > >                temp |= dev_priv->lvds_border_bits;
> > >
> > >
> > Against which tree do these patches apply ?
>
> I was using the drm-intel-next branch of keithp's tree on
> freedesktop.org, but they should also apply with some fuzz against
> Linus's current master tree.
>

I'm happy to report that this patch indeed fixes the issue for me (tested
both on linus' master and drm-intel-next).
Note that I had to apply it by hand (the patch was mangled by your mailer
?), therefore I'm resending your fix as an attachment in case other people
are interested.

Many thanks for the quick fix !

Vincent
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2a3f707..be13ca8 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5808,12 +5808,14 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
 	if (is_lvds) {
 		temp = I915_READ(PCH_LVDS);
 		temp |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;
-		if (HAS_PCH_CPT(dev))
-			temp |= PORT_TRANS_SEL_CPT(pipe);
-		else if (pipe == 1)
-			temp |= LVDS_PIPEB_SELECT;
-		else
-			temp &= ~LVDS_PIPEB_SELECT;
+		if (HAS_PCH_CPT(dev)){
+			temp &= ~PORT_TRANS_SEL_MASK;
+		} else {
+			if (pipe == 1)
+				temp |= LVDS_PIPEB_SELECT;
+			else
+				temp &= ~LVDS_PIPEB_SELECT;
+		}
 
 		/* set the corresponsding LVDS_BORDER bit */
 		temp |= dev_priv->lvds_border_bits;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to