--- /dev/null
+From 927a2f119e8235238a2fc64871051b16c9bdae75 Mon Sep 17 00:00:00 2001
+From: Sean Paul <seanpaul@chromium.org>
+Date: Fri, 23 Mar 2012 08:52:58 -0400
+Subject: drm/i915: Add lock on drm_helper_resume_force_mode
+
+From: Sean Paul <seanpaul@chromium.org>
+
+commit 927a2f119e8235238a2fc64871051b16c9bdae75 upstream.
+
+i915_drm_thaw was not locking the mode_config lock when calling
+drm_helper_resume_force_mode. When there were multiple wake sources,
+this caused FDI training failure on SNB which in turn corrupted the
+display.
+
+Signed-off-by: Sean Paul <seanpaul@chromium.org>
+Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_drv.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
+@@ -508,7 +508,9 @@ static int i915_drm_thaw(struct drm_devi
+ drm_irq_install(dev);
+
+ /* Resume the modeset for every activated CRTC */
++ mutex_lock(&dev->mode_config.mutex);
+ drm_helper_resume_force_mode(dev);
++ mutex_unlock(&dev->mode_config.mutex);
+
+ if (IS_IRONLAKE_M(dev))
+ ironlake_enable_rc6(dev);
--- /dev/null
+From 97effadb65ed08809e1720c8d3ee80b73a93665c Mon Sep 17 00:00:00 2001
+From: Anisse Astier <anisse@astier.eu>
+Date: Wed, 7 Mar 2012 18:36:35 +0100
+Subject: drm/i915: no-lvds quirk on MSI DC500
+
+From: Anisse Astier <anisse@astier.eu>
+
+commit 97effadb65ed08809e1720c8d3ee80b73a93665c upstream.
+
+This hardware doesn't have an LVDS, it's a desktop box. Fix incorrect
+LVDS detection.
+
+Signed-off-by: Anisse Astier <anisse@astier.eu>
+Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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
+@@ -739,6 +739,14 @@ static const struct dmi_system_id intel_
+ DMI_MATCH(DMI_BOARD_NAME, "AT5NM10T-I"),
+ },
+ },
++ {
++ .callback = intel_no_lvds_dmi_callback,
++ .ident = "MSI Wind Box DC500",
++ .matches = {
++ DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
++ DMI_MATCH(DMI_BOARD_NAME, "MS-7469"),
++ },
++ },
+
+ { } /* terminating entry */
+ };
--- /dev/null
+From 25e341cfc33d94435472983825163e97fe370a6c Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Sat, 24 Mar 2012 23:51:30 +0100
+Subject: drm/i915: quirk away broken OpRegion VBT
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit 25e341cfc33d94435472983825163e97fe370a6c upstream.
+
+Somehow the BIOS manages to screw things up when copying the VBT
+around, because the one we scrap from the VBIOS rom actually works.
+
+Tested-by: Markus Heinz <markus.heinz@uni-dortmund.de>
+Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
+Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28812
+Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_bios.c | 23 ++++++++++++++++++++++-
+ 1 file changed, 22 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/intel_bios.c
++++ b/drivers/gpu/drm/i915/intel_bios.c
+@@ -24,6 +24,7 @@
+ * Eric Anholt <eric@anholt.net>
+ *
+ */
++#include <linux/dmi.h>
+ #include <drm/drm_dp_helper.h>
+ #include "drmP.h"
+ #include "drm.h"
+@@ -621,6 +622,26 @@ init_vbt_defaults(struct drm_i915_privat
+ dev_priv->edp.bpp = 18;
+ }
+
++static int __init intel_no_opregion_vbt_callback(const struct dmi_system_id *id)
++{
++ DRM_DEBUG_KMS("Falling back to manually reading VBT from "
++ "VBIOS ROM for %s\n",
++ id->ident);
++ return 1;
++}
++
++static const struct dmi_system_id intel_no_opregion_vbt[] = {
++ {
++ .callback = intel_no_opregion_vbt_callback,
++ .ident = "ThinkCentre A57",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "97027RG"),
++ },
++ },
++ { }
++};
++
+ /**
+ * intel_parse_bios - find VBT and initialize settings from the BIOS
+ * @dev: DRM device
+@@ -641,7 +662,7 @@ intel_parse_bios(struct drm_device *dev)
+ init_vbt_defaults(dev_priv);
+
+ /* XXX Should this validation be moved to intel_opregion.c? */
+- if (dev_priv->opregion.vbt) {
++ if (!dmi_check_system(intel_no_opregion_vbt) && dev_priv->opregion.vbt) {
+ struct vbt_header *vbt = dev_priv->opregion.vbt;
+ if (memcmp(vbt->signature, "$VBT", 4) == 0) {
+ DRM_DEBUG_KMS("Using VBT from OpRegion: %20s\n",
--- /dev/null
+From f47166d2b0001fcb752b40c5a2d4db986dfbea68 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu, 22 Mar 2012 15:00:50 +0000
+Subject: drm/i915: Sanitize BIOS debugging bits from PIPECONF
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit f47166d2b0001fcb752b40c5a2d4db986dfbea68 upstream.
+
+Quoting the BSpec from time immemorial:
+
+ PIPEACONF, bits 28:27: Frame Start Delay (Debug)
+
+ Used to delay the frame start signal that is sent to the display planes.
+ Care must be taken to insure that there are enough lines during VBLANK
+ to support this setting.
+
+An instance of the BIOS leaving these bits set was found in the wild,
+where it caused our modesetting to go all squiffy and skewiff.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47271
+Reported-and-tested-by: Eva Wang <evawang@linpus.com>
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43012
+Reported-and-tested-by: Carl Richell <carl@system76.com>
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_reg.h | 1 +
+ drivers/gpu/drm/i915/intel_display.c | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+--- a/drivers/gpu/drm/i915/i915_reg.h
++++ b/drivers/gpu/drm/i915/i915_reg.h
+@@ -2313,6 +2313,7 @@
+ #define PIPECONF_DISABLE 0
+ #define PIPECONF_DOUBLE_WIDE (1<<30)
+ #define I965_PIPECONF_ACTIVE (1<<30)
++#define PIPECONF_FRAME_START_DELAY_MASK (3<<27)
+ #define PIPECONF_SINGLE_WIDE 0
+ #define PIPECONF_PIPE_UNLOCKED 0
+ #define PIPECONF_PIPE_LOCKED (1<<25)
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -7497,6 +7497,12 @@ static void intel_sanitize_modesetting(s
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ u32 reg, val;
+
++ /* Clear any frame start delays used for debugging left by the BIOS */
++ for_each_pipe(pipe) {
++ reg = PIPECONF(pipe);
++ I915_WRITE(reg, I915_READ(reg) & ~PIPECONF_FRAME_START_DELAY_MASK);
++ }
++
+ if (HAS_PCH_SPLIT(dev))
+ return;
+
--- /dev/null
+From b4db1e35ac59c144965f517bc575a0d75b60b03f Mon Sep 17 00:00:00 2001
+From: Jesse Barnes <jbarnes@virtuousgeek.org>
+Date: Tue, 20 Mar 2012 10:59:09 -0700
+Subject: drm/i915: treat src w & h as fixed point in sprite handling code
+
+From: Jesse Barnes <jbarnes@virtuousgeek.org>
+
+commit b4db1e35ac59c144965f517bc575a0d75b60b03f upstream.
+
+This was missed when we converted the source values to 16.16 fixed point.
+
+Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_sprite.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_sprite.c
++++ b/drivers/gpu/drm/i915/intel_sprite.c
+@@ -411,6 +411,9 @@ intel_update_plane(struct drm_plane *pla
+
+ old_obj = intel_plane->obj;
+
++ src_w = src_w >> 16;
++ src_h = src_h >> 16;
++
+ /* Pipe must be running... */
+ if (!(I915_READ(PIPECONF(pipe)) & PIPECONF_ENABLE))
+ return -EINVAL;
ath9k-fix-max-noise-floor-threshold.patch
drm-validate-requested-virtual-size-against-allocated-fb-size.patch
drm-radeon-kms-fix-fans-after-resume.patch
+drm-i915-no-lvds-quirk-on-msi-dc500.patch
+drm-i915-treat-src-w-h-as-fixed-point-in-sprite-handling-code.patch
+drm-i915-sanitize-bios-debugging-bits-from-pipeconf.patch
+drm-i915-add-lock-on-drm_helper_resume_force_mode.patch
+drm-i915-quirk-away-broken-opregion-vbt.patch