From: Greg Kroah-Hartman Date: Tue, 27 Jan 2015 18:09:46 +0000 (-0800) Subject: 3.18-stable patches X-Git-Tag: v3.10.67~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a58ac3f51b385d259c8c238d5942bfa71486aa8;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: drm-i915-ban-haswell-from-using-rcs-flips.patch drm-i915-fix-mutex-owner-inspection-race-under-debug_mutexes.patch --- diff --git a/queue-3.18/drm-i915-ban-haswell-from-using-rcs-flips.patch b/queue-3.18/drm-i915-ban-haswell-from-using-rcs-flips.patch new file mode 100644 index 00000000000..07778f67ee9 --- /dev/null +++ b/queue-3.18/drm-i915-ban-haswell-from-using-rcs-flips.patch @@ -0,0 +1,42 @@ +From 48bf5b2d00bfeb681f6500c626189c7cd2c964d2 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Sat, 27 Dec 2014 09:48:28 +0000 +Subject: drm/i915: Ban Haswell from using RCS flips + +From: Chris Wilson + +commit 48bf5b2d00bfeb681f6500c626189c7cd2c964d2 upstream. + +Like Ivybridge, we have reports that we get random hangs when flipping +with multiple pipes. Extend + +commit 2a92d5bca1999b69c78f3c3e97b5484985b094b9 +Author: Chris Wilson +Date: Tue Jul 8 10:40:29 2014 +0100 + + drm/i915: Disable RCS flips on Ivybridge + +to also apply to Haswell. + +Reported-and-tested-by: Scott Tsai +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87759 +Signed-off-by: Chris Wilson +Reviewed-by: Daniel Vetter +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_display.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -10019,7 +10019,7 @@ static int intel_crtc_page_flip(struct d + if (obj->tiling_mode != work->old_fb_obj->tiling_mode) + /* vlv: DISPLAY_FLIP fails to change tiling */ + ring = NULL; +- } else if (IS_IVYBRIDGE(dev)) { ++ } else if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev)) { + ring = &dev_priv->ring[BCS]; + } else if (INTEL_INFO(dev)->gen >= 7) { + ring = obj->ring; diff --git a/queue-3.18/drm-i915-fix-mutex-owner-inspection-race-under-debug_mutexes.patch b/queue-3.18/drm-i915-fix-mutex-owner-inspection-race-under-debug_mutexes.patch new file mode 100644 index 00000000000..85930787089 --- /dev/null +++ b/queue-3.18/drm-i915-fix-mutex-owner-inspection-race-under-debug_mutexes.patch @@ -0,0 +1,56 @@ +From 226e5ae9e5f9108beb0bde4ac69f68fe6210fed9 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Fri, 2 Jan 2015 09:47:10 +0000 +Subject: drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES + +From: Chris Wilson + +commit 226e5ae9e5f9108beb0bde4ac69f68fe6210fed9 upstream. + +If CONFIG_DEBUG_MUTEXES is set, the mutex->owner field is only cleared +if the mutex debugging is enabled which introduces a race in our +mutex_is_locked_by() - i.e. we may inspect the old owner value before it +is acquired by the new task. + +This is the root cause of this error: + +# diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c +# index 5cf6731..3ef3736 100644 +# --- a/kernel/locking/mutex-debug.c +# +++ b/kernel/locking/mutex-debug.c +# @@ -80,13 +80,13 @@ void debug_mutex_unlock(struct mutex *lock) +# DEBUG_LOCKS_WARN_ON(lock->owner != current); +# +# DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next); +# - mutex_clear_owner(lock); +# } +# +# /* +# * __mutex_slowpath_needs_to_unlock() is explicitly 0 for debug +# * mutexes so that we can do it here after we've verified state. +# */ +# + mutex_clear_owner(lock); +# atomic_set(&lock->count, 1); +# } + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87955 +Signed-off-by: Chris Wilson +Reviewed-by: Daniel Vetter +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_gem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -5144,7 +5144,7 @@ static bool mutex_is_locked_by(struct mu + if (!mutex_is_locked(mutex)) + return false; + +-#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES) ++#if defined(CONFIG_SMP) && !defined(CONFIG_DEBUG_MUTEXES) + return mutex->owner == task; + #else + /* Since UP may be pre-empted, we cannot assume that we own the lock */ diff --git a/queue-3.18/series b/queue-3.18/series index 3fa027f2a48..81277150a16 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -10,3 +10,5 @@ libata-prevent-hsm-state-change-race-between-isr-and-pio.patch alsa-usb-audio-add-mic-volume-fix-quirk-for-logitech-webcam-c210.patch workqueue-fix-subtle-pool-management-issue-which-can-stall-whole-worker_pool.patch scripts-recordmcount.pl-there-is-no-m32-gcc-option-on-super-h-anymore.patch +drm-i915-ban-haswell-from-using-rcs-flips.patch +drm-i915-fix-mutex-owner-inspection-race-under-debug_mutexes.patch