]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Jun 2014 03:09:43 +0000 (20:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Jun 2014 03:09:43 +0000 (20:09 -0700)
added patches:
drm-i915-add-missing-n-to-uts_release-in-the-error_state.patch
drm-i915-dump-uts_release-into-the-error_state.patch
drm-i915-only-increment-the-user-pin-count-after-successfully-pinning-the-bo.patch
drm-i915-panel-invert-brightness-via-parameter.patch

queue-3.4/drm-i915-add-missing-n-to-uts_release-in-the-error_state.patch [new file with mode: 0644]
queue-3.4/drm-i915-dump-uts_release-into-the-error_state.patch [new file with mode: 0644]
queue-3.4/drm-i915-only-increment-the-user-pin-count-after-successfully-pinning-the-bo.patch [new file with mode: 0644]
queue-3.4/drm-i915-panel-invert-brightness-via-parameter.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/drm-i915-add-missing-n-to-uts_release-in-the-error_state.patch b/queue-3.4/drm-i915-add-missing-n-to-uts_release-in-the-error_state.patch
new file mode 100644 (file)
index 0000000..d7f05d3
--- /dev/null
@@ -0,0 +1,38 @@
+From 59bebf6c060bc75ebda8c37e205c690249588238 Mon Sep 17 00:00:00 2001
+From: Jani Nikula <jani.nikula@intel.com>
+Date: Thu, 14 Feb 2013 11:23:35 +0200
+Subject: drm/i915: add missing \n to UTS_RELEASE in the error_state
+
+From: Jani Nikula <jani.nikula@intel.com>
+
+commit fdfa175d0a9cfa2082ce24e67e284e5acbba452a upstream.
+
+Amending
+commit 4518f611ba21ba165ea3714055938a8984a44ff9
+Author: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date:   Wed Jan 23 16:16:35 2013 +0100
+
+    drm/i915: dump UTS_RELEASE into the error_state
+
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_debugfs.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/i915_debugfs.c
++++ b/drivers/gpu/drm/i915/i915_debugfs.c
+@@ -751,7 +751,7 @@ static int i915_error_state(struct seq_f
+       seq_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec,
+                  error->time.tv_usec);
+-      seq_printf(m, "Kernel: " UTS_RELEASE);
++      seq_printf(m, "Kernel: " UTS_RELEASE "\n");
+       seq_printf(m, "PCI ID: 0x%04x\n", dev->pci_device);
+       seq_printf(m, "EIR: 0x%08x\n", error->eir);
+       seq_printf(m, "PGTBL_ER: 0x%08x\n", error->pgtbl_er);
diff --git a/queue-3.4/drm-i915-dump-uts_release-into-the-error_state.patch b/queue-3.4/drm-i915-dump-uts_release-into-the-error_state.patch
new file mode 100644 (file)
index 0000000..6f279f5
--- /dev/null
@@ -0,0 +1,41 @@
+From f3825cc9679a5b7126c3d2bdf448b5453980d568 Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Wed, 23 Jan 2013 16:16:35 +0100
+Subject: drm/i915: dump UTS_RELEASE into the error_state
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit 4518f611ba21ba165ea3714055938a8984a44ff9 upstream.
+
+Useful for statistics or on overflowing bug reports to keep things all
+lined up.
+
+Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+[bwh: Backported to 3.2: adjust context]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_debugfs.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/gpu/drm/i915/i915_debugfs.c
++++ b/drivers/gpu/drm/i915/i915_debugfs.c
+@@ -30,6 +30,7 @@
+ #include <linux/debugfs.h>
+ #include <linux/slab.h>
+ #include <linux/export.h>
++#include <generated/utsrelease.h>
+ #include "drmP.h"
+ #include "drm.h"
+ #include "intel_drv.h"
+@@ -750,6 +751,7 @@ static int i915_error_state(struct seq_f
+       seq_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec,
+                  error->time.tv_usec);
++      seq_printf(m, "Kernel: " UTS_RELEASE);
+       seq_printf(m, "PCI ID: 0x%04x\n", dev->pci_device);
+       seq_printf(m, "EIR: 0x%08x\n", error->eir);
+       seq_printf(m, "PGTBL_ER: 0x%08x\n", error->pgtbl_er);
diff --git a/queue-3.4/drm-i915-only-increment-the-user-pin-count-after-successfully-pinning-the-bo.patch b/queue-3.4/drm-i915-only-increment-the-user-pin-count-after-successfully-pinning-the-bo.patch
new file mode 100644 (file)
index 0000000..d00d9e7
--- /dev/null
@@ -0,0 +1,45 @@
+From 87ae8984bd9ccca7782bc29776800dc6b8b3bb99 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed, 2 Jan 2013 10:31:22 +0000
+Subject: drm/i915; Only increment the user-pin-count after successfully pinning the bo
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 93be8788e648817d62fda33e2998eb6ca6ebf3a3 upstream.
+
+As along the error path we do not correct the user pin-count for the
+failure, we may end up with userspace believing that it has a pinned
+object at offset 0 (when interrupted by a signal for example).
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+[bwh: Backported to 3.2: adjust context]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_gem.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/i915/i915_gem.c
++++ b/drivers/gpu/drm/i915/i915_gem.c
+@@ -3411,14 +3411,15 @@ i915_gem_pin_ioctl(struct drm_device *de
+               goto out;
+       }
+-      obj->user_pin_count++;
+-      obj->pin_filp = file;
+-      if (obj->user_pin_count == 1) {
++      if (obj->user_pin_count == 0) {
+               ret = i915_gem_object_pin(obj, args->alignment, true);
+               if (ret)
+                       goto out;
+       }
++      obj->user_pin_count++;
++      obj->pin_filp = file;
++
+       /* XXX - flush the CPU caches for pinned objects
+        * as the X server doesn't manage domains yet
+        */
diff --git a/queue-3.4/drm-i915-panel-invert-brightness-via-parameter.patch b/queue-3.4/drm-i915-panel-invert-brightness-via-parameter.patch
new file mode 100644 (file)
index 0000000..3e965f1
--- /dev/null
@@ -0,0 +1,102 @@
+From f76bb07cf0f7dde553f141438261797f189ead5e Mon Sep 17 00:00:00 2001
+From: Carsten Emde <C.Emde@osadl.org>
+Date: Thu, 15 Mar 2012 15:56:25 +0100
+Subject: drm/i915: panel: invert brightness via parameter
+
+From: Carsten Emde <C.Emde@osadl.org>
+
+commit 7bd90909bbf9ce7c40e1da3d72b97b93839c188a upstream.
+
+Following the documentation of the Legacy Backlight Brightness (LBB)
+Register in the configuration space of some Intel PCI graphics adapters,
+setting the LBB register with the value 0x0 causes the backlight to be
+turned off, and 0xFF causes the backlight to be set to 100% intensity
+(http://download.intel.com/embedded/processors/Whitepaper/324567.pdf).
+The Acer Aspire 5734Z, however, turns the backlight off at 0xFF and sets
+it to maximum intensity at 0. In consequence, the screen of this systems
+becomes dark at an early boot stage which makes it unusable. The same
+inversion applies to the BLC_PWM_CTL I915 register. This problem was
+introduced in kernel version 2.6.38 when the PCI device of this system
+was first supported by the i915 KMS module.
+
+This patch adds a parameter to the i915 module to enable inversion of
+the brightness variable (i915.invert_brightness).
+
+Signed-off-by: Carsten Emde <C.Emde@osadl.org>
+Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Acked-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/kernel-parameters.txt |    9 +++++++++
+ drivers/gpu/drm/i915/intel_panel.c  |   17 +++++++++++++++++
+ 2 files changed, 26 insertions(+)
+
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -993,6 +993,15 @@ bytes respectively. Such letter suffixes
+       i8k.restricted  [HW] Allow controlling fans only if SYS_ADMIN
+                       capability is set.
++      i915.invert_brightness
++                      [DRM] Invert the sense of the variable that is used to
++                      set the brightness of the panel backlight. Normally a
++                      value of 0 indicates backlight switched off, and the
++                      maximum value sets the backlight to maximum brightness.
++                      If this parameter is specified, a value of 0 sets the
++                      backlight to maximum brightness, and the maximum value
++                      switches the backlight off.
++
+       icn=            [HW,ISDN]
+                       Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
+--- a/drivers/gpu/drm/i915/intel_panel.c
++++ b/drivers/gpu/drm/i915/intel_panel.c
+@@ -28,6 +28,7 @@
+  *      Chris Wilson <chris@chris-wilson.co.uk>
+  */
++#include <linux/moduleparam.h>
+ #include "intel_drv.h"
+ #define PCI_LBPC 0xf4 /* legacy/combination backlight modes */
+@@ -189,6 +190,20 @@ u32 intel_panel_get_max_backlight(struct
+       return max;
+ }
++static bool i915_panel_invert_brightness;
++MODULE_PARM_DESC(invert_brightness, "Invert backlight brightness, please "
++      "report PCI device ID, subsystem vendor and subsystem device ID "
++      "to dri-devel@lists.freedesktop.org, if your machine needs it. "
++      "It will then be included in an upcoming module version.");
++module_param_named(invert_brightness, i915_panel_invert_brightness, bool, 0600);
++static u32 intel_panel_compute_brightness(struct drm_device *dev, u32 val)
++{
++      if (i915_panel_invert_brightness)
++              return intel_panel_get_max_backlight(dev) - val;
++
++      return val;
++}
++
+ u32 intel_panel_get_backlight(struct drm_device *dev)
+ {
+       struct drm_i915_private *dev_priv = dev->dev_private;
+@@ -209,6 +224,7 @@ u32 intel_panel_get_backlight(struct drm
+               }
+       }
++      val = intel_panel_compute_brightness(dev, val);
+       DRM_DEBUG_DRIVER("get backlight PWM = %d\n", val);
+       return val;
+ }
+@@ -226,6 +242,7 @@ static void intel_panel_actually_set_bac
+       u32 tmp;
+       DRM_DEBUG_DRIVER("set backlight PWM = %d\n", level);
++      level = intel_panel_compute_brightness(dev, level);
+       if (HAS_PCH_SPLIT(dev))
+               return intel_pch_panel_set_backlight(dev, level);
index e2ec627bf0a1644dde26c7f912ded730ee896935..969f69312f0062186ed68f2f7bbb54c5058b505b 100644 (file)
@@ -164,3 +164,7 @@ drm-radeon-add-connector-table-for-mac-g4-silver.patch
 drm-nouveau-fix-init-with-agpgart-uninorth.patch
 drm-radeon-fix-typo-in-evergreen_mc_resume.patch
 drm-i915-close-race-between-processing-unpin-task-and-queueing-the-flip.patch
+drm-i915-only-increment-the-user-pin-count-after-successfully-pinning-the-bo.patch
+drm-i915-dump-uts_release-into-the-error_state.patch
+drm-i915-add-missing-n-to-uts_release-in-the-error_state.patch
+drm-i915-panel-invert-brightness-via-parameter.patch