Skip to contentSkip to conversation

drm/i915: Disable LVDS while modesetting for HD+ panels

PATCH In review Takashi Iwai 2 participants 5 messages Jul 2, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Disable LVDS while modesetting for HD+ panels

Some SNB/IVY Laptops with 1600x900 HD+ panel (e.g. Dell Latitude E6420 and HP ProBook 65xx) are known to show the whole black/white garbage or flickering screens while starting up or changing the mode. This can be worked around by disabling LVDS off while changing the mode.

Since this doesn't give any visible drawback on machines I've tested, enable it generically for HD+ panels for SCH-split case.

---
 drivers/gpu/drm/i915/intel_lvds.c |   25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_lvds.c +19 -6
index 08eb04c..cf1c150 100644
@@ -407,13 +407,26 @@ out:
 static void intel_lvds_prepare(struct drm_encoder *encoder)
 {
 	struct intel_lvds *intel_lvds = to_intel_lvds(encoder);
+	bool do_disable = false;
 
-	/*
-	 * Prior to Ironlake, we must disable the pipe if we want to adjust
-	 * the panel fitter. However at all other times we can just reset
-	 * the registers regardless.
-	 */
-	if (!HAS_PCH_SPLIT(encoder->dev) && intel_lvds->pfit_dirty)
+	if (HAS_PCH_SPLIT(encoder->dev)) {
+		/* Some HD+ panels require the pipe-off while mode changing;
+		 * otherwise you'll get B/W garbage or sustaining flickering
+		 * screen
+		 */
+		if (intel_lvds->fixed_mode->hdisplay >= 1600 &&
+		    intel_lvds->fixed_mode->vdisplay >= 900)
+			do_disable = true;
+	} else {
+		/*
+		 * Prior to Ironlake, we must disable the pipe if we want to
+		 * adjust the panel fitter. However at all other times we can
+		 * just reset the registers regardless.
+		 */
+		do_disable = intel_lvds->pfit_dirty;
+	}
+
+	if (do_disable)
 		intel_lvds_disable(intel_lvds);
 }
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 6 lines · Takashi Iwai

Some SNB/IVY Laptops with 1600x900 HD+ panel (e.g. Dell Latitude E6420 and HP ProBook 65xx) are known to show the whole black/white garbage or flickering screens while starting up or changing the mode. This can be worked around by disabling LVDS off while changing the mode.

Quoted 6 lines

Since this doesn't give any visible drawback on machines I've tested, enable it generically for HD+ panels for SCH-split case.

As part of a larger rework effort for the modeset stuff I've stumbled over this, too - I see detiled garbage on some mode switches.

http://cgit.freedesktop.org/~danvet/drm/commit/?h=modeset-rework&id=bf8528171b2c2bb94aeca8316e26e017e42643d3

So my question: why so complicated, and what's the justification for the funky hdisplay/vdisplay condiditons?

Cheers, Daniel

Quoted 48 lines
---
 drivers/gpu/drm/i915/intel_lvds.c |   25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_lvds.c +19 -6
index 08eb04c..cf1c150 100644
@@ -407,13 +407,26 @@ out:
 static void intel_lvds_prepare(struct drm_encoder *encoder)
 {
 	struct intel_lvds *intel_lvds = to_intel_lvds(encoder);
+	bool do_disable = false;
 
-	/*
-	 * Prior to Ironlake, we must disable the pipe if we want to adjust
-	 * the panel fitter. However at all other times we can just reset
-	 * the registers regardless.
-	 */
-	if (!HAS_PCH_SPLIT(encoder->dev) && intel_lvds->pfit_dirty)
+	if (HAS_PCH_SPLIT(encoder->dev)) {
+		/* Some HD+ panels require the pipe-off while mode changing;
+		 * otherwise you'll get B/W garbage or sustaining flickering
+		 * screen
+		 */
+		if (intel_lvds->fixed_mode->hdisplay >= 1600 &&
+		    intel_lvds->fixed_mode->vdisplay >= 900)
+			do_disable = true;
+	} else {
+		/*
+		 * Prior to Ironlake, we must disable the pipe if we want to
+		 * adjust the panel fitter. However at all other times we can
+		 * just reset the registers regardless.
+		 */
+		do_disable = intel_lvds->pfit_dirty;
+	}
+
+	if (do_disable)
 		intel_lvds_disable(intel_lvds);
 }
 
Signature · 6 lines
1.7.10.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
#2 lore raw

At Mon, 2 Jul 2012 18:53:29 +0200,

Quoted 15 lines · Daniel Vetter
Quoted 6 lines · Takashi Iwai

Some SNB/IVY Laptops with 1600x900 HD+ panel (e.g. Dell Latitude E6420 and HP ProBook 65xx) are known to show the whole black/white garbage or flickering screens while starting up or changing the mode. This can be worked around by disabling LVDS off while changing the mode.

Quoted 6 lines

Since this doesn't give any visible drawback on machines I've tested, enable it generically for HD+ panels for SCH-split case.

Quoted 7 lines

As part of a larger rework effort for the modeset stuff I've stumbled over this, too - I see detiled garbage on some mode switches.

http://cgit.freedesktop.org/~danvet/drm/commit/?h=modeset-rework&id=bf8528171b2c2bb94aeca8316e26e017e42643d3

So my question: why so complicated, and what's the justification for the funky hdisplay/vdisplay condiditons?

It's just for avoiding the possible regressions by this change. We definitely need a fix for HD+ panels ASAP, while other panels work in the current code. Introducing the extra disable code affecting all laptops sounds too risky for 3.5 kernel, as we can't cover all cases. But for HD+ panels, we did fairly good coverage, as there are still little models.

If you find this limitation nonsense and we are brave enough, let's do it without complication.

thanks,

Takashi

Quoted 57 lines

Cheers, Daniel

Quoted 48 lines
---
 drivers/gpu/drm/i915/intel_lvds.c |   25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_lvds.c +19 -6
index 08eb04c..cf1c150 100644
@@ -407,13 +407,26 @@ out:
 static void intel_lvds_prepare(struct drm_encoder *encoder)
 {
 	struct intel_lvds *intel_lvds = to_intel_lvds(encoder);
+	bool do_disable = false;
 
-	/*
-	 * Prior to Ironlake, we must disable the pipe if we want to adjust
-	 * the panel fitter. However at all other times we can just reset
-	 * the registers regardless.
-	 */
-	if (!HAS_PCH_SPLIT(encoder->dev) && intel_lvds->pfit_dirty)
+	if (HAS_PCH_SPLIT(encoder->dev)) {
+		/* Some HD+ panels require the pipe-off while mode changing;
+		 * otherwise you'll get B/W garbage or sustaining flickering
+		 * screen
+		 */
+		if (intel_lvds->fixed_mode->hdisplay >= 1600 &&
+		    intel_lvds->fixed_mode->vdisplay >= 900)
+			do_disable = true;
+	} else {
+		/*
+		 * Prior to Ironlake, we must disable the pipe if we want to
+		 * adjust the panel fitter. However at all other times we can
+		 * just reset the registers regardless.
+		 */
+		do_disable = intel_lvds->pfit_dirty;
+	}
+
+	if (do_disable)
 		intel_lvds_disable(intel_lvds);
 }
 
Signature · 6 lines
1.7.10.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
#3 lore raw
Quoted 9 lines · Takashi Iwai

It's just for avoiding the possible regressions by this change. We definitely need a fix for HD+ panels ASAP, while other panels work in the current code. Introducing the extra disable code affecting all laptops sounds too risky for 3.5 kernel, as we can't cover all cases. But for HD+ panels, we did fairly good coverage, as there are still little models.

If you find this limitation nonsense and we are brave enough, let's do it without complication.

Hm, I've hoped I could chicken out and to the non-limited thing for 3.6 ... as you say, it's a bit late to do such a change in after -rc5. So I guess the question is: How much does not having this patch break panels, i.e. can some mad vt-switching restore them or are they bricked for good until reset?
-Daniel

Signature · 2 lines
Daniel Vetter
[email protected] - +41 (0) 79 364 57 48 - http://blog.ffwll.ch
#4 lore raw

At Mon, 2 Jul 2012 19:55:17 +0200,

Quoted 9 lines · Daniel Vetter
Quoted 7 lines · Takashi Iwai

It's just for avoiding the possible regressions by this change. We definitely need a fix for HD+ panels ASAP, while other panels work in the current code. Introducing the extra disable code affecting all laptops sounds too risky for 3.5 kernel, as we can't cover all cases. But for HD+ panels, we did fairly good coverage, as there are still little models.

Quoted 8 lines
Quoted 2 lines

If you find this limitation nonsense and we are brave enough, let's do it without complication.

Hm, I've hoped I could chicken out and to the non-limited thing for 3.6 ... as you say, it's a bit late to do such a change in after -rc5. So I guess the question is: How much does not having this patch break panels, i.e. can some mad vt-switching restore them or are they bricked for good until reset?

On HP laptops I've tested, the screen can be partially recovered from B/W garbages when you once disable LVDS and enable again. But then the screen starts flickering. And much worse, this flickering remains even after the cold boot!

I have to put the machine rest for a while to restore the screen completely.

thanks,

Takashi