mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: Lubos Kolouch <lubos.kolouch@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: i915 wakes from suspend to RAM with blank screen after commit cd9dde44f47501394b9f0715b6a36a92aa74c0d0
Date: Sat, 21 Jan 2012 12:53:00 -0800	[thread overview]
Message-ID: <86hazokcb7.fsf@sumi.keithp.com> (raw)
In-Reply-To: <20120121184453.GA2698@nbgentoo>


[-- Attachment #1.1: Type: text/plain, Size: 567 bytes --]

On Sat, 21 Jan 2012 19:44:53 +0100, Lubos Kolouch <lubos.kolouch@gmail.com> wrote:

> dmesg after boot - http://paste.pocoo.org/show/538343/
> dmesg after failed resume -  http://paste.pocoo.org/show/538344/

Ok, that's weird -- we're choosing a different display port link speed
on resume than at boot time. I have a theory that intel_dp_mode_fixup is
accidentally using the current bpp value when computing the values
needed for the new mode, and that this value may differ between boot and
resume.

Here's a patch to dump some debug info out to test this theory.


[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-drm-i915-Output-a-bit-of-debug-info-for-display-port.patch --]
[-- Type: text/x-diff, Size: 1411 bytes --]

>From 2b16db9fccc6927f3e09020144d5148acc025f58 Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp@keithp.com>
Date: Sat, 21 Jan 2012 12:48:38 -0800
Subject: [PATCH] drm/i915: Output a bit of debug info for display port
 bandwidth

Something weird is going on with link bandwidth testing; this may
help sort out what's wrong.

Signed-off-by: Keith Packard <keithp@keithp.com>
---
 drivers/gpu/drm/i915/intel_dp.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index db3b461..796d534 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -697,10 +697,13 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
 		mode->clock = intel_dp->panel_fixed_mode->clock;
 	}
 
+	DRM_DEBUG_KMS("using bpp %d to find link_bw and lane_count\n", bpp);
 	for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) {
 		for (clock = 0; clock <= max_clock; clock++) {
 			int link_avail = intel_dp_max_data_rate(intel_dp_link_clock(bws[clock]), lane_count);
 
+			DRM_DEBUG_KMS("lane_count %d clock %d link_avail %d link_required %d\n",
+				      lane_count, clock, link_avail, intel_dp_link_required(intel_dp, mode->clock, bpp));
 			if (intel_dp_link_required(intel_dp, mode->clock, bpp)
 					<= link_avail) {
 				intel_dp->link_bw = bws[clock];
-- 
1.7.8.3


[-- Attachment #3: Type: text/plain, Size: 130 bytes --]


Please try this on the broken kernel, sending along the dmesg output at
boot and resume time again.

-- 
keith.packard@intel.com

  reply	other threads:[~2012-01-21 20:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-21 10:32 Lubos Kolouch
2012-01-21 18:15 ` Keith Packard
2012-01-21 18:44   ` Lubos Kolouch
2012-01-21 20:53     ` Keith Packard [this message]
2012-01-22 10:29       ` Lubos Kolouch
2012-01-23  4:00         ` Keith Packard
2012-01-23  6:33           ` Lubos Kolouch
2012-01-26  7:37             ` Keith Packard
2012-01-27 10:14               ` Lubos Kolouch
2012-01-27 18:57                 ` Keith Packard
2012-01-31 22:39                   ` Joseph Salisbury
2012-02-07  2:31                     ` Keith Packard
2012-01-21 18:51   ` Lubos Kolouch

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=86hazokcb7.fsf@sumi.keithp.com \
    --to=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lubos.kolouch@gmail.com \
    /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

Powered by JetHome