All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Ivan Bulatovic <combuster@gmx.com>, linux-kernel@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, jbarnes@virtuousgeek.org,
	eric@anholt.net
Subject: Re: i915: 2.6.36-rc2 wrong resolution on gdm start
Date: Tue, 24 Aug 2010 08:49:42 +0100	[thread overview]
Message-ID: <8u3s8d$jcftu0@orsmga001.jf.intel.com> (raw)
In-Reply-To: <1282611655.2177.19.camel@localhost.localdomain>

On Tue, 24 Aug 2010 03:00:55 +0200, Ivan Bulatovic <combuster@gmx.com> wrote:
> While in init3, resolution is native, KMS works fine, no problems at
> all. As soon as gdm starts it seems that TV1 output is recognized as
> connected even if it isn't so resolution on VGA output is degraded from
> native 1280x1024 to 1024x768 on startup.

Interesting. I am chasing a spurious TV connection on SDVO that has been
present since time immemorial. How certain are you that you've never have a
false detection in earlier kernels? It may not have affected the choice of
outputs, except sporadically, but it should be recorded in the debug logs
with drm.debug=0x6.

Does this make any difference?

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c
b/drivers/gpu/drm/i915/intel_sdvo
index ea2f4ab..e7ff378 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1454,7 +1454,7 @@ intel_sdvo_detect(struct drm_connector *connector,
                return connector_status_unknown;
        if (intel_sdvo->is_tv) {
                /* add 30ms delay when the output type is SDVO-TV */
-               mdelay(30);
+               mdelay(100);
        }
        if (!intel_sdvo_read_response(intel_sdvo, &response, 2))
                return connector_status_unknown;

Or (more likely):

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c
b/drivers/gpu/drm/i915/intel_sdvo
index ea2f4ab..77c455b 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1216,8 +1216,8 @@ static int intel_sdvo_dpms(struct drm_encoder
*encoder, in
                temp = I915_READ(intel_sdvo->sdvo_reg);
                if ((temp & SDVO_ENABLE) == 0)
                        intel_sdvo_write_sdvox(intel_sdvo, temp |
SDVO_ENABLE);
-               for (i = 0; i < 2; i++)
-                       intel_wait_for_vblank(dev, intel_crtc->pipe);
+
+               msleep(100);
 
                status = intel_sdvo_get_trained_inputs(intel_sdvo,
                                                       &input1, &input2);

-- 
Chris Wilson, Intel Open Source Technology Centre

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Ivan Bulatovic <combuster@gmx.com>, linux-kernel@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: i915: 2.6.36-rc2 wrong resolution on gdm start
Date: Tue, 24 Aug 2010 08:49:42 +0100	[thread overview]
Message-ID: <8u3s8d$jcftu0@orsmga001.jf.intel.com> (raw)
In-Reply-To: <1282611655.2177.19.camel@localhost.localdomain>

On Tue, 24 Aug 2010 03:00:55 +0200, Ivan Bulatovic <combuster@gmx.com> wrote:
> While in init3, resolution is native, KMS works fine, no problems at
> all. As soon as gdm starts it seems that TV1 output is recognized as
> connected even if it isn't so resolution on VGA output is degraded from
> native 1280x1024 to 1024x768 on startup.

Interesting. I am chasing a spurious TV connection on SDVO that has been
present since time immemorial. How certain are you that you've never have a
false detection in earlier kernels? It may not have affected the choice of
outputs, except sporadically, but it should be recorded in the debug logs
with drm.debug=0x6.

Does this make any difference?

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c
b/drivers/gpu/drm/i915/intel_sdvo
index ea2f4ab..e7ff378 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1454,7 +1454,7 @@ intel_sdvo_detect(struct drm_connector *connector,
                return connector_status_unknown;
        if (intel_sdvo->is_tv) {
                /* add 30ms delay when the output type is SDVO-TV */
-               mdelay(30);
+               mdelay(100);
        }
        if (!intel_sdvo_read_response(intel_sdvo, &response, 2))
                return connector_status_unknown;

Or (more likely):

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c
b/drivers/gpu/drm/i915/intel_sdvo
index ea2f4ab..77c455b 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1216,8 +1216,8 @@ static int intel_sdvo_dpms(struct drm_encoder
*encoder, in
                temp = I915_READ(intel_sdvo->sdvo_reg);
                if ((temp & SDVO_ENABLE) == 0)
                        intel_sdvo_write_sdvox(intel_sdvo, temp |
SDVO_ENABLE);
-               for (i = 0; i < 2; i++)
-                       intel_wait_for_vblank(dev, intel_crtc->pipe);
+
+               msleep(100);
 
                status = intel_sdvo_get_trained_inputs(intel_sdvo,
                                                       &input1, &input2);

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2010-08-24  7:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24  1:00 i915: 2.6.36-rc2 wrong resolution on gdm start Ivan Bulatovic
2010-08-24  7:49 ` Chris Wilson [this message]
2010-08-24  7:49   ` Chris Wilson
2010-08-24  8:35   ` Ivan Bulatovic
2010-08-24  8:50     ` Chris Wilson
2010-08-24  8:50       ` Chris Wilson
2010-08-24  9:12       ` Ivan Bulatovic
2010-08-24  9:21         ` [PATCH] drm/i915/tv: Flush register writes before sleeping Chris Wilson
2010-08-24  9:21           ` Chris Wilson
2010-08-24 11:03           ` Ivan Bulatovic
2010-08-24 15:11             ` [PATCH] drm/i915/tv: After disabling the pipe, use wait_for_vblank_off() Chris Wilson
2010-08-24 21:08               ` Ivan Bulatovic
2010-08-24 21:52                 ` Chris Wilson
2010-08-24 23:00                   ` Ivan Bulatovic
2010-08-24 23:04                   ` Ivan Bulatovic
2010-08-24 23:05                     ` Jesse Barnes
2010-08-24 23:06                   ` Ivan Bulatovic
2010-08-25  8:15                     ` Sitsofe Wheeler
2010-08-25  9:17                       ` Ivan Bulatovic
2010-08-25  9:31                       ` Ivan Bulatovic
2010-08-25  9:51                     ` Kan-Ru Chen
2010-08-29 11:29         ` i915: 2.6.36-rc2 wrong resolution on gdm start Pekka Enberg
2010-08-29 13:37           ` Sitsofe Wheeler
2010-08-24  8:54 ` Pekka Enberg
2010-08-24  8:54   ` Pekka Enberg
2010-08-29 12:59 ` Maciej Rutecki
2010-08-29 12:59   ` Maciej Rutecki

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='8u3s8d$jcftu0@orsmga001.jf.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=combuster@gmx.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.