jwboyer pushed to kernel (f22). "Add patches to fix a few more i915 hangs/oopses"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Mar 25 21:36:52 UTC 2015


>From 069780434ca8d45adbf2b07bdf0ccc2becc1df09 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer at fedoraproject.org>
Date: Wed, 25 Mar 2015 17:36:04 -0400
Subject: Add patches to fix a few more i915 hangs/oopses


diff --git a/drm-i915-Fix-atomic-state-when-reusing-the-firmware-.patch b/drm-i915-Fix-atomic-state-when-reusing-the-firmware-.patch
new file mode 100644
index 0000000..56eddbe
--- /dev/null
+++ b/drm-i915-Fix-atomic-state-when-reusing-the-firmware-.patch
@@ -0,0 +1,61 @@
+From: Damien Lespiau <damien.lespiau at intel.com>
+Date: Thu, 5 Feb 2015 19:24:25 +0000
+Subject: [PATCH] drm/i915: Fix atomic state when reusing the firmware fb
+
+Right now, we get a warning when taking over the firmware fb:
+
+  [drm:drm_atomic_plane_check] FB set but no CRTC
+
+with the following backtrace:
+
+  [<ffffffffa010339d>] drm_atomic_check_only+0x35d/0x510 [drm]
+  [<ffffffffa0103567>] drm_atomic_commit+0x17/0x60 [drm]
+  [<ffffffffa00a6ccd>] drm_atomic_helper_plane_set_property+0x8d/0xd0 [drm_kms_helper]
+  [<ffffffffa00f1fed>] drm_mode_plane_set_obj_prop+0x2d/0x90 [drm]
+  [<ffffffffa00a8a1b>] restore_fbdev_mode+0x6b/0xf0 [drm_kms_helper]
+  [<ffffffffa00aa969>] drm_fb_helper_restore_fbdev_mode_unlocked+0x29/0x80 [drm_kms_helper]
+  [<ffffffffa00aa9e2>] drm_fb_helper_set_par+0x22/0x50 [drm_kms_helper]
+  [<ffffffffa050a71a>] intel_fbdev_set_par+0x1a/0x60 [i915]
+  [<ffffffff813ad444>] fbcon_init+0x4f4/0x580
+
+That's because we update the plane state with the fb from the firmware, but we
+never associate the plane to that CRTC.
+
+We don't quite have the full DRM take over from HW state just yet, so
+fake enough of the plane atomic state to pass the checks.
+
+v2: Fix the state on which we set the CRTC in the case we're sharing the
+    initial fb with another pipe. (Matt)
+
+Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
+Reviewed-by: Matt Roper <matthew.d.roper at intel.com>
+Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
+
+(Backported to 4.0-rc5)
+---
+ drivers/gpu/drm/i915/intel_display.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 177714a9d778..805b5e7b0058 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -2439,6 +2439,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
+ 		return;
+ 
+ 	if (intel_alloc_plane_obj(intel_crtc, plane_config)) {
++		intel_crtc->base.primary->state->crtc = &intel_crtc->base;
+ 		update_state_fb(intel_crtc->base.primary);
+ 		return;
+ 	}
+@@ -2469,6 +2470,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
+ 
+ 			drm_framebuffer_reference(c->primary->fb);
+ 			intel_crtc->base.primary->fb = c->primary->fb;
++			intel_crtc->base.primary->state->crtc = &intel_crtc->base;
+ 			obj->frontbuffer_bits |= INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe);
+ 			break;
+ 		}
+-- 
+2.1.0
+
diff --git a/drm-i915-Fixup-legacy-plane-crtc-link-for-initial-fb.patch b/drm-i915-Fixup-legacy-plane-crtc-link-for-initial-fb.patch
new file mode 100644
index 0000000..afacbd1
--- /dev/null
+++ b/drm-i915-Fixup-legacy-plane-crtc-link-for-initial-fb.patch
@@ -0,0 +1,54 @@
+From: Daniel Vetter <daniel.vetter at ffwll.ch>
+Date: Wed, 25 Mar 2015 18:30:38 +0100
+Subject: [PATCH] drm/i915: Fixup legacy plane->crtc link for initial fb config
+
+This is a very similar bug in the load detect code fixed in
+
+commit 9128b040eb774e04bc23777b005ace2b66ab2a85
+Author: Daniel Vetter <daniel.vetter at ffwll.ch>
+Date:   Tue Mar 3 17:31:21 2015 +0100
+
+    drm/i915: Fix modeset state confusion in the load detect code
+
+But this time around it was the initial fb code that forgot to update
+the plane->crtc pointer. Otherwise it's the exact same bug, with the
+exact same restrains (any set_config call/ioctl that doesn't disable
+the pipe papers over the bug for free, so fairly hard to hit in normal
+testing). So if you want the full explanation just go read that one
+over there - it's rather long ...
+
+Cc: Matt Roper <matthew.d.roper at intel.com>
+Cc: Linus Torvalds <torvalds at linux-foundation.org>
+Cc: Chris Wilson <chris at chris-wilson.co.uk>
+Cc: Josh Boyer <jwboyer at fedoraproject.org>
+Cc: Jani Nikula <jani.nikula at linux.intel.com>
+Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
+
+(Backported to 4.0-rc5)
+---
+ drivers/gpu/drm/i915/intel_display.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 805b5e7b0058..778e7fa41c17 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -2440,6 +2440,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
+ 
+ 	if (intel_alloc_plane_obj(intel_crtc, plane_config)) {
+ 		intel_crtc->base.primary->state->crtc = &intel_crtc->base;
++		intel_crtc->base.primary->crtc = &intel_crtc->base;
+ 		update_state_fb(intel_crtc->base.primary);
+ 		return;
+ 	}
+@@ -2471,6 +2472,7 @@ intel_find_plane_obj(struct intel_crtc *intel_crtc,
+ 			drm_framebuffer_reference(c->primary->fb);
+ 			intel_crtc->base.primary->fb = c->primary->fb;
+ 			intel_crtc->base.primary->state->crtc = &intel_crtc->base;
++			intel_crtc->base.primary->crtc = &intel_crtc->base;
+ 			obj->frontbuffer_bits |= INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe);
+ 			break;
+ 		}
+-- 
+2.1.0
+
diff --git a/kernel.spec b/kernel.spec
index 4e7a020..caa9958 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -40,7 +40,7 @@ Summary: The Linux kernel
 # For non-released -rc kernels, this will be appended after the rcX and
 # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
 #
-%global baserelease 1
+%global baserelease 4
 %global fedora_build %{baserelease}
 
 # base_sublevel is the kernel version we're starting with and patching
@@ -627,12 +627,12 @@ Patch26171: acpi-video-Add-force-native-backlight-quirk-for-Leno.patch
 
 Patch26172: drm-Fixup-racy-refcounting-in-plane_force_disable.patch
 Patch26173: drm-i915-Don-t-try-to-reference-the-fb-in-get_initia.patch
+Patch26175: drm-i915-Fix-atomic-state-when-reusing-the-firmware-.patch
+Patch26176: drm-i915-Fixup-legacy-plane-crtc-link-for-initial-fb.patch
 
 #rhbz 1203584
 Patch26174: Input-ALPS-fix-max-coordinates-for-v5-and-v7-protoco.patch
 
-#atch26175: intel.patch
-
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1371,12 +1371,12 @@ ApplyPatch acpi-video-Add-force-native-backlight-quirk-for-Leno.patch
 
 ApplyPatch drm-Fixup-racy-refcounting-in-plane_force_disable.patch
 ApplyPatch drm-i915-Don-t-try-to-reference-the-fb-in-get_initia.patch
+ApplyPatch drm-i915-Fix-atomic-state-when-reusing-the-firmware-.patch
+ApplyPatch drm-i915-Fixup-legacy-plane-crtc-link-for-initial-fb.patch
 
 #rhbz 1203584
 ApplyPatch Input-ALPS-fix-max-coordinates-for-v5-and-v7-protoco.patch
 
-#pplyPatch intel.patch
-
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2227,6 +2227,9 @@ fi
 #
 # 
 %changelog
+* Wed Mar 25 2015 Josh Boyer <jwboyer at fedoraproject.org> - 4.0.0-0.rc5.git2.4
+- Add patches to fix a few more i915 hangs/oopses
+
 * Wed Mar 25 2015 Josh Boyer <jwboyer at fedoraproject.org> - 4.0.0-0.rc5.git2.1
 - Linux v4.0-rc5-53-gc875f421097a
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/kernel.git/commit/?h=f22&id=069780434ca8d45adbf2b07bdf0ccc2becc1df09


More information about the scm-commits mailing list