From: Greg Kroah-Hartman Date: Thu, 5 Jun 2014 03:09:43 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.14.6~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=644a92f91674be9d109cf140db7b22626a8eb87e;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches 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 --- 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 index 00000000000..d7f05d34f1b --- /dev/null +++ b/queue-3.4/drm-i915-add-missing-n-to-uts_release-in-the-error_state.patch @@ -0,0 +1,38 @@ +From 59bebf6c060bc75ebda8c37e205c690249588238 Mon Sep 17 00:00:00 2001 +From: Jani Nikula +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 + +commit fdfa175d0a9cfa2082ce24e67e284e5acbba452a upstream. + +Amending +commit 4518f611ba21ba165ea3714055938a8984a44ff9 +Author: Daniel Vetter +Date: Wed Jan 23 16:16:35 2013 +0100 + + drm/i915: dump UTS_RELEASE into the error_state + +Signed-off-by: Jani Nikula +Reviewed-by: Chris Wilson +Signed-off-by: Daniel Vetter +Signed-off-by: Ben Hutchings +Cc: Weng Meiling +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..6f279f56645 --- /dev/null +++ b/queue-3.4/drm-i915-dump-uts_release-into-the-error_state.patch @@ -0,0 +1,41 @@ +From f3825cc9679a5b7126c3d2bdf448b5453980d568 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Wed, 23 Jan 2013 16:16:35 +0100 +Subject: drm/i915: dump UTS_RELEASE into the error_state + +From: Daniel Vetter + +commit 4518f611ba21ba165ea3714055938a8984a44ff9 upstream. + +Useful for statistics or on overflowing bug reports to keep things all +lined up. + +Reviewed-by: Chris Wilson +Signed-off-by: Daniel Vetter +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +Cc: Weng Meiling +Signed-off-by: Greg Kroah-Hartman + +--- + 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 + #include + #include ++#include + #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 index 00000000000..d00d9e74458 --- /dev/null +++ b/queue-3.4/drm-i915-only-increment-the-user-pin-count-after-successfully-pinning-the-bo.patch @@ -0,0 +1,45 @@ +From 87ae8984bd9ccca7782bc29776800dc6b8b3bb99 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +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 + +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 +Signed-off-by: Daniel Vetter +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +Cc: Weng Meiling +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..3e965f17674 --- /dev/null +++ b/queue-3.4/drm-i915-panel-invert-brightness-via-parameter.patch @@ -0,0 +1,102 @@ +From f76bb07cf0f7dde553f141438261797f189ead5e Mon Sep 17 00:00:00 2001 +From: Carsten Emde +Date: Thu, 15 Mar 2012 15:56:25 +0100 +Subject: drm/i915: panel: invert brightness via parameter + +From: Carsten Emde + +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 +Reviewed-by: Chris Wilson +Signed-off-by: Daniel Vetter +Acked-by: Jani Nikula +Signed-off-by: Ben Hutchings +Cc: Weng Meiling +Signed-off-by: Greg Kroah-Hartman + +--- + 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: [,[,[,]]] + +--- a/drivers/gpu/drm/i915/intel_panel.c ++++ b/drivers/gpu/drm/i915/intel_panel.c +@@ -28,6 +28,7 @@ + * Chris Wilson + */ + ++#include + #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); diff --git a/queue-3.4/series b/queue-3.4/series index e2ec627bf0a..969f69312f0 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -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