add i915 gpu hang fix
This commit is contained in:
parent
d8ed3147ff
commit
57eee52430
16
PKGBUILD
16
PKGBUILD
|
@ -8,7 +8,7 @@ pkgname=('linux' 'linux-headers' 'linux-docs') # Build stock -ARCH kernel
|
||||||
_kernelname=${pkgname#linux}
|
_kernelname=${pkgname#linux}
|
||||||
_basekernel=3.2
|
_basekernel=3.2
|
||||||
pkgver=${_basekernel}
|
pkgver=${_basekernel}
|
||||||
pkgrel=2
|
pkgrel=3
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="http://www.kernel.org/"
|
url="http://www.kernel.org/"
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
|
@ -21,13 +21,15 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.2.tar.xz"
|
||||||
# standard config files for mkinitcpio ramdisk
|
# standard config files for mkinitcpio ramdisk
|
||||||
"${pkgname}.preset"
|
"${pkgname}.preset"
|
||||||
'change-default-console-loglevel.patch'
|
'change-default-console-loglevel.patch'
|
||||||
'i915-fix-ghost-tv-output.patch')
|
'i915-fix-ghost-tv-output.patch'
|
||||||
|
'i915-gpu-finish.patch')
|
||||||
md5sums=('364066fa18767ec0ae5f4e4abcf9dc51'
|
md5sums=('364066fa18767ec0ae5f4e4abcf9dc51'
|
||||||
'4a6567864c49c5bb0f7d76d1a638912e'
|
'4079a2ae3e2ee308e6db188f7bc04959'
|
||||||
'd9efdc5f471a4082caf2f61afede6302'
|
'875b121a32a619e0ee262c541f330427'
|
||||||
'eb14dcfd80c00852ef81ded6e826826a'
|
'eb14dcfd80c00852ef81ded6e826826a'
|
||||||
'9d3c56a4b999c8bfbd4018089a62f662'
|
'9d3c56a4b999c8bfbd4018089a62f662'
|
||||||
'263725f20c0b9eb9c353040792d644e5')
|
'263725f20c0b9eb9c353040792d644e5'
|
||||||
|
'4cd79aa147825837dc8bc9f6b736c0a0')
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "${srcdir}/linux-${_basekernel}"
|
cd "${srcdir}/linux-${_basekernel}"
|
||||||
|
@ -38,6 +40,10 @@ build() {
|
||||||
# add latest fixes from stable queue, if needed
|
# add latest fixes from stable queue, if needed
|
||||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
# 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
|
# Some chips detect a ghost TV output
|
||||||
# mailing list discussion: http://lists.freedesktop.org/archives/intel-gfx/2011-April/010371.html
|
# mailing list discussion: http://lists.freedesktop.org/archives/intel-gfx/2011-April/010371.html
|
||||||
# Arch Linux bug report: FS#19234
|
# Arch Linux bug report: FS#19234
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
commit 389a55581e30607af0fcde6cdb4e54f189cf46cf
|
||||||
|
Author: Chris Wilson <chris@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@chris-wilson.co.uk>
|
||||||
|
Cc: stable@kernel.org
|
||||||
|
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
||||||
|
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
Loading…
Reference in New Issue