Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/i915: Fix shifted screen on top of LVDS on IVY laptop
@ 2012-12-11 10:46 Takashi Iwai
  2012-12-11 11:54 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2012-12-11 10:46 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Arthur Ranyan, intel-gfx

The commit [23670b322: drm/i915: CPT+ pch transcoder workaround]
caused a regression on some HP laptops with IvyBridge.  The whole
laptop screen is shifted downward for a few pixels constantly.
The problem appears only on LVDS while DP and VGA seem unaffected.
Also, the problem disappears once when go and back from S3.
(S4 resume still shows the same problem.)

This patch revives the minimum part the commit above dropped.
For fixing this regression, only the setup of CHICKEN2 bit in
cpt_init_clock_gating() is needed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
v1->v2: subject changed, more comments and changelog

 drivers/gpu/drm/i915/intel_pm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 58c2f21..3e3021d 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3446,6 +3446,11 @@ static void cpt_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(SOUTH_DSPCLK_GATE_D, PCH_DPLSUNIT_CLOCK_GATE_DISABLE);
 	I915_WRITE(SOUTH_CHICKEN2, I915_READ(SOUTH_CHICKEN2) |
 		   DPLS_EDP_PPS_FIX_DIS);
+	/* The below fixes the weird display corruption, a few pixels shifted
+	 * downward, on (only) LVDS of some HP laptops with IVY.
+	 */
+	for_each_pipe(pipe)
+		I915_WRITE(TRANS_CHICKEN2(pipe), TRANS_CHICKEN2_TIMING_OVERRIDE);
 	/* WADP0ClockGatingDisable */
 	for_each_pipe(pipe) {
 		I915_WRITE(TRANS_CHICKEN1(pipe),
-- 
1.8.0.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] drm/i915: Fix shifted screen on top of LVDS on IVY laptop
  2012-12-11 10:46 [PATCH v2] drm/i915: Fix shifted screen on top of LVDS on IVY laptop Takashi Iwai
@ 2012-12-11 11:54 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2012-12-11 11:54 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Arthur Ranyan, intel-gfx

On Tue, Dec 11, 2012 at 11:46:29AM +0100, Takashi Iwai wrote:
> The commit [23670b322: drm/i915: CPT+ pch transcoder workaround]
> caused a regression on some HP laptops with IvyBridge.  The whole
> laptop screen is shifted downward for a few pixels constantly.
> The problem appears only on LVDS while DP and VGA seem unaffected.
> Also, the problem disappears once when go and back from S3.
> (S4 resume still shows the same problem.)
> 
> This patch revives the minimum part the commit above dropped.
> For fixing this regression, only the setup of CHICKEN2 bit in
> cpt_init_clock_gating() is needed.
> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>

Picked up for -fixes, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-11 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 10:46 [PATCH v2] drm/i915: Fix shifted screen on top of LVDS on IVY laptop Takashi Iwai
2012-12-11 11:54 ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox