--- /dev/null
+From 89ba829e38bd500f438bc08af4229204c8ed7f35 Mon Sep 17 00:00:00 2001
+From: Jesse Barnes <jbarnes@virtuousgeek.org>
+Date: Tue, 22 May 2012 09:30:33 -0700
+Subject: drm/i915: always use RPNSWREQ for turbo change requests
+
+From: Jesse Barnes <jbarnes@virtuousgeek.org>
+
+commit 89ba829e38bd500f438bc08af4229204c8ed7f35 upstream.
+
+Media turbo requests can either use RPVSWREQ or RPNSWREQ to indicate
+what the interrupt handler should do. Since we only deal with the
+latter in our turbo code, make the media engine use that for turbo
+requests.
+
+Tested-by: Joe Bloggsian <joebloggsian@gmail.com>
+Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_display.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -8368,7 +8368,7 @@ void gen6_enable_rps(struct drm_i915_pri
+ I915_WRITE(GEN6_RP_IDLE_HYSTERSIS, 10);
+ I915_WRITE(GEN6_RP_CONTROL,
+ GEN6_RP_MEDIA_TURBO |
+- GEN6_RP_MEDIA_HW_MODE |
++ GEN6_RP_MEDIA_HW_NORMAL_MODE |
+ GEN6_RP_MEDIA_IS_GFX |
+ GEN6_RP_ENABLE |
+ GEN6_RP_UP_BUSY_AVG |
--- /dev/null
+From 17038de5f16569a25343cf68668f3b657eafb00e Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Mon, 16 Apr 2012 22:43:42 +0100
+Subject: drm/i915/dp: Flush any outstanding work to turn the VDD off
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 17038de5f16569a25343cf68668f3b657eafb00e upstream.
+
+As we may kick off a delayed workqueue task to switch of the VDD lines, we
+need to complete that task prior to turning off the panel (which itself
+depends upon VDD being off).
+
+v2: Don't cancel the outstanding work as this may trigger a deadlock
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Keith Packard <keithp@keithp.com>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_dp.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/i915/intel_dp.c
++++ b/drivers/gpu/drm/i915/intel_dp.c
+@@ -1149,6 +1149,7 @@ static void ironlake_edp_panel_off(struc
+ DRM_DEBUG_KMS("Turn eDP power off\n");
+
+ WARN(intel_dp->want_panel_vdd, "Cannot turn power off while VDD is on\n");
++ ironlake_panel_vdd_off_sync(intel_dp); /* finish any pending work */
+
+ pp = ironlake_get_pp_control(dev_priv);
+ pp &= ~(POWER_TARGET_ON | EDP_FORCE_VDD | PANEL_POWER_RESET | EDP_BLC_ENABLE);
--- /dev/null
+From 6cb49835da0426f69a2931bc2a0a8156344b0e41 Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Sun, 20 May 2012 17:14:50 +0200
+Subject: drm/i915: enable vdd when switching off the eDP panel
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit 6cb49835da0426f69a2931bc2a0a8156344b0e41 upstream.
+
+We have one bug report from a validation team that we get the eDP
+panel sequencing still somewhat wrong: We need to enable VDD while
+switching off the panel and backlight. Unfortunately that reporter
+seems to have fallen off the earth :(
+
+For another reporter this actually fixes a black panel issue because
+without this the backlight/panel gets confused and doesn't light up
+again.
+
+v2: I've forgotten to remove the vdd_off call in panel_off which is
+now bogus. This essentially reverts
+
+commit 17038de5f16569a25343cf68668f3b657eafb00e
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Mon Apr 16 22:43:42 2012 +0100
+
+ drm/i915/dp: Flush any outstanding work to turn the VDD off
+
+v3: the current panel_off code forces off the vdd power, too. Which is
+bogus and resulted in some funny warnings later on when we've tried to
+do aux channel communications with just the vdd forced on. Fix this,
+too.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46312
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43163
+Tested-by: Vincent Frentzel <zcecc22@gmail.com>
+Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++----------
+ 1 file changed, 8 insertions(+), 10 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_dp.c
++++ b/drivers/gpu/drm/i915/intel_dp.c
+@@ -1148,11 +1148,10 @@ static void ironlake_edp_panel_off(struc
+
+ DRM_DEBUG_KMS("Turn eDP power off\n");
+
+- WARN(intel_dp->want_panel_vdd, "Cannot turn power off while VDD is on\n");
+- ironlake_panel_vdd_off_sync(intel_dp); /* finish any pending work */
++ WARN(!intel_dp->want_panel_vdd, "Need VDD to turn off panel\n");
+
+ pp = ironlake_get_pp_control(dev_priv);
+- pp &= ~(POWER_TARGET_ON | EDP_FORCE_VDD | PANEL_POWER_RESET | EDP_BLC_ENABLE);
++ pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_BLC_ENABLE);
+ I915_WRITE(PCH_PP_CONTROL, pp);
+ POSTING_READ(PCH_PP_CONTROL);
+
+@@ -1260,18 +1259,16 @@ static void intel_dp_prepare(struct drm_
+ {
+ struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
+
++
++ /* Make sure the panel is off before trying to change the mode. But also
++ * ensure that we have vdd while we switch off the panel. */
++ ironlake_edp_panel_vdd_on(intel_dp);
+ ironlake_edp_backlight_off(intel_dp);
+ ironlake_edp_panel_off(intel_dp);
+
+- /* Wake up the sink first */
+- ironlake_edp_panel_vdd_on(intel_dp);
+ intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
+ intel_dp_link_down(intel_dp);
+ ironlake_edp_panel_vdd_off(intel_dp, false);
+-
+- /* Make sure the panel is off before trying to
+- * change the mode
+- */
+ }
+
+ static void intel_dp_commit(struct drm_encoder *encoder)
+@@ -1303,10 +1300,11 @@ intel_dp_dpms(struct drm_encoder *encode
+ uint32_t dp_reg = I915_READ(intel_dp->output_reg);
+
+ if (mode != DRM_MODE_DPMS_ON) {
++ /* Switching the panel off requires vdd. */
++ ironlake_edp_panel_vdd_on(intel_dp);
+ ironlake_edp_backlight_off(intel_dp);
+ ironlake_edp_panel_off(intel_dp);
+
+- ironlake_edp_panel_vdd_on(intel_dp);
+ intel_dp_sink_dpms(intel_dp, mode);
+ intel_dp_link_down(intel_dp);
+ ironlake_edp_panel_vdd_off(intel_dp, false);
acpi-battery-only-refresh-the-sysfs-files-when-pertinent-information-changes.patch
vfs-fix-proc-tid-fdinfo-fd-file-handling.patch
md-raid1-raid10-fix-problem-with-merge_bvec_fn.patch
+wl1251-fix-oops-on-early-interrupt.patch
+drm-i915-always-use-rpnswreq-for-turbo-change-requests.patch
+drm-i915-dp-flush-any-outstanding-work-to-turn-the-vdd-off.patch
+drm-i915-enable-vdd-when-switching-off-the-edp-panel.patch
--- /dev/null
+From f380f2c4a12e913356bd49f8790ec1063c4fe9f8 Mon Sep 17 00:00:00 2001
+From: Grazvydas Ignotas <notasas@gmail.com>
+Date: Fri, 18 May 2012 03:04:08 +0300
+Subject: wl1251: fix oops on early interrupt
+
+From: Grazvydas Ignotas <notasas@gmail.com>
+
+commit f380f2c4a12e913356bd49f8790ec1063c4fe9f8 upstream.
+
+This driver disables interrupt just after requesting it and enables it
+later, after interface is up. However currently there is a time window
+between request_irq() and disable_irq() where if interrupt arrives, the
+driver oopses because it's not yet ready to process it. This can be
+reproduced by inserting the module, associating and removing the module
+multiple times.
+
+Eliminate this race by setting IRQF_NOAUTOEN flag before request_irq().
+
+Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/wl1251/sdio.c | 2 +-
+ drivers/net/wireless/wl1251/spi.c | 3 +--
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/wireless/wl1251/sdio.c
++++ b/drivers/net/wireless/wl1251/sdio.c
+@@ -260,6 +260,7 @@ static int wl1251_sdio_probe(struct sdio
+ }
+
+ if (wl->irq) {
++ irq_set_status_flags(wl->irq, IRQ_NOAUTOEN);
+ ret = request_irq(wl->irq, wl1251_line_irq, 0, "wl1251", wl);
+ if (ret < 0) {
+ wl1251_error("request_irq() failed: %d", ret);
+@@ -267,7 +268,6 @@ static int wl1251_sdio_probe(struct sdio
+ }
+
+ irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING);
+- disable_irq(wl->irq);
+
+ wl1251_sdio_ops.enable_irq = wl1251_enable_line_irq;
+ wl1251_sdio_ops.disable_irq = wl1251_disable_line_irq;
+--- a/drivers/net/wireless/wl1251/spi.c
++++ b/drivers/net/wireless/wl1251/spi.c
+@@ -281,6 +281,7 @@ static int __devinit wl1251_spi_probe(st
+
+ wl->use_eeprom = pdata->use_eeprom;
+
++ irq_set_status_flags(wl->irq, IRQ_NOAUTOEN);
+ ret = request_irq(wl->irq, wl1251_irq, 0, DRIVER_NAME, wl);
+ if (ret < 0) {
+ wl1251_error("request_irq() failed: %d", ret);
+@@ -289,8 +290,6 @@ static int __devinit wl1251_spi_probe(st
+
+ irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING);
+
+- disable_irq(wl->irq);
+-
+ ret = wl1251_init_ieee80211(wl);
+ if (ret)
+ goto out_irq;