From 9c247bf60f3a064e4e3167b842c84d5701fce05a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 9 May 2013 09:52:08 -0700 Subject: [PATCH] 3.4-stable patches added patches: drm-i915-add-no-lvds-quirk-for-fujitsu-esprimo-q900.patch drm-i915-fix-sdvo-connector-and-encoder-get_hw_state-functions.patch --- ...-lvds-quirk-for-fujitsu-esprimo-q900.patch | 39 ++++++++++ ...r-and-encoder-get_hw_state-functions.patch | 74 +++++++++++++++++++ queue-3.4/series | 2 + 3 files changed, 115 insertions(+) create mode 100644 queue-3.4/drm-i915-add-no-lvds-quirk-for-fujitsu-esprimo-q900.patch create mode 100644 queue-3.4/drm-i915-fix-sdvo-connector-and-encoder-get_hw_state-functions.patch diff --git a/queue-3.4/drm-i915-add-no-lvds-quirk-for-fujitsu-esprimo-q900.patch b/queue-3.4/drm-i915-add-no-lvds-quirk-for-fujitsu-esprimo-q900.patch new file mode 100644 index 00000000000..0e96b3e400a --- /dev/null +++ b/queue-3.4/drm-i915-add-no-lvds-quirk-for-fujitsu-esprimo-q900.patch @@ -0,0 +1,39 @@ +From 9e9dd0e889c76c786e8f2e164c825c3c06dea30c Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Wed, 3 Apr 2013 14:34:11 +0200 +Subject: drm/i915: Add no-lvds quirk for Fujitsu Esprimo Q900 + +From: Christian Lamparter + +commit 9e9dd0e889c76c786e8f2e164c825c3c06dea30c upstream. + +The "Mobile Sandy Bridge CPUs" in the Fujitsu Esprimo Q900 +mini desktop PCs are probably misleading the LVDS detection +code in intel_lvds_supported. Nothing is connected to the +LVDS ports in these systems. + +Signed-off-by: Christian Lamparter +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_lvds.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_lvds.c ++++ b/drivers/gpu/drm/i915/intel_lvds.c +@@ -793,6 +793,14 @@ static const struct dmi_system_id intel_ + DMI_MATCH(DMI_PRODUCT_NAME, "X7SPA-H"), + }, + }, ++ { ++ .callback = intel_no_lvds_dmi_callback, ++ .ident = "Fujitsu Esprimo Q900", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Q900"), ++ }, ++ }, + + { } /* terminating entry */ + }; 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 new file mode 100644 index 00000000000..8e3ec0ace6a --- /dev/null +++ b/queue-3.4/drm-i915-fix-sdvo-connector-and-encoder-get_hw_state-functions.patch @@ -0,0 +1,74 @@ +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 e16c18f4e02..546693a6afa 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -9,3 +9,5 @@ ipvs-ip_vs_sip_fill_param-bug-bad-check-of-return-value.patch 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 -- 2.47.3