]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Jul 2014 19:05:42 +0000 (12:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Jul 2014 19:05:42 +0000 (12:05 -0700)
added patches:
drm-i915-don-t-clobber-the-gtt-when-it-s-within-stolen-memory.patch
drm-radeon-dpm-reenabling-ss-on-cayman.patch
drm-radeon-fix-typo-in-ci_stop_dpm.patch
drm-radeon-fix-typo-in-golden-register-setup-on-evergreen.patch
drm-radeon-stop-poisoning-the-gart-tlb.patch

queue-3.14/drm-i915-don-t-clobber-the-gtt-when-it-s-within-stolen-memory.patch [new file with mode: 0644]
queue-3.14/drm-radeon-dpm-reenabling-ss-on-cayman.patch [new file with mode: 0644]
queue-3.14/drm-radeon-fix-typo-in-ci_stop_dpm.patch [new file with mode: 0644]
queue-3.14/drm-radeon-fix-typo-in-golden-register-setup-on-evergreen.patch [new file with mode: 0644]
queue-3.14/drm-radeon-stop-poisoning-the-gart-tlb.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/drm-i915-don-t-clobber-the-gtt-when-it-s-within-stolen-memory.patch b/queue-3.14/drm-i915-don-t-clobber-the-gtt-when-it-s-within-stolen-memory.patch
new file mode 100644 (file)
index 0000000..c95d90e
--- /dev/null
@@ -0,0 +1,95 @@
+From f1e1c2129b79cfdaf07bca37c5a10569fe021abe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
+Date: Thu, 5 Jun 2014 20:02:59 +0300
+Subject: drm/i915: Don't clobber the GTT when it's within stolen memory
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ville Syrjälä <ville.syrjala@linux.intel.com>
+
+commit f1e1c2129b79cfdaf07bca37c5a10569fe021abe upstream.
+
+On most gen2-4 platforms the GTT can be (or maybe always is?)
+inside the stolen memory region. If that's the case, reduce the
+size of the stolen memory appropriately to make make sure we
+don't clobber the GTT.
+
+v2: Deal with gen4 36 bit physical address
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80151
+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/i915_gem_stolen.c |   44 +++++++++++++++++++++++++++++++++
+ drivers/gpu/drm/i915/i915_reg.h        |    3 ++
+ 2 files changed, 47 insertions(+)
+
+--- a/drivers/gpu/drm/i915/i915_gem_stolen.c
++++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
+@@ -74,6 +74,50 @@ static unsigned long i915_stolen_to_phys
+       if (base == 0)
+               return 0;
++      /* make sure we don't clobber the GTT if it's within stolen memory */
++      if (INTEL_INFO(dev)->gen <= 4 && !IS_G33(dev) && !IS_G4X(dev)) {
++              struct {
++                      u32 start, end;
++              } stolen[2] = {
++                      { .start = base, .end = base + dev_priv->gtt.stolen_size, },
++                      { .start = base, .end = base + dev_priv->gtt.stolen_size, },
++              };
++              u64 gtt_start, gtt_end;
++
++              gtt_start = I915_READ(PGTBL_CTL);
++              if (IS_GEN4(dev))
++                      gtt_start = (gtt_start & PGTBL_ADDRESS_LO_MASK) |
++                              (gtt_start & PGTBL_ADDRESS_HI_MASK) << 28;
++              else
++                      gtt_start &= PGTBL_ADDRESS_LO_MASK;
++              gtt_end = gtt_start + gtt_total_entries(dev_priv->gtt) * 4;
++
++              if (gtt_start >= stolen[0].start && gtt_start < stolen[0].end)
++                      stolen[0].end = gtt_start;
++              if (gtt_end > stolen[1].start && gtt_end <= stolen[1].end)
++                      stolen[1].start = gtt_end;
++
++              /* pick the larger of the two chunks */
++              if (stolen[0].end - stolen[0].start >
++                  stolen[1].end - stolen[1].start) {
++                      base = stolen[0].start;
++                      dev_priv->gtt.stolen_size = stolen[0].end - stolen[0].start;
++              } else {
++                      base = stolen[1].start;
++                      dev_priv->gtt.stolen_size = stolen[1].end - stolen[1].start;
++              }
++
++              if (stolen[0].start != stolen[1].start ||
++                  stolen[0].end != stolen[1].end) {
++                      DRM_DEBUG_KMS("GTT within stolen memory at 0x%llx-0x%llx\n",
++                                    (unsigned long long) gtt_start,
++                                    (unsigned long long) gtt_end - 1);
++                      DRM_DEBUG_KMS("Stolen memory adjusted to 0x%x-0x%x\n",
++                                    base, base + (u32) dev_priv->gtt.stolen_size - 1);
++              }
++      }
++
++
+       /* Verify that nothing else uses this physical address. Stolen
+        * memory should be reserved by the BIOS and hidden from the
+        * kernel. So if the region is already marked as busy, something
+--- a/drivers/gpu/drm/i915/i915_reg.h
++++ b/drivers/gpu/drm/i915/i915_reg.h
+@@ -631,6 +631,9 @@
+ /*
+  * Instruction and interrupt control regs
+  */
++#define PGTBL_CTL     0x02020
++#define   PGTBL_ADDRESS_LO_MASK       0xfffff000 /* bits [31:12] */
++#define   PGTBL_ADDRESS_HI_MASK       0x000000f0 /* bits [35:32] (gen4) */
+ #define PGTBL_ER      0x02024
+ #define RENDER_RING_BASE      0x02000
+ #define BSD_RING_BASE         0x04000
diff --git a/queue-3.14/drm-radeon-dpm-reenabling-ss-on-cayman.patch b/queue-3.14/drm-radeon-dpm-reenabling-ss-on-cayman.patch
new file mode 100644 (file)
index 0000000..07428fd
--- /dev/null
@@ -0,0 +1,38 @@
+From 41959341ac7e33dd360c7a881d13566f9eca37b2 Mon Sep 17 00:00:00 2001
+From: Alexandre Demers <alexandre.f.demers@gmail.com>
+Date: Tue, 8 Jul 2014 22:27:36 -0400
+Subject: drm/radeon/dpm: Reenabling SS on Cayman
+
+From: Alexandre Demers <alexandre.f.demers@gmail.com>
+
+commit 41959341ac7e33dd360c7a881d13566f9eca37b2 upstream.
+
+It reverts commit c745fe611ca42295c9d91d8e305d27983e9132ef now that
+Cayman is stable since VDDCI fix. Spread spectrum was not the culprit.
+
+This depends on b0880e87c1fd038b84498944f52e52c3e86ebe59
+(drm/radeon/dpm: fix vddci setup typo on cayman).
+
+Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/rv770_dpm.c |    6 ------
+ 1 file changed, 6 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/rv770_dpm.c
++++ b/drivers/gpu/drm/radeon/rv770_dpm.c
+@@ -2332,12 +2332,6 @@ void rv770_get_engine_memory_ss(struct r
+       pi->mclk_ss = radeon_atombios_get_asic_ss_info(rdev, &ss,
+                                                      ASIC_INTERNAL_MEMORY_SS, 0);
+-      /* disable ss, causes hangs on some cayman boards */
+-      if (rdev->family == CHIP_CAYMAN) {
+-              pi->sclk_ss = false;
+-              pi->mclk_ss = false;
+-      }
+-
+       if (pi->sclk_ss || pi->mclk_ss)
+               pi->dynamic_ss = true;
+       else
diff --git a/queue-3.14/drm-radeon-fix-typo-in-ci_stop_dpm.patch b/queue-3.14/drm-radeon-fix-typo-in-ci_stop_dpm.patch
new file mode 100644 (file)
index 0000000..172cea2
--- /dev/null
@@ -0,0 +1,30 @@
+From ed96377132e564d797c48a5490fd46bed01c4273 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 8 Jul 2014 18:25:25 -0400
+Subject: drm/radeon: fix typo in ci_stop_dpm()
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit ed96377132e564d797c48a5490fd46bed01c4273 upstream.
+
+Need to use the RREG32_SMC() accessor since the register
+is an smc indirect index.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/ci_dpm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/ci_dpm.c
++++ b/drivers/gpu/drm/radeon/ci_dpm.c
+@@ -1161,7 +1161,7 @@ static int ci_stop_dpm(struct radeon_dev
+       tmp &= ~GLOBAL_PWRMGT_EN;
+       WREG32_SMC(GENERAL_PWRMGT, tmp);
+-      tmp = RREG32(SCLK_PWRMGT_CNTL);
++      tmp = RREG32_SMC(SCLK_PWRMGT_CNTL);
+       tmp &= ~DYNAMIC_PM_EN;
+       WREG32_SMC(SCLK_PWRMGT_CNTL, tmp);
diff --git a/queue-3.14/drm-radeon-fix-typo-in-golden-register-setup-on-evergreen.patch b/queue-3.14/drm-radeon-fix-typo-in-golden-register-setup-on-evergreen.patch
new file mode 100644 (file)
index 0000000..2445f40
--- /dev/null
@@ -0,0 +1,59 @@
+From 6abafb78f9881b4891baf74ab4e9f090ae45230e Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 7 Jul 2014 17:59:37 -0400
+Subject: drm/radeon: fix typo in golden register setup on evergreen
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 6abafb78f9881b4891baf74ab4e9f090ae45230e upstream.
+
+Fixes hangs on driver load on some cards.
+
+bug:
+https://bugs.freedesktop.org/show_bug.cgi?id=76998
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/evergreen.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/evergreen.c
++++ b/drivers/gpu/drm/radeon/evergreen.c
+@@ -189,7 +189,7 @@ static const u32 evergreen_golden_regist
+       0x8c1c, 0xffffffff, 0x00001010,
+       0x28350, 0xffffffff, 0x00000000,
+       0xa008, 0xffffffff, 0x00010000,
+-      0x5cc, 0xffffffff, 0x00000001,
++      0x5c4, 0xffffffff, 0x00000001,
+       0x9508, 0xffffffff, 0x00000002,
+       0x913c, 0x0000000f, 0x0000000a
+ };
+@@ -476,7 +476,7 @@ static const u32 cedar_golden_registers[
+       0x8c1c, 0xffffffff, 0x00001010,
+       0x28350, 0xffffffff, 0x00000000,
+       0xa008, 0xffffffff, 0x00010000,
+-      0x5cc, 0xffffffff, 0x00000001,
++      0x5c4, 0xffffffff, 0x00000001,
+       0x9508, 0xffffffff, 0x00000002
+ };
+@@ -635,7 +635,7 @@ static const u32 juniper_mgcg_init[] =
+ static const u32 supersumo_golden_registers[] =
+ {
+       0x5eb4, 0xffffffff, 0x00000002,
+-      0x5cc, 0xffffffff, 0x00000001,
++      0x5c4, 0xffffffff, 0x00000001,
+       0x7030, 0xffffffff, 0x00000011,
+       0x7c30, 0xffffffff, 0x00000011,
+       0x6104, 0x01000300, 0x00000000,
+@@ -719,7 +719,7 @@ static const u32 sumo_golden_registers[]
+ static const u32 wrestler_golden_registers[] =
+ {
+       0x5eb4, 0xffffffff, 0x00000002,
+-      0x5cc, 0xffffffff, 0x00000001,
++      0x5c4, 0xffffffff, 0x00000001,
+       0x7030, 0xffffffff, 0x00000011,
+       0x7c30, 0xffffffff, 0x00000011,
+       0x6104, 0x01000300, 0x00000000,
diff --git a/queue-3.14/drm-radeon-stop-poisoning-the-gart-tlb.patch b/queue-3.14/drm-radeon-stop-poisoning-the-gart-tlb.patch
new file mode 100644 (file)
index 0000000..af7e0a7
--- /dev/null
@@ -0,0 +1,43 @@
+From 0986c1a55ca64b44ee126a2f719a6e9f28cbe0ed Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Wed, 4 Jun 2014 15:29:56 +0200
+Subject: drm/radeon: stop poisoning the GART TLB
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christian König <christian.koenig@amd.com>
+
+commit 0986c1a55ca64b44ee126a2f719a6e9f28cbe0ed upstream.
+
+When we set the valid bit on invalid GART entries they are
+loaded into the TLB when an adjacent entry is loaded. This
+poisons the TLB with invalid entries which are sometimes
+not correctly removed on TLB flush.
+
+For stable inclusion the patch probably needs to be modified a bit.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/gpu/drm/radeon/rs600.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/rs600.c
++++ b/drivers/gpu/drm/radeon/rs600.c
+@@ -646,8 +646,10 @@ int rs600_gart_set_page(struct radeon_de
+               return -EINVAL;
+       }
+       addr = addr & 0xFFFFFFFFFFFFF000ULL;
+-      addr |= R600_PTE_VALID | R600_PTE_SYSTEM | R600_PTE_SNOOPED;
+-      addr |= R600_PTE_READABLE | R600_PTE_WRITEABLE;
++      if (addr != rdev->dummy_page.addr)
++              addr |= R600_PTE_VALID | R600_PTE_READABLE |
++                      R600_PTE_WRITEABLE;
++      addr |= R600_PTE_SYSTEM | R600_PTE_SNOOPED;
+       writeq(addr, ptr + (i * 8));
+       return 0;
+ }
index 276a97a8b28b120ac0b8d5be448b230150a0ed77..61906c4b1dac644ebee409d6987c06ab93a716b5 100644 (file)
@@ -45,3 +45,8 @@ ext4-clarify-error-count-warning-messages.patch
 ext4-clarify-ext4_error-message-in-ext4_mb_generate_buddy_error.patch
 ext4-disable-synchronous-transaction-batching-if-max_batch_time-0.patch
 ext4-fix-a-potential-deadlock-in-__ext4_es_shrink.patch
+drm-radeon-dpm-reenabling-ss-on-cayman.patch
+drm-radeon-fix-typo-in-ci_stop_dpm.patch
+drm-radeon-fix-typo-in-golden-register-setup-on-evergreen.patch
+drm-radeon-stop-poisoning-the-gart-tlb.patch
+drm-i915-don-t-clobber-the-gtt-when-it-s-within-stolen-memory.patch