[kernel] r19921 - in dists/sid/linux/debian: . patches patches/bugfix/all
Ben Hutchings
benh at alioth.debian.org
Wed Mar 20 03:46:40 UTC 2013
Author: benh
Date: Wed Mar 20 03:46:39 2013
New Revision: 19921
Log:
[x86] i915: initialize CADL in opregion (Closes: #703271)
Added:
dists/sid/linux/debian/patches/bugfix/all/i915-initialize-CADL-in-opregion.patch
Modified:
dists/sid/linux/debian/changelog
dists/sid/linux/debian/patches/series
Modified: dists/sid/linux/debian/changelog
==============================================================================
--- dists/sid/linux/debian/changelog Tue Mar 19 13:45:46 2013 (r19920)
+++ dists/sid/linux/debian/changelog Wed Mar 20 03:46:39 2013 (r19921)
@@ -71,6 +71,7 @@
* kmsg_dump: Only dump kernel log in error cases (Closes: #703386)
- kexec: remove KMSG_DUMP_KEXEC
- kmsg_dump: don't run on non-error paths by default
+ * [x86] i915: initialize CADL in opregion (Closes: #703271)
-- Ben Hutchings <ben at decadent.org.uk> Wed, 27 Feb 2013 03:48:30 +0000
Added: dists/sid/linux/debian/patches/bugfix/all/i915-initialize-CADL-in-opregion.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux/debian/patches/bugfix/all/i915-initialize-CADL-in-opregion.patch Wed Mar 20 03:46:39 2013 (r19921)
@@ -0,0 +1,66 @@
+From: Lekensteyn <lekensteyn at gmail.com>
+Date: Tue, 26 Jun 2012 00:36:24 +0200
+Subject: i915: initialize CADL in opregion
+
+commit d627b62ff8d4d36761adbcd90ff143d79c94ab22 upstream.
+
+This is rather a hack to fix brightness hotkeys on a Clevo laptop. CADL is not
+used anywhere in the driver code at the moment, but it could be used in BIOS as
+is the case with the Clevo laptop.
+
+The Clevo B7130 requires the CADL field to contain at least the ID of
+the LCD device. If this field is empty, the ACPI methods that are called
+on pressing brightness / display switching hotkeys will not trigger a
+notification. As a result, it appears as no hotkey has been pressed.
+
+Reference: https://bugs.freedesktop.org/show_bug.cgi?id=45452
+Tested-by: Peter Wu <lekensteyn at gmail.com>
+Signed-off-by: Peter Wu <lekensteyn at gmail.com>
+Acked-by: Jesse Barnes <jbarnes at virtuousgeek.org>
+Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
+---
+ drivers/gpu/drm/i915/intel_opregion.c | 23 ++++++++++++++++++++++-
+ 1 file changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
+index 18bd0af..e27c170 100644
+--- a/drivers/gpu/drm/i915/intel_opregion.c
++++ b/drivers/gpu/drm/i915/intel_opregion.c
+@@ -427,6 +427,25 @@ blind_set:
+ goto end;
+ }
+
++static void intel_setup_cadls(struct drm_device *dev)
++{
++ struct drm_i915_private *dev_priv = dev->dev_private;
++ struct intel_opregion *opregion = &dev_priv->opregion;
++ int i = 0;
++ u32 disp_id;
++
++ /* Initialize the CADL field by duplicating the DIDL values.
++ * Technically, this is not always correct as display outputs may exist,
++ * but not active. This initialization is necessary for some Clevo
++ * laptops that check this field before processing the brightness and
++ * display switching hotkeys. Just like DIDL, CADL is NULL-terminated if
++ * there are less than eight devices. */
++ do {
++ disp_id = ioread32(&opregion->acpi->didl[i]);
++ iowrite32(disp_id, &opregion->acpi->cadl[i]);
++ } while (++i < 8 && disp_id != 0);
++}
++
+ void intel_opregion_init(struct drm_device *dev)
+ {
+ struct drm_i915_private *dev_priv = dev->dev_private;
+@@ -436,8 +455,10 @@ void intel_opregion_init(struct drm_device *dev)
+ return;
+
+ if (opregion->acpi) {
+- if (drm_core_check_feature(dev, DRIVER_MODESET))
++ if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+ intel_didl_outputs(dev);
++ intel_setup_cadls(dev);
++ }
+
+ /* Notify BIOS we are ready to handle ACPI video ext notifs.
+ * Right now, all the events are handled by the ACPI video module.
Modified: dists/sid/linux/debian/patches/series
==============================================================================
--- dists/sid/linux/debian/patches/series Tue Mar 19 13:45:46 2013 (r19920)
+++ dists/sid/linux/debian/patches/series Wed Mar 20 03:46:39 2013 (r19921)
@@ -618,3 +618,4 @@
debian/efi-autoload-efivars.patch
bugfix/all/kexec-remove-KMSG_DUMP_KEXEC.patch
bugfix/all/kmsg_dump-don-t-run-on-non-error-paths-by-default.patch
+bugfix/all/i915-initialize-CADL-in-opregion.patch
More information about the Kernel-svn-changes
mailing list