[arch-commits] Commit in linux/trunk (PKGBUILD i915-gpu-finish.patch)
Tobias Powalowski
tpowa at archlinux.org
Thu Jan 12 14:51:45 UTC 2012
Date: Thursday, January 12, 2012 @ 09:51:45
Author: tpowa
Revision: 146527
add i915 gpu hang fix
Added:
linux/trunk/i915-gpu-finish.patch
Modified:
linux/trunk/PKGBUILD
-----------------------+
PKGBUILD | 16 +++++++++----
i915-gpu-finish.patch | 55 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 5 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-01-12 12:28:33 UTC (rev 146526)
+++ PKGBUILD 2012-01-12 14:51:45 UTC (rev 146527)
@@ -8,7 +8,7 @@
_kernelname=${pkgname#linux}
_basekernel=3.2
pkgver=${_basekernel}
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
url="http://www.kernel.org/"
license=('GPL2')
@@ -21,13 +21,15 @@
# standard config files for mkinitcpio ramdisk
"${pkgname}.preset"
'change-default-console-loglevel.patch'
- 'i915-fix-ghost-tv-output.patch')
+ 'i915-fix-ghost-tv-output.patch'
+ 'i915-gpu-finish.patch')
md5sums=('364066fa18767ec0ae5f4e4abcf9dc51'
- '4a6567864c49c5bb0f7d76d1a638912e'
- 'd9efdc5f471a4082caf2f61afede6302'
+ '4079a2ae3e2ee308e6db188f7bc04959'
+ '875b121a32a619e0ee262c541f330427'
'eb14dcfd80c00852ef81ded6e826826a'
'9d3c56a4b999c8bfbd4018089a62f662'
- '263725f20c0b9eb9c353040792d644e5')
+ '263725f20c0b9eb9c353040792d644e5'
+ '4cd79aa147825837dc8bc9f6b736c0a0')
build() {
cd "${srcdir}/linux-${_basekernel}"
@@ -38,6 +40,10 @@
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
+ # fix FS#27883
+ # drm/i915: Only clear the GPU domains upon a successful finish
+ patch -Np1 -i "${srcdir}/i915-gpu-finish.patch"
+
# Some chips detect a ghost TV output
# mailing list discussion: http://lists.freedesktop.org/archives/intel-gfx/2011-April/010371.html
# Arch Linux bug report: FS#19234
Added: i915-gpu-finish.patch
===================================================================
--- i915-gpu-finish.patch (rev 0)
+++ i915-gpu-finish.patch 2012-01-12 14:51:45 UTC (rev 146527)
@@ -0,0 +1,55 @@
+commit 389a55581e30607af0fcde6cdb4e54f189cf46cf
+Author: Chris Wilson <chris at chris-wilson.co.uk>
+Date: Tue Nov 29 15:12:16 2011 +0000
+
+ drm/i915: Only clear the GPU domains upon a successful finish
+
+ By clearing the GPU read domains before waiting upon the buffer, we run
+ the risk of the wait being interrupted and the domains prematurely
+ cleared. The next time we attempt to wait upon the buffer (after
+ userspace handles the signal), we believe that the buffer is idle and so
+ skip the wait.
+
+ There are a number of bugs across all generations which show signs of an
+ overly haste reuse of active buffers.
+
+ Such as:
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=29046
+ https://bugs.freedesktop.org/show_bug.cgi?id=35863
+ https://bugs.freedesktop.org/show_bug.cgi?id=38952
+ https://bugs.freedesktop.org/show_bug.cgi?id=40282
+ https://bugs.freedesktop.org/show_bug.cgi?id=41098
+ https://bugs.freedesktop.org/show_bug.cgi?id=41102
+ https://bugs.freedesktop.org/show_bug.cgi?id=41284
+ https://bugs.freedesktop.org/show_bug.cgi?id=42141
+
+ A couple of those pre-date i915_gem_object_finish_gpu(), so may be
+ unrelated (such as a wild write from a userspace command buffer), but
+ this does look like a convincing cause for most of those bugs.
+
+ Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
+ Cc: stable at kernel.org
+ Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
+ Reviewed-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
+
+diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
+index d560175..036bc58 100644
+--- a/drivers/gpu/drm/i915/i915_gem.c
++++ b/drivers/gpu/drm/i915/i915_gem.c
+@@ -3087,10 +3087,13 @@ i915_gem_object_finish_gpu(struct drm_i915_gem_object *obj)
+ return ret;
+ }
+
++ ret = i915_gem_object_wait_rendering(obj);
++ if (ret)
++ return ret;
++
+ /* Ensure that we invalidate the GPU's caches and TLBs. */
+ obj->base.read_domains &= ~I915_GEM_GPU_DOMAINS;
+-
+- return i915_gem_object_wait_rendering(obj);
++ return 0;
+ }
+
+ /**
More information about the arch-commits
mailing list