summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin M. Forbes <jforbes@fedoraproject.org>2017-05-30 09:34:55 -0500
committerJustin M. Forbes <jforbes@fedoraproject.org>2017-05-30 09:34:55 -0500
commita23d5b867453598c9c6c76e2b9fcb441d63fc2aa (patch)
tree3b453dd7a33f49cb3263e686d9c1eab72c996f1d
parentca0ee6d885fd6ae2604531b9ee00f9e785f7f75a (diff)
downloadkernel-a23d5b867453598c9c6c76e2b9fcb441d63fc2aa.tar.gz
kernel-a23d5b867453598c9c6c76e2b9fcb441d63fc2aa.tar.xz
kernel-a23d5b867453598c9c6c76e2b9fcb441d63fc2aa.zip
Fix for some broadwell issues
-rw-r--r--drm-i915-Do-not-drop-pagetables-when-empty.patch95
-rw-r--r--kernel.spec6
2 files changed, 101 insertions, 0 deletions
diff --git a/drm-i915-Do-not-drop-pagetables-when-empty.patch b/drm-i915-Do-not-drop-pagetables-when-empty.patch
new file mode 100644
index 000000000..8dcbc81bb
--- /dev/null
+++ b/drm-i915-Do-not-drop-pagetables-when-empty.patch
@@ -0,0 +1,95 @@
+From patchwork Fri May 26 08:29:06 2017
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+Subject: drm/i915: Do not drop pagetables when empty
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+X-Patchwork-Id: 158340
+Message-Id: <20170526082906.8982-1-daniel.vetter@ffwll.ch>
+To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
+Cc: "# v4 . 10+" <stable@vger.kernel.org>,
+ Daniel Vetter <daniel.vetter@intel.com>,
+ Mika Kuoppala <mika.kuoppala@intel.com>
+Date: Fri, 26 May 2017 10:29:06 +0200
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+This is the minimal backport for stable of the upstream commit:
+
+commit dd19674bacba227ae5d3ce680cbc5668198894dc
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed Feb 15 08:43:46 2017 +0000
+
+ drm/i915: Remove bitmap tracking for used-ptes
+
+Due to a race with the shrinker, when we try to allocate a pagetable, we
+may end up shrinking it instead. This comes as a nasty surprise as we
+try to dereference it to fill in the pagetable entries for the object.
+
+In linus/master this is fixed by pinning the pagetables prior to
+allocation, but that backport is roughly
+ drivers/gpu/drm/i915/i915_debugfs.c | 2 +-
+ drivers/gpu/drm/i915/i915_gem_evict.c | 12 +-
+ drivers/gpu/drm/i915/i915_gem_gtt.c | 2017 ++++++++++++++-------------------
+ drivers/gpu/drm/i915/i915_gem_gtt.h | 123 +-
+ drivers/gpu/drm/i915/i915_trace.h | 104 --
+ drivers/gpu/drm/i915/i915_vgpu.c | 9 +-
+ drivers/gpu/drm/i915/i915_vma.c | 9 -
+ drivers/gpu/drm/i915/intel_lrc.c | 4 +-
+ 8 files changed, 946 insertions(+), 1334 deletions(-)
+i.e. unsuitable for stable. Instead we neuter the code that tried to
+free the pagetables.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99295
+Fixes: 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page tables")
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Michel Thierry <michel.thierry@intel.com>
+Cc: Mika Kuoppala <mika.kuoppala@intel.com>
+Cc: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
+Cc: Michał Winiarski <michal.winiarski@intel.com>
+Cc: Daniel Vetter <daniel.vetter@intel.com>
+Cc: Jani Nikula <jani.nikula@linux.intel.com>
+Cc: intel-gfx@lists.freedesktop.org
+Cc: <stable@vger.kernel.org> # v4.10+
+Tested-by: Maël Lavault <mael.lavault@protonmail.com>
+Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
+---
+ drivers/gpu/drm/i915/i915_gem_gtt.c | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
+index 96e45a4d5441..4f581adf2fcf 100644
+--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
++++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
+@@ -755,10 +755,6 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm,
+ GEM_BUG_ON(pte_end > GEN8_PTES);
+
+ bitmap_clear(pt->used_ptes, pte, num_entries);
+- if (USES_FULL_PPGTT(vm->i915)) {
+- if (bitmap_empty(pt->used_ptes, GEN8_PTES))
+- return true;
+- }
+
+ pt_vaddr = kmap_px(pt);
+
+@@ -798,9 +794,6 @@ static bool gen8_ppgtt_clear_pd(struct i915_address_space *vm,
+ }
+ }
+
+- if (bitmap_empty(pd->used_pdes, I915_PDES))
+- return true;
+-
+ return false;
+ }
+
+@@ -829,9 +822,6 @@ static bool gen8_ppgtt_clear_pdp(struct i915_address_space *vm,
+
+ mark_tlbs_dirty(ppgtt);
+
+- if (bitmap_empty(pdp->used_pdpes, I915_PDPES_PER_PDP(dev_priv)))
+- return true;
+-
+ return false;
+ }
+
diff --git a/kernel.spec b/kernel.spec
index ad8ac18b6..11b2116a5 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -633,6 +633,9 @@ Patch870: 0001-sctp-do-not-inherit-ipv6_-mc-ac-fl-_list-from-parent.patch
#CVE-2017-9076 CVE-2017-9077 rhbz 1452688 1452744
Patch871: 0001-ipv6-dccp-do-not-inherit-ipv6_mc_list-from-parent.patch
+#Fix broadwell issues
+Patch675: drm-i915-Do-not-drop-pagetables-when-empty.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -2197,6 +2200,9 @@ fi
#
#
%changelog
+* Tue May 30 2017 Justin M. Forbes <jforbes@fedoraproject.org>
+- Fix for some broadwell issues
+
* Thu May 25 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.3-200
- Linux v4.11.3