summaryrefslogtreecommitdiff
path: root/kernels
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-12-25 23:34:24 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-12-25 23:35:05 -0300
commit2252a05dec76f00266a73c62f14679a506c399b9 (patch)
tree652afd3b9a3bd00b63ad90edb5ac3f9c0b877407 /kernels
parent1a95fb6ede43c7fc5fb7a508cc423583d762cd71 (diff)
downloadabslibre-2252a05dec76f00266a73c62f14679a506c399b9.tar.gz
abslibre-2252a05dec76f00266a73c62f14679a506c399b9.tar.bz2
abslibre-2252a05dec76f00266a73c62f14679a506c399b9.zip
linux-libre-{pae,xen}-4.3.3_gnu-2: fix hangs on older intel hardware
Diffstat (limited to 'kernels')
-rw-r--r--kernels/linux-libre-pae/0001-disabling-primary-plane-in-the-noatomic-case.patch56
-rw-r--r--kernels/linux-libre-pae/PKGBUILD8
-rw-r--r--kernels/linux-libre-xen/0001-disabling-primary-plane-in-the-noatomic-case.patch56
-rw-r--r--kernels/linux-libre-xen/PKGBUILD8
4 files changed, 126 insertions, 2 deletions
diff --git a/kernels/linux-libre-pae/0001-disabling-primary-plane-in-the-noatomic-case.patch b/kernels/linux-libre-pae/0001-disabling-primary-plane-in-the-noatomic-case.patch
new file mode 100644
index 000000000..241b1012e
--- /dev/null
+++ b/kernels/linux-libre-pae/0001-disabling-primary-plane-in-the-noatomic-case.patch
@@ -0,0 +1,56 @@
+From 634b3a4a476e96816d5d6cd5bb9f8900a53f56ba Mon Sep 17 00:00:00 2001
+From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+Date: Mon, 23 Nov 2015 10:25:28 +0100
+Subject: drm/i915: Do a better job at disabling primary plane in the noatomic
+ case.
+
+When disable_noatomic is called plane_mask is not correct yet, and
+plane_state->visible = true is left as true after disabling the primary
+plane.
+
+Other planes are already disabled as part of crtc sanitization, only the
+primary is left active. But the plane_mask is not updated here. It gets
+updated during fb takeover in modeset_gem_init, or set to the new value
+on resume.
+
+This means that to disable the primary plane 1 << drm_plane_index(primary)
+needs to be used.
+
+Afterwards because the crtc is no longer active it's forbidden to keep
+plane_state->visible set, or a WARN_ON in
+intel_plane_atomic_calc_changes triggers. There are other code points
+that rely on accurate plane_state->visible too, so make sure the bool is
+cleared.
+
+The other planes are already disabled in intel_sanitize_crtc, so they
+don't have to be handled here.
+
+Cc: stable@vger.kernel.org #v4.3, v4.2?
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92655
+Tested-by: Tomas Mezzadra <tmezzadra@gmail.com>
+Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Link: http://patchwork.freedesktop.org/patch/msgid/5652DB88.9070208@linux.intel.com
+(cherry picked from commit 54a4196188eab82e6f0a5f05716626e9f18b8fb6)
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 22e86d2..62211ab 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -6309,9 +6309,11 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
+ if (to_intel_plane_state(crtc->primary->state)->visible) {
+ intel_crtc_wait_for_pending_flips(crtc);
+ intel_pre_disable_primary(crtc);
++
++ intel_crtc_disable_planes(crtc, 1 << drm_plane_index(crtc->primary));
++ to_intel_plane_state(crtc->primary->state)->visible = false;
+ }
+
+- intel_crtc_disable_planes(crtc, crtc->state->plane_mask);
+ dev_priv->display.crtc_disable(crtc);
+ intel_crtc->active = false;
+ intel_update_watermarks(crtc);
+--
+cgit v0.10.2
+
diff --git a/kernels/linux-libre-pae/PKGBUILD b/kernels/linux-libre-pae/PKGBUILD
index 84f029710..64c94b4de 100644
--- a/kernels/linux-libre-pae/PKGBUILD
+++ b/kernels/linux-libre-pae/PKGBUILD
@@ -18,7 +18,7 @@ _replacesoldmodules=() # '%' gets replaced with _kernelname
_srcname=linux-${_pkgbasever%-*}
_archpkgver=${_pkgver%-*}
pkgver=${_pkgver//-/_}
-pkgrel=1
+pkgrel=2
arch=('i686')
url="http://linux-libre.fsfla.org/"
license=('GPL2')
@@ -39,6 +39,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li
# standard config files for mkinitcpio ramdisk
'linux.preset'
'change-default-console-loglevel.patch'
+ '0001-disabling-primary-plane-in-the-noatomic-case.patch'
'0001-drm-radeon-Make-the-driver-load-without-the-firmwares.patch'
'0002-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch')
sha256sums=('1d280ae2730eb6c9b8c7e920cac2e8111c8db02c498db0c142860a84106cc169'
@@ -54,6 +55,7 @@ sha256sums=('1d280ae2730eb6c9b8c7e920cac2e8111c8db02c498db0c142860a84106cc169'
'147161191a8247c606abc8f0d2a5322ab94b5c69d9f2d89825209256d7935a6e'
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
+ 'abdd04bd6beecb7c961130a68d71e6332bd260462eeaa2f4f8e634de813dcc4d'
'61370b766e0c60b407c29d2c44b3f55fc352e9049c448bc8fcddb0efc53e42fc'
'3d3266bd082321dccf429cc2200d1a4d870d2031546f9f591b6dfbb698294808')
validpgpkeys=(
@@ -86,6 +88,10 @@ prepare() {
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"
+ # fix #46968
+ # hangs on older intel hardware
+ patch -Np1 -i "${srcdir}/0001-disabling-primary-plane-in-the-noatomic-case.patch"
+
# make the radeon driver load without the firmwares
# http://www.fsfla.org/pipermail/linux-libre/2015-August/003098.html
patch -p1 -i "${srcdir}/0001-drm-radeon-Make-the-driver-load-without-the-firmwares.patch"
diff --git a/kernels/linux-libre-xen/0001-disabling-primary-plane-in-the-noatomic-case.patch b/kernels/linux-libre-xen/0001-disabling-primary-plane-in-the-noatomic-case.patch
new file mode 100644
index 000000000..241b1012e
--- /dev/null
+++ b/kernels/linux-libre-xen/0001-disabling-primary-plane-in-the-noatomic-case.patch
@@ -0,0 +1,56 @@
+From 634b3a4a476e96816d5d6cd5bb9f8900a53f56ba Mon Sep 17 00:00:00 2001
+From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+Date: Mon, 23 Nov 2015 10:25:28 +0100
+Subject: drm/i915: Do a better job at disabling primary plane in the noatomic
+ case.
+
+When disable_noatomic is called plane_mask is not correct yet, and
+plane_state->visible = true is left as true after disabling the primary
+plane.
+
+Other planes are already disabled as part of crtc sanitization, only the
+primary is left active. But the plane_mask is not updated here. It gets
+updated during fb takeover in modeset_gem_init, or set to the new value
+on resume.
+
+This means that to disable the primary plane 1 << drm_plane_index(primary)
+needs to be used.
+
+Afterwards because the crtc is no longer active it's forbidden to keep
+plane_state->visible set, or a WARN_ON in
+intel_plane_atomic_calc_changes triggers. There are other code points
+that rely on accurate plane_state->visible too, so make sure the bool is
+cleared.
+
+The other planes are already disabled in intel_sanitize_crtc, so they
+don't have to be handled here.
+
+Cc: stable@vger.kernel.org #v4.3, v4.2?
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92655
+Tested-by: Tomas Mezzadra <tmezzadra@gmail.com>
+Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Link: http://patchwork.freedesktop.org/patch/msgid/5652DB88.9070208@linux.intel.com
+(cherry picked from commit 54a4196188eab82e6f0a5f05716626e9f18b8fb6)
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 22e86d2..62211ab 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -6309,9 +6309,11 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
+ if (to_intel_plane_state(crtc->primary->state)->visible) {
+ intel_crtc_wait_for_pending_flips(crtc);
+ intel_pre_disable_primary(crtc);
++
++ intel_crtc_disable_planes(crtc, 1 << drm_plane_index(crtc->primary));
++ to_intel_plane_state(crtc->primary->state)->visible = false;
+ }
+
+- intel_crtc_disable_planes(crtc, crtc->state->plane_mask);
+ dev_priv->display.crtc_disable(crtc);
+ intel_crtc->active = false;
+ intel_update_watermarks(crtc);
+--
+cgit v0.10.2
+
diff --git a/kernels/linux-libre-xen/PKGBUILD b/kernels/linux-libre-xen/PKGBUILD
index 76ae6f03d..5577669fb 100644
--- a/kernels/linux-libre-xen/PKGBUILD
+++ b/kernels/linux-libre-xen/PKGBUILD
@@ -18,7 +18,7 @@ _replacesoldmodules=() # '%' gets replaced with _kernelname
_srcname=linux-${_pkgbasever%-*}
_archpkgver=${_pkgver%-*}
pkgver=${_pkgver//-/_}
-pkgrel=1
+pkgrel=2
arch=('i686')
url="http://linux-libre.fsfla.org/"
license=('GPL2')
@@ -39,6 +39,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li
# standard config files for mkinitcpio ramdisk
'linux.preset'
'change-default-console-loglevel.patch'
+ '0001-disabling-primary-plane-in-the-noatomic-case.patch'
'0001-drm-radeon-Make-the-driver-load-without-the-firmwares.patch'
'0002-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch')
sha256sums=('1d280ae2730eb6c9b8c7e920cac2e8111c8db02c498db0c142860a84106cc169'
@@ -54,6 +55,7 @@ sha256sums=('1d280ae2730eb6c9b8c7e920cac2e8111c8db02c498db0c142860a84106cc169'
'7cb66e12ae7fc7fa8e97f6e090a05366ed5f038e62c6fe954f36ec4310e8a973'
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
+ 'abdd04bd6beecb7c961130a68d71e6332bd260462eeaa2f4f8e634de813dcc4d'
'61370b766e0c60b407c29d2c44b3f55fc352e9049c448bc8fcddb0efc53e42fc'
'3d3266bd082321dccf429cc2200d1a4d870d2031546f9f591b6dfbb698294808')
validpgpkeys=(
@@ -86,6 +88,10 @@ prepare() {
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"
+ # fix #46968
+ # hangs on older intel hardware
+ patch -Np1 -i "${srcdir}/0001-disabling-primary-plane-in-the-noatomic-case.patch"
+
# make the radeon driver load without the firmwares
# http://www.fsfla.org/pipermail/linux-libre/2015-August/003098.html
patch -p1 -i "${srcdir}/0001-drm-radeon-Make-the-driver-load-without-the-firmwares.patch"