[3.5.y.z,extended,stable] Patch "drm/i915: Fall back to bit banging mode for DVO transmitter" has been added to staging queue

Message ID 1368614535-27580-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques May 15, 2013, 10:42 a.m.
This is a note to let you know that I have just added a patch titled

    drm/i915: Fall back to bit banging mode for DVO transmitter

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From eaace7ad09e50340e45e1e591fbf9f05990411ef Mon Sep 17 00:00:00 2001
From: David Müller (ELSOFT AG) <d.mueller@elsoft.ch>
Date: Fri, 19 Apr 2013 10:41:50 +0200
Subject: [PATCH] drm/i915: Fall back to bit banging mode for DVO transmitter
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

commit e4bfff54ed3f5de88f5358504c78c2cb037813aa upstream.

As discussed in this thread
GMBUS based DVO transmitter detection seems to be unreliable which could
result in an unusable DVO port.

The attached patch fixes this by falling back to bit banging mode for
the time DVO transmitter detection is in progress.

Signed-off-by: David Müller <d.mueller@elsoft.ch>
Tested-by: David Müller <d.mueller@elsoft.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
 drivers/gpu/drm/i915/intel_dvo.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)



diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index 60ba50b9..35dc618 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -370,6 +370,7 @@  void intel_dvo_init(struct drm_device *dev)
 		const struct intel_dvo_device *dvo = &intel_dvo_devices[i];
 		struct i2c_adapter *i2c;
 		int gpio;
+		bool dvoinit;

 		/* Allow the I2C driver info to specify the GPIO to be used in
 		 * special cases, but otherwise default to what's defined
@@ -389,7 +390,17 @@  void intel_dvo_init(struct drm_device *dev)
 		i2c = intel_gmbus_get_adapter(dev_priv, gpio);

 		intel_dvo->dev = *dvo;
-		if (!dvo->dev_ops->init(&intel_dvo->dev, i2c))
+		/* GMBUS NAK handling seems to be unstable, hence let the
+		 * transmitter detection run in bit banging mode for now.
+		 */
+		intel_gmbus_force_bit(i2c, true);
+		dvoinit = dvo->dev_ops->init(&intel_dvo->dev, i2c);
+		intel_gmbus_force_bit(i2c, false);
+		if (!dvoinit)

 		intel_encoder->type = INTEL_OUTPUT_DVO;