mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Chris Wilson <chris@chris-wilson.co.uk>,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Sitsofe Wheeler <sitsofe@yahoo.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [PATCH] Revert "drm/i915: fix vblank wait test condition"
Date: Sat, 4 Sep 2010 12:54:38 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.00.1009041244440.3044@sister.anvils> (raw)
In-Reply-To: <AANLkTi=_OW5NvnS1oWzt3DW9CPPwNX_sAkPh_QOuXzhv@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2475 bytes --]

On Sat, 4 Sep 2010, Pekka Enberg wrote:
> On Sat,  4 Sep 2010 11:17:14 +0300, Pekka Enberg <penberg@kernel.org> wrote:
> >> This reverts commit 9559fcdbff4f93d29af04478bbc48294519424f5. The commit causes
> >> wrong screen resolution on some i915 machines such as MacBook which is a
> >> regression from 2.6.35. The issue has been reported multiple times but no fix
> >> has emerged:
> 
> On Sat, Sep 4, 2010 at 12:21 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > NAK. You can't simply hide one bug by introducing a much bigger one.
> 
> Dude, it's a nasty regression from 2.6.35. What exactly are you NAK'ing here?
> 
> > As you have an affected machine, find which wait_for_vblank() needs to be
> > replaced with a msleep(20|50).
> 
> The attached patch fixes things here. I'm not a drm developer so I
> don't know if it makes technical sense.

Many thanks to you, Pekka: I also don't know if it makes technical sense,
but it solves the same issue for me, so I can at last use 2.6.36-rc on
this laptop.  I sure hope this or an equivalent makes it into -rc4.

Hugh

From 53e5840a6abb50f12f9d2b32efa2a472b203d52f Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@kernel.org>
Date: Sat, 4 Sep 2010 19:24:04 +0300
Subject: [PATCH] i915: Fix wrong resolution after boot problem

Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/gpu/drm/i915/intel_tv.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index d2029ef..7784ff8 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1231,7 +1231,6 @@ intel_tv_detect_type (struct intel_tv *intel_tv)
 	struct drm_encoder *encoder = &intel_tv->base.enc;
 	struct drm_device *dev = encoder->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
-	struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
 	unsigned long irqflags;
 	u32 tv_ctl, save_tv_ctl;
 	u32 tv_dac, save_tv_dac;
@@ -1268,11 +1267,11 @@ intel_tv_detect_type (struct intel_tv *intel_tv)
 		   DAC_C_0_7_V);
 	I915_WRITE(TV_CTL, tv_ctl);
 	I915_WRITE(TV_DAC, tv_dac);
-	intel_wait_for_vblank(dev, intel_crtc->pipe);
+	msleep(20);
 	tv_dac = I915_READ(TV_DAC);
 	I915_WRITE(TV_DAC, save_tv_dac);
 	I915_WRITE(TV_CTL, save_tv_ctl);
-	intel_wait_for_vblank(dev, intel_crtc->pipe);
+	msleep(20);
 	/*
 	 *  A B C
 	 *  0 1 1 Composite
-- 
1.6.3.3

  reply	other threads:[~2010-09-04 19:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-04  8:17 Pekka Enberg
2010-09-04  9:21 ` Chris Wilson
2010-09-04 16:29   ` Pekka Enberg
2010-09-04 19:54     ` Hugh Dickins [this message]
2010-09-04 20:42       ` Sven Joachim
2010-09-04 22:44         ` Sitsofe Wheeler
2010-09-05  7:58           ` Pekka Enberg
2010-09-05  9:37             ` Sitsofe Wheeler
2010-09-05  8:26           ` Fabio Comolli
2010-09-05  9:14             ` Sitsofe Wheeler
2010-09-05 10:13               ` Fabio Comolli
2010-09-05 10:21                 ` Fabio Comolli
2010-09-05 12:27                   ` Sitsofe Wheeler
2010-09-05 17:41                     ` Fabio Comolli
2010-09-05 16:11         ` Pekka Enberg
2010-09-05 16:23           ` Chris Wilson
2010-09-05 16:40             ` Pekka Enberg
2010-09-05 17:21               ` Chris Wilson
2010-09-05 17:26                 ` Pekka Enberg
2010-09-05 17:53                 ` Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.00.1009041244440.3044@sister.anvils \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@kernel.org \
    --cc=sitsofe@yahoo.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®