[merged] mbp_nvidia_bl-check-that-the-backlight-control-functions.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     mbp_nvidia_bl: check that the backlight control functions
has been removed from the -mm tree.  Its filename was
     mbp_nvidia_bl-check-that-the-backlight-control-functions.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: mbp_nvidia_bl: check that the backlight control functions
From: Matthew Garrett <mjg@xxxxxxxxxx>

The SMI-based backlight control functionality may fail to work if the
system is running under EFI rather than BIOS.  Check that the hardware
responds as expected, and exit if it doesn't.

Signed-off-by: Matthew Garrett <mjg@xxxxxxxxxx>
Acked-by: Richard Purdie <richard.purdie@xxxxxxxxxxxxxxxxxxx>
Cc: Mourad De Clerck <mourad@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/video/backlight/mbp_nvidia_bl.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff -puN drivers/video/backlight/mbp_nvidia_bl.c~mbp_nvidia_bl-check-that-the-backlight-control-functions drivers/video/backlight/mbp_nvidia_bl.c
--- a/drivers/video/backlight/mbp_nvidia_bl.c~mbp_nvidia_bl-check-that-the-backlight-control-functions
+++ a/drivers/video/backlight/mbp_nvidia_bl.c
@@ -143,6 +143,7 @@ static int __devinit mb_bl_add(struct ac
 {
 	struct backlight_properties props;
 	struct pci_dev *host;
+	int intensity;
 
 	host = pci_get_bus_and_slot(0, 0);
 
@@ -163,6 +164,18 @@ static int __devinit mb_bl_add(struct ac
 		return -ENODEV;
 	}
 
+	/* Check that the hardware responds - this may not work under EFI */
+
+	intensity = hw_data->backlight_ops.get_brightness(NULL);
+
+	if (!intensity) {
+		hw_data->set_brightness(1);
+		if (!hw_data->backlight_ops.get_brightness(NULL))
+			return -ENODEV;
+
+		hw_data->set_brightness(0);
+	}
+
 	if (!request_region(hw_data->iostart, hw_data->iolen,
 			    "Macbook backlight"))
 		return -ENXIO;
_

Patches currently in -mm which might be from mjg@xxxxxxxxxx are

origin.patch
linux-next.patch
acerhdf-add-support-for-aspire-1410-bios-v13314.patch
backlight-add-backlight-type-fix.patch
backlight-add-backlight-type-fix-fix.patch
i915-add-native-backlight-control.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux