]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 May 2014 19:18:39 +0000 (21:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 May 2014 19:18:39 +0000 (21:18 +0200)
added patches:
drm-bochs-add-power-management-support.patch
drm-cirrus-add-power-management-support.patch
x86-64-build-fix-stack-protector-makefile-breakage-with-32-bit-userland.patch

queue-3.14/drm-bochs-add-power-management-support.patch [new file with mode: 0644]
queue-3.14/drm-cirrus-add-power-management-support.patch [new file with mode: 0644]
queue-3.14/series
queue-3.14/x86-64-build-fix-stack-protector-makefile-breakage-with-32-bit-userland.patch [new file with mode: 0644]

diff --git a/queue-3.14/drm-bochs-add-power-management-support.patch b/queue-3.14/drm-bochs-add-power-management-support.patch
new file mode 100644 (file)
index 0000000..9466618
--- /dev/null
@@ -0,0 +1,92 @@
+From b8ccd70f1363f7d4e49219dbc46ec973a14f49cd Mon Sep 17 00:00:00 2001
+From: Gerd Hoffmann <kraxel@redhat.com>
+Date: Mon, 14 Apr 2014 11:34:49 +0200
+Subject: drm: bochs: add power management support
+
+From: Gerd Hoffmann <kraxel@redhat.com>
+
+commit b8ccd70f1363f7d4e49219dbc46ec973a14f49cd upstream.
+
+bochs kms driver lacks power management support, thus
+the vga display doesn't work any more after S3 resume.
+
+Fix this by adding suspend and resume functions.
+
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/bochs/bochs.h     |    1 
+ drivers/gpu/drm/bochs/bochs_drv.c |   44 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+)
+
+--- a/drivers/gpu/drm/bochs/bochs.h
++++ b/drivers/gpu/drm/bochs/bochs.h
+@@ -1,5 +1,6 @@
+ #include <linux/io.h>
+ #include <linux/fb.h>
++#include <linux/console.h>
+ #include <drm/drmP.h>
+ #include <drm/drm_crtc.h>
+--- a/drivers/gpu/drm/bochs/bochs_drv.c
++++ b/drivers/gpu/drm/bochs/bochs_drv.c
+@@ -95,6 +95,49 @@ static struct drm_driver bochs_driver =
+ };
+ /* ---------------------------------------------------------------------- */
++/* pm interface                                                           */
++
++static int bochs_pm_suspend(struct device *dev)
++{
++      struct pci_dev *pdev = to_pci_dev(dev);
++      struct drm_device *drm_dev = pci_get_drvdata(pdev);
++      struct bochs_device *bochs = drm_dev->dev_private;
++
++      drm_kms_helper_poll_disable(drm_dev);
++
++      if (bochs->fb.initialized) {
++              console_lock();
++              fb_set_suspend(bochs->fb.helper.fbdev, 1);
++              console_unlock();
++      }
++
++      return 0;
++}
++
++static int bochs_pm_resume(struct device *dev)
++{
++      struct pci_dev *pdev = to_pci_dev(dev);
++      struct drm_device *drm_dev = pci_get_drvdata(pdev);
++      struct bochs_device *bochs = drm_dev->dev_private;
++
++      drm_helper_resume_force_mode(drm_dev);
++
++      if (bochs->fb.initialized) {
++              console_lock();
++              fb_set_suspend(bochs->fb.helper.fbdev, 0);
++              console_unlock();
++      }
++
++      drm_kms_helper_poll_enable(drm_dev);
++      return 0;
++}
++
++static const struct dev_pm_ops bochs_pm_ops = {
++      SET_SYSTEM_SLEEP_PM_OPS(bochs_pm_suspend,
++                              bochs_pm_resume)
++};
++
++/* ---------------------------------------------------------------------- */
+ /* pci interface                                                          */
+ static int bochs_kick_out_firmware_fb(struct pci_dev *pdev)
+@@ -155,6 +198,7 @@ static struct pci_driver bochs_pci_drive
+       .id_table =     bochs_pci_tbl,
+       .probe =        bochs_pci_probe,
+       .remove =       bochs_pci_remove,
++      .driver.pm =    &bochs_pm_ops,
+ };
+ /* ---------------------------------------------------------------------- */
diff --git a/queue-3.14/drm-cirrus-add-power-management-support.patch b/queue-3.14/drm-cirrus-add-power-management-support.patch
new file mode 100644 (file)
index 0000000..5a85714
--- /dev/null
@@ -0,0 +1,106 @@
+From 2f1e800799bf478494cec3573cd63eb34ca89c9d Mon Sep 17 00:00:00 2001
+From: Gerd Hoffmann <kraxel@redhat.com>
+Date: Mon, 14 Apr 2014 11:34:48 +0200
+Subject: drm: cirrus: add power management support
+
+From: Gerd Hoffmann <kraxel@redhat.com>
+
+commit 2f1e800799bf478494cec3573cd63eb34ca89c9d upstream.
+
+cirrus kms driver lacks power management support, thus
+the vga display doesn't work any more after S3 resume.
+
+Fix this by adding suspend and resume functions.
+Also make the mode_set function unblank the screen.
+
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/cirrus/cirrus_drv.c  |   42 +++++++++++++++++++++++++++++++++++
+ drivers/gpu/drm/cirrus/cirrus_mode.c |    3 ++
+ 2 files changed, 45 insertions(+)
+
+--- a/drivers/gpu/drm/cirrus/cirrus_drv.c
++++ b/drivers/gpu/drm/cirrus/cirrus_drv.c
+@@ -11,6 +11,7 @@
+ #include <linux/module.h>
+ #include <linux/console.h>
+ #include <drm/drmP.h>
++#include <drm/drm_crtc_helper.h>
+ #include "cirrus_drv.h"
+@@ -75,6 +76,41 @@ static void cirrus_pci_remove(struct pci
+       drm_put_dev(dev);
+ }
++static int cirrus_pm_suspend(struct device *dev)
++{
++      struct pci_dev *pdev = to_pci_dev(dev);
++      struct drm_device *drm_dev = pci_get_drvdata(pdev);
++      struct cirrus_device *cdev = drm_dev->dev_private;
++
++      drm_kms_helper_poll_disable(drm_dev);
++
++      if (cdev->mode_info.gfbdev) {
++              console_lock();
++              fb_set_suspend(cdev->mode_info.gfbdev->helper.fbdev, 1);
++              console_unlock();
++      }
++
++      return 0;
++}
++
++static int cirrus_pm_resume(struct device *dev)
++{
++      struct pci_dev *pdev = to_pci_dev(dev);
++      struct drm_device *drm_dev = pci_get_drvdata(pdev);
++      struct cirrus_device *cdev = drm_dev->dev_private;
++
++      drm_helper_resume_force_mode(drm_dev);
++
++      if (cdev->mode_info.gfbdev) {
++              console_lock();
++              fb_set_suspend(cdev->mode_info.gfbdev->helper.fbdev, 0);
++              console_unlock();
++      }
++
++      drm_kms_helper_poll_enable(drm_dev);
++      return 0;
++}
++
+ static const struct file_operations cirrus_driver_fops = {
+       .owner = THIS_MODULE,
+       .open = drm_open,
+@@ -103,11 +139,17 @@ static struct drm_driver driver = {
+       .dumb_destroy = drm_gem_dumb_destroy,
+ };
++static const struct dev_pm_ops cirrus_pm_ops = {
++      SET_SYSTEM_SLEEP_PM_OPS(cirrus_pm_suspend,
++                              cirrus_pm_resume)
++};
++
+ static struct pci_driver cirrus_pci_driver = {
+       .name = DRIVER_NAME,
+       .id_table = pciidlist,
+       .probe = cirrus_pci_probe,
+       .remove = cirrus_pci_remove,
++      .driver.pm = &cirrus_pm_ops,
+ };
+ static int __init cirrus_init(void)
+--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
++++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
+@@ -308,6 +308,9 @@ static int cirrus_crtc_mode_set(struct d
+       WREG_HDR(hdr);
+       cirrus_crtc_do_set_base(crtc, old_fb, x, y, 0);
++
++      /* Unblank (needed on S3 resume, vgabios doesn't do it then) */
++      outb(0x20, 0x3c0);
+       return 0;
+ }
index 375efc07f7102902616f230a621320eb9a8cba08..572338da70d5cae6b385be2d2b607ed8b3ecce9f 100644 (file)
@@ -78,3 +78,6 @@ cpufreq-loongson2_cpufreq-don-t-declare-local-variable-as-static.patch
 cpufreq-at32ap-don-t-declare-local-variable-as-static.patch
 acpi-processor-fix-failure-of-loading-acpi-cpufreq-driver.patch
 cpufreq-unicore32-fix-typo-issue-for-clk.patch
+drm-cirrus-add-power-management-support.patch
+drm-bochs-add-power-management-support.patch
+x86-64-build-fix-stack-protector-makefile-breakage-with-32-bit-userland.patch
diff --git a/queue-3.14/x86-64-build-fix-stack-protector-makefile-breakage-with-32-bit-userland.patch b/queue-3.14/x86-64-build-fix-stack-protector-makefile-breakage-with-32-bit-userland.patch
new file mode 100644 (file)
index 0000000..aa1cff1
--- /dev/null
@@ -0,0 +1,40 @@
+From 14262d67fe348018af368a07430fbc06eadeabb1 Mon Sep 17 00:00:00 2001
+From: George Spelvin <linux@horizon.com>
+Date: Wed, 7 May 2014 17:05:52 -0400
+Subject: x86-64, build: Fix stack protector Makefile breakage with 32-bit userland
+
+From: George Spelvin <linux@horizon.com>
+
+commit 14262d67fe348018af368a07430fbc06eadeabb1 upstream.
+
+If you are using a 64-bit kernel with 32-bit userland, then
+scripts/gcc-x86_64-has-stack-protector.sh invokes 32-bit gcc
+with -mcmodel=kernel, which produces:
+
+<stdin>:1:0: error: code model 'kernel' not supported in the 32 bit mode
+
+and trips the "broken compiler" test at arch/x86/Makefile:120.
+
+There are several places a fix is possible, but the following seems
+cleanest.  (But it's minimal; it would also be possible to factor
+out a bunch of stuff from the two branches of the if.)
+
+Signed-off-by: George Spelvin <linux@horizon.com>
+Link: http://lkml.kernel.org/r/20140507210552.7581.qmail@ns.horizon.com
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/Makefile |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -79,6 +79,7 @@ else
+         UTS_MACHINE := x86_64
+         CHECKFLAGS += -D__x86_64__ -m64
++        biarch := -m64
+         KBUILD_AFLAGS += -m64
+         KBUILD_CFLAGS += -m64