From: Greg Kroah-Hartman Date: Thu, 9 May 2013 19:19:09 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.9.2~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bb2b9bee0f5b4e87d177fe30cc6fa3dbae07753;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: drm-i915-fall-back-to-bit-banging-mode-for-dvo-transmitter-detection.patch --- diff --git a/queue-3.4/drm-i915-fall-back-to-bit-banging-mode-for-dvo-transmitter-detection.patch b/queue-3.4/drm-i915-fall-back-to-bit-banging-mode-for-dvo-transmitter-detection.patch new file mode 100644 index 00000000000..c70bd5b9970 --- /dev/null +++ b/queue-3.4/drm-i915-fall-back-to-bit-banging-mode-for-dvo-transmitter-detection.patch @@ -0,0 +1,55 @@ +From e4bfff54ed3f5de88f5358504c78c2cb037813aa Mon Sep 17 00:00:00 2001 +From: David Müller +Date: Fri, 19 Apr 2013 10:41:50 +0200 +Subject: drm/i915: Fall back to bit banging mode for DVO transmitter detection + +From: David Müller + +commit e4bfff54ed3f5de88f5358504c78c2cb037813aa upstream. + +As discussed in this thread +http://lists.freedesktop.org/archives/dri-devel/2013-April/037411.html +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 +Tested-by: David Müller +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_dvo.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +--- 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 *d + 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 *d + i2c = &dev_priv->gmbus[gpio].adapter; + + 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; diff --git a/queue-3.4/drm-i915-fix-sdvo-connector-and-encoder-get_hw_state-functions.patch b/queue-3.4/drm-i915-fix-sdvo-connector-and-encoder-get_hw_state-functions.patch deleted file mode 100644 index 8e3ec0ace6a..00000000000 --- a/queue-3.4/drm-i915-fix-sdvo-connector-and-encoder-get_hw_state-functions.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 7a7d1fb79fb581553f4830498045de774a9659f8 Mon Sep 17 00:00:00 2001 -From: Egbert Eich -Date: Thu, 4 Apr 2013 16:04:02 -0400 -Subject: drm/i915: Fix SDVO connector and encoder get_hw_state functions - -From: Egbert Eich - -commit 7a7d1fb79fb581553f4830498045de774a9659f8 upstream. - -The connector associated with the encoder is considered active when the -output associtated with this connector is active on the encoder. The -encoder itself is considered active when either there is an active -output on it or the respective SDVO channel is active. -Having active outputs when the SDVO channel is inactive seems to be -inconsistent: such states can be found when intel_modeset_setup_hw_state() -collects the hardware state set by the BIOS. -This inconsistency will be fixed in intel_sanitize_crtc() -(when intel_crtc_update_dpms() is called), this however only happens -when the encoder is associated with a crtc. - -This patch also reverts: - - commit bd6946e87a98fea11907b2a47368e13044458a35 - Author: Daniel Vetter - Date: Tue Apr 2 21:30:34 2013 +0200 - - drm/i915: Fix sdvo connector get_hw_state function - -Signed-off-by: Egbert Eich -Suggested-by: Daniel Vetter -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63031 -Signed-off-by: Daniel Vetter -Signed-off-by: Greg Kroah-Hartman - -diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c -index 298dc85..f6a9f4a 100644 ---- a/drivers/gpu/drm/i915/intel_sdvo.c -+++ b/drivers/gpu/drm/i915/intel_sdvo.c -@@ -1231,12 +1231,8 @@ static bool intel_sdvo_connector_get_hw_state(struct intel_connector *connector) - struct intel_sdvo_connector *intel_sdvo_connector = - to_intel_sdvo_connector(&connector->base); - struct intel_sdvo *intel_sdvo = intel_attached_sdvo(&connector->base); -- struct drm_i915_private *dev_priv = intel_sdvo->base.base.dev->dev_private; - u16 active_outputs; - -- if (!(I915_READ(intel_sdvo->sdvo_reg) & SDVO_ENABLE)) -- return false; -- - intel_sdvo_get_active_outputs(intel_sdvo, &active_outputs); - - if (active_outputs & intel_sdvo_connector->output_flag) -@@ -1251,11 +1247,13 @@ static bool intel_sdvo_get_hw_state(struct intel_encoder *encoder, - struct drm_device *dev = encoder->base.dev; - struct drm_i915_private *dev_priv = dev->dev_private; - struct intel_sdvo *intel_sdvo = to_intel_sdvo(&encoder->base); -+ u16 active_outputs; - u32 tmp; - - tmp = I915_READ(intel_sdvo->sdvo_reg); -+ intel_sdvo_get_active_outputs(intel_sdvo, &active_outputs); - -- if (!(tmp & SDVO_ENABLE)) -+ if (!(tmp & SDVO_ENABLE) && (active_outputs == 0)) - return false; - - if (HAS_PCH_CPT(dev)) -@@ -2746,7 +2744,6 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob) - struct intel_sdvo *intel_sdvo; - u32 hotplug_mask; - int i; -- - intel_sdvo = kzalloc(sizeof(struct intel_sdvo), GFP_KERNEL); - if (!intel_sdvo) - return false; diff --git a/queue-3.4/series b/queue-3.4/series index 546693a6afa..f2d7f7ececb 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -10,4 +10,4 @@ ext4-add-check-for-inodes_count-overflow-in-new-resize-ioctl.patch r8169-fix-8168evl-frame-padding.patch cpufreq-longhaul-disable-driver-by-default.patch drm-i915-add-no-lvds-quirk-for-fujitsu-esprimo-q900.patch -drm-i915-fix-sdvo-connector-and-encoder-get_hw_state-functions.patch +drm-i915-fall-back-to-bit-banging-mode-for-dvo-transmitter-detection.patch