Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: intel-gfx@lists.freedesktop.org
Subject: Broken LVDS output at mode changes
Date: Wed, 28 Mar 2012 15:29:04 +0200	[thread overview]
Message-ID: <s5h4nt8zwf3.wl%tiwai@suse.de> (raw)

Hi,

we've encountered a broken LVDS output on some IVY/SNB machines when
the mode is changed (from/to native resolution).  When this happens,
the whole laptop panel gets half white and half black.  This doesn't
recover until the LVDS is turned off once.

And, there is no signficant difference between working and non-working
cases in the register dumps.  From the software POV, all looks sane.
So, we suspect this is rather specific to some panel hardware.

However, through debugging, I found that disabling LVDS at mode change
works around the problem.  A test patch is attached below.

My question now is: can this workaround have any serious drawback?
I thought of a longer blank time, but I didn't notice any difference
before and after the patch.

Or, any other suggestion as a saner fix?


thanks,

Takashi

---
---
 drivers/gpu/drm/i915/intel_lvds.c |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -398,6 +398,26 @@ out:
 	return true;
 }
 
+static int intel_disable_at_modeset_callback(const struct dmi_system_id *id)
+{
+	DRM_DEBUG_KMS("Disabling LVDS at modeset for %s\n", id->ident);
+	return 1;
+}
+
+/* Requires to disable LVDS for avoiding a broken screen at mode change */
+static const struct dmi_system_id intel_disable_at_modeset[] = {
+	{
+		.callback = intel_disable_at_modeset_callback,
+		.ident = "HP ProBook",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP ProBook"),
+		},
+	},
+
+	{ }	/* terminating entry */
+};
+
 static void intel_lvds_prepare(struct drm_encoder *encoder)
 {
 	struct intel_lvds *intel_lvds = to_intel_lvds(encoder);
@@ -407,7 +427,8 @@ static void intel_lvds_prepare(struct dr
 	 * 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) && intel_lvds->pfit_dirty) ||
+	    dmi_check_system(intel_disable_at_modeset))
 		intel_lvds_disable(intel_lvds);
 }

             reply	other threads:[~2012-03-28 13:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-28 13:29 Takashi Iwai [this message]
2012-03-29 12:16 ` Broken LVDS output at mode changes Daniel Vetter
2012-03-29 12:44   ` Chris Wilson
2012-03-29 12:51     ` Daniel Vetter
2012-03-29 12:55       ` Takashi Iwai
2012-03-29 15:07     ` Keith Packard
2012-03-29 16:12       ` Takashi Iwai
2012-03-29 16:57         ` Keith Packard
2012-03-29 18:02           ` Takashi Iwai
2012-03-30  4:27             ` Keith Packard
2012-03-30 16:56     ` 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=s5h4nt8zwf3.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=intel-gfx@lists.freedesktop.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