summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-07-04 09:59:08 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-07-04 09:59:08 +0000
commitd95e64f04961891906b3086676c6cfaeb5318b40 (patch)
tree8b43aed493aac193614bd67c0fc6125104e007c9 /sys
parentd17d1f7e29d856ee24a706fb998eea2874690543 (diff)
Fall back to bit banging mode for DVO transmitter detection
from linux 3.8.13
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915/intel_dvo.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/i915/intel_dvo.c b/sys/dev/pci/drm/i915/intel_dvo.c
index 1121144beb4..7d3d9431513 100644
--- a/sys/dev/pci/drm/i915/intel_dvo.c
+++ b/sys/dev/pci/drm/i915/intel_dvo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_dvo.c,v 1.1 2013/03/18 12:36:52 jsg Exp $ */
+/* $OpenBSD: intel_dvo.c,v 1.2 2013/07/04 09:59:07 jsg Exp $ */
/*
* Copyright 2006 Dave Airlie <airlied@linux.ie>
* Copyright © 2006-2007 Intel Corporation
@@ -483,6 +483,7 @@ intel_dvo_init(struct drm_device *dev)
const struct intel_dvo_device *dvo = &intel_dvo_devices[i];
struct i2c_controller *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
@@ -502,7 +503,17 @@ 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)
continue;
intel_encoder->type = INTEL_OUTPUT_DVO;