rpms/kernel/F-12 drm-intel-acpi-populate-didl.patch, NONE, 1.1 drm-intel-make-lvds-work.patch, NONE, 1.1 kernel.spec, 1.2054, 1.2055

Matthew Garrett mjg59 at fedoraproject.org
Thu Apr 1 15:06:39 UTC 2010


Author: mjg59

Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv2620

Modified Files:
	kernel.spec 
Added Files:
	drm-intel-acpi-populate-didl.patch 
	drm-intel-make-lvds-work.patch 
Log Message:
* Thu Apr 01 2010 Matthew Garrett <mjg at redhat.com>
- drm-intel-acpi-populate-didl.patch: Fix backlight hotkeys on some hardware
- drm-intel-make-lvds-work.patch: Fix screen not turning back on on lid open


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)

drm-intel-make-lvds-work.patch:
 intel_display.c |    2 --
 1 file changed, 2 deletions(-)

--- NEW FILE drm-intel-make-lvds-work.patch ---
diff -up linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c.old linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c
--- linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c.old	2010-03-31 15:51:11.798876290 -0400
+++ linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c	2010-03-31 16:01:18.342747791 -0400
@@ -3742,7 +3742,6 @@ struct drm_crtc *intel_get_load_detect_p
 void intel_release_load_detect_pipe(struct intel_output *intel_output, int dpms_mode)
 {
 	struct drm_encoder *encoder = &intel_output->enc;
-	struct drm_device *dev = encoder->dev;
 	struct drm_crtc *crtc = encoder->crtc;
 	struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
 	struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
@@ -3752,7 +3751,6 @@ void intel_release_load_detect_pipe(stru
 		intel_output->base.encoder = NULL;
 		intel_output->load_detect_temp = false;
 		crtc->enabled = drm_helper_crtc_in_use(crtc);
-		drm_helper_disable_unused_functions(dev);
 	}
 
 	/* Switch crtc and output back off if necessary */


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.2054
retrieving revision 1.2055
diff -u -p -r1.2054 -r1.2055
--- kernel.spec	30 Mar 2010 18:14:53 -0000	1.2054
+++ kernel.spec	1 Apr 2010 15:06:39 -0000	1.2055
@@ -700,7 +700,8 @@ Patch1820: drm-intel-no-tv-hotplug.patch
 #Patch1821: drm-page-flip.patch
 # intel drm is all merged upstream
 Patch1824: drm-intel-next.patch
-#Patch1825: drm-intel-pm.patch
+Patch1825: drm-intel-acpi-populate-didl.patch
+Patch1826: drm-intel-make-lvds-work.patch
 #Patch1827: linux-2.6-intel-agp-clear-gtt.patch
 Patch1828: drm-nouveau-g80-ctxprog.patch
 Patch1831: drm-nouveau-tvout-disable.patch
@@ -1388,6 +1389,8 @@ ApplyPatch drm-upgrayed-fixes.patch
 #ApplyPatch drm-intel-big-hammer.patch
 #ApplyPatch drm-intel-no-tv-hotplug.patch
 ApplyOptionalPatch drm-intel-next.patch
+ApplyPatch drm-intel-acpi-populate-didl.patch
+ApplyPatch drm-intel-make-lvds-work.patch
 ApplyPatch drm-nouveau-g80-ctxprog.patch
 ApplyPatch drm-nouveau-tvout-disable.patch
 ApplyPatch drm-nouveau-safetile-getparam.patch
@@ -2102,6 +2105,10 @@ fi
 # and build.
 
 %changelog
+* Thu Apr 01 2010 Matthew Garrett <mjg at redhat.com>
+- drm-intel-acpi-populate-didl.patch: Fix backlight hotkeys on some hardware
+- drm-intel-make-lvds-work.patch: Fix screen not turning back on on lid open
+
 * Tue Mar 30 2010 John W. Linville <linville at redhat.com> 2.6.32.10-94
 - Avoid null pointer dereference introduced by 'ssb: check for sprom' (#577463)
 



More information about the scm-commits mailing list