--- /dev/null
+From ece4a17d237a79f63fbfaf3f724a12b6d500555c Mon Sep 17 00:00:00 2001
+From: Jiri Kosina <jkosina@suse.cz>
+Date: Thu, 7 Aug 2014 16:29:53 +0200
+Subject: drm/i915: read HEAD register back in init_ring_common() to enforce ordering
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+commit ece4a17d237a79f63fbfaf3f724a12b6d500555c upstream.
+
+Withtout this, ring initialization fails reliabily during resume with
+
+ [drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head ffffff8804 tail 00000000 start 000e4000
+
+This is not a complete fix, but it is verified to make the ring
+initialization failures during resume much less likely.
+
+We were not able to root-cause this bug (likely HW-specific to Gen4 chips)
+yet. This is therefore used as a ducttape before problem is fully
+understood and proper fix created, so that people don't suffer from
+completely unusable systems in the meantime.
+
+The discussion and debugging is happening at
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=76554
+
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
+@@ -475,6 +475,9 @@ static int init_ring_common(struct intel
+ }
+ }
+
++ /* Enforce ordering by reading HEAD register back */
++ I915_READ_HEAD(ring);
++
+ /* Initialize the ring. This must happen _after_ we've cleared the ring
+ * registers with the above sequence (the readback of the HEAD registers
+ * also enforces ordering), otherwise the hw might lose the new ring
--- /dev/null
+From 0c78a44964db3d483b0c09a8236e0fe123aa9cfc Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 17 Jun 2014 16:01:08 -0400
+Subject: drm/radeon: enable bapm by default on desktop TN/RL boards
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 0c78a44964db3d483b0c09a8236e0fe123aa9cfc upstream.
+
+bapm enabled the GPU and CPU to share TDP headroom. It was
+disabled by default since some laptops hung when it was enabled
+in conjunction with dpm. It seems to be stable on desktop
+boards and fixes hangs on boot with dpm enabled on certain
+boards, so enable it by default on desktop boards.
+
+bug:
+https://bugs.freedesktop.org/show_bug.cgi?id=72921
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/trinity_dpm.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/trinity_dpm.c
++++ b/drivers/gpu/drm/radeon/trinity_dpm.c
+@@ -1877,7 +1877,15 @@ int trinity_dpm_init(struct radeon_devic
+ for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++)
+ pi->at[i] = TRINITY_AT_DFLT;
+
+- pi->enable_bapm = false;
++ /* There are stability issues reported on latops with
++ * bapm installed when switching between AC and battery
++ * power. At the same time, some desktop boards hang
++ * if it's not enabled and dpm is enabled.
++ */
++ if (rdev->flags & RADEON_IS_MOBILITY)
++ pi->enable_bapm = false;
++ else
++ pi->enable_bapm = true;
+ pi->enable_nbps_policy = true;
+ pi->enable_sclk_ds = true;
+ pi->enable_gfx_power_gating = true;
--- /dev/null
+From 730a336c33a3398d65896e8ee3ef9f5679fe30a9 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 21 Jul 2014 10:41:13 -0400
+Subject: drm/radeon/TN: only enable bapm on MSI systems
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 730a336c33a3398d65896e8ee3ef9f5679fe30a9 upstream.
+
+There still seem to be stability problems with other systems.
+
+Bug:
+https://bugs.freedesktop.org/show_bug.cgi?id=72921
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/trinity_dpm.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/trinity_dpm.c
++++ b/drivers/gpu/drm/radeon/trinity_dpm.c
+@@ -1877,15 +1877,16 @@ int trinity_dpm_init(struct radeon_devic
+ for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++)
+ pi->at[i] = TRINITY_AT_DFLT;
+
+- /* There are stability issues reported on latops with
+- * bapm installed when switching between AC and battery
+- * power. At the same time, some desktop boards hang
+- * if it's not enabled and dpm is enabled.
++ /* There are stability issues reported on with
++ * bapm enabled when switching between AC and battery
++ * power. At the same time, some MSI boards hang
++ * if it's not enabled and dpm is enabled. Just enable
++ * it for MSI boards right now.
+ */
+- if (rdev->flags & RADEON_IS_MOBILITY)
+- pi->enable_bapm = false;
+- else
++ if (rdev->pdev->subsystem_vendor == 0x1462)
+ pi->enable_bapm = true;
++ else
++ pi->enable_bapm = false;
+ pi->enable_nbps_policy = true;
+ pi->enable_sclk_ds = true;
+ pi->enable_gfx_power_gating = true;
drm-radeon-set-vm-base-addr-using-the-pfp-v2.patch
drm-radeon-atom-add-new-voltage-fetch-function-for-hawaii.patch
drm-radeon-tweak-accel_working2-query-for-hawaii.patch
+drm-i915-read-head-register-back-in-init_ring_common-to-enforce-ordering.patch
+drm-radeon-enable-bapm-by-default-on-desktop-tn-rl-boards.patch
+drm-radeon-tn-only-enable-bapm-on-msi-systems.patch