rpms/kernel/F-13 drm-intel-acpi-populate-didl.patch, NONE, 1.1 kernel.spec, 1.1964, 1.1965
Matthew Garrett
mjg59 at fedoraproject.org
Thu Apr 1 14:40:04 UTC 2010
- Previous message: rpms/irrlicht/devel irrlicht-1.7.1-optflags.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 irrlicht.spec, 1.5, 1.6 sources, 1.4, 1.5
- Next message: rpms/kernel/devel drm-intel-acpi-populate-didl.patch, NONE, 1.1 kernel.spec, 1.1957, 1.1958
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mjg59
Update of /cvs/pkgs/rpms/kernel/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv30453
Modified Files:
kernel.spec
Added Files:
drm-intel-acpi-populate-didl.patch
Log Message:
* Thu Apr 01 2010 Matthew Garrett <mjg at redhat.com>
- drm-intel-acpi-populate-didl.patch: Fix brightness hotkeys on some machines
drm-intel-acpi-populate-didl.patch:
i915_opregion.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 47 insertions(+), 4 deletions(-)
--- NEW FILE drm-intel-acpi-populate-didl.patch ---
diff -up linux-2.6.33.noarch/drivers/gpu/drm/i915/i915_opregion.c.orig linux-2.6.33.noarch/drivers/gpu/drm/i915/i915_opregion.c
--- linux-2.6.33.noarch/drivers/gpu/drm/i915/i915_opregion.c.orig 2010-02-24 13:52:17.000000000 -0500
+++ linux-2.6.33.noarch/drivers/gpu/drm/i915/i915_opregion.c 2010-04-01 10:35:35.249121262 -0400
@@ -382,8 +382,54 @@ static void intel_didl_outputs(struct dr
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_opregion *opregion = &dev_priv->opregion;
struct drm_connector *connector;
+ acpi_handle handle;
+ struct acpi_device *acpi_dev, *acpi_cdev, *acpi_video_bus = NULL;
+ unsigned long long device_id;
+ acpi_status status;
int i = 0;
+ handle = DEVICE_ACPI_HANDLE(&dev->pdev->dev);
+ if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &acpi_dev)))
+ return;
+
+ if (acpi_is_video_device(acpi_dev))
+ acpi_video_bus = acpi_dev;
+ else {
+ list_for_each_entry(acpi_cdev, &acpi_dev->children, node) {
+ if (acpi_is_video_device(acpi_cdev)) {
+ acpi_video_bus = acpi_cdev;
+ break;
+ }
+ }
+ }
+
+ if (!acpi_video_bus)
+ goto blind_set;
+
+ list_for_each_entry(acpi_cdev, &acpi_video_bus->children, node) {
+ if (i >= 8) {
+ dev_printk (KERN_ERR, &dev->pdev->dev,
+ "More than 8 outputs detected\n");
+ return;
+ }
+ status = acpi_evaluate_integer(acpi_cdev->handle, "_ADR",
+ NULL, &device_id);
+ if (ACPI_SUCCESS(status)) {
+ if (!device_id)
+ goto blind_set;
+ opregion->acpi->didl[i] = (u32)(device_id & 0x0f0f);
+ i++;
+ }
+ }
+
+end:
+ /* If fewer than 8 outputs, the list must be null terminated */
+ if (i < 8)
+ opregion->acpi->didl[i] = 0;
+ return;
+
+blind_set:
+ i = 0;
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
int output_type = ACPI_OTHER_OUTPUT;
if (i >= 8) {
@@ -416,10 +462,7 @@ static void intel_didl_outputs(struct dr
opregion->acpi->didl[i] |= (1<<31) | output_type | i;
i++;
}
-
- /* If fewer than 8 outputs, the list must be null terminated */
- if (i < 8)
- opregion->acpi->didl[i] = 0;
+ goto end;
}
int intel_opregion_init(struct drm_device *dev, int resume)
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-13/kernel.spec,v
retrieving revision 1.1964
retrieving revision 1.1965
diff -u -p -r1.1964 -r1.1965
--- kernel.spec 31 Mar 2010 20:59:01 -0000 1.1964
+++ kernel.spec 1 Apr 2010 14:40:03 -0000 1.1965
@@ -719,7 +719,8 @@ Patch1819: drm-intel-big-hammer.patch
Patch1824: drm-intel-next.patch
# make sure the lvds comes back on lid open
Patch1825: drm-intel-make-lvds-work.patch
-#
+# make brightness hotkeys work on some machines
+Patch1826: drm-intel-acpi-populate-didl.patch
# linux1394 git patches
Patch2200: linux-2.6-firewire-git-update.patch
@@ -1366,6 +1367,7 @@ ApplyPatch drm-nouveau-updates.patch
ApplyPatch drm-intel-big-hammer.patch
ApplyOptionalPatch drm-intel-next.patch
ApplyPatch drm-intel-make-lvds-work.patch
+ApplyPatch drm-intel-acpi-populate-didl.patch
# linux1394 git patches
#ApplyPatch linux-2.6-firewire-git-update.patch
@@ -2052,6 +2054,9 @@ fi
# and build.
%changelog
+* Thu Apr 01 2010 Matthew Garrett <mjg at redhat.com>
+- drm-intel-acpi-populate-didl.patch: Fix brightness hotkeys on some machines
+
* Wed Mar 31 2010 Matthew Garrett <mjg at redhat.com>
- drm-intel-make-lvds-work.patch: Make sure LVDS gets turned back on
- Previous message: rpms/irrlicht/devel irrlicht-1.7.1-optflags.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 irrlicht.spec, 1.5, 1.6 sources, 1.4, 1.5
- Next message: rpms/kernel/devel drm-intel-acpi-populate-didl.patch, NONE, 1.1 kernel.spec, 1.1957, 1.1958
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list