public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: add quirk table for video backlight vendor mode
@ 2012-03-19  6:03 Lee, Chun-Yi
  2012-03-19 13:31 ` Matthew Garrett
  0 siblings, 1 reply; 3+ messages in thread
From: Lee, Chun-Yi @ 2012-03-19  6:03 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi, Lee, Chun-Yi, Thomas Renninger, Matthew Garrett

There have some acer laptop have broken _BCM implemenation, the AML code write value
to EC register but firmware didn't change brighenss.

But, the brightness control works on those machines with vendor mode. So, add quirk
table for video backlight vendor mode.

Tested on Acer Aspire 4736
Tested on Acer TravelMate 4750

Cc: Len Brown <lenb@kernel.org>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Matthew Garrett <mjg@redhat.com>
Tested-by: Pradeep Subrahmanion <subrahmanion.pradeep@gmail.com>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
 drivers/acpi/video_detect.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index f3f0fe7..acb15d6 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -132,6 +132,32 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
 	return AE_OK;
 }
 
+static int video_set_backlight_vendor(const struct dmi_system_id *d)
+{
+	acpi_video_support |= ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
+	return 0;
+}
+
+static const struct dmi_system_id video_vendor_dmi_table[] = {
+	{
+	 .callback = video_set_backlight_vendor,
+	 .ident = "Acer Aspire 4736",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4736"),
+		},
+	},
+	{
+	 .callback = video_set_backlight_vendor,
+	 .ident = "Acer TravelMate 4750",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
+		},
+	},
+	{}
+};
+
 /*
  * Returns the video capabilities of a specific ACPI graphics device
  *
@@ -164,6 +190,7 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
 		 *		ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
 		 *}
 		 */
+		dmi_check_system(video_vendor_dmi_table);
 	} else {
 		status = acpi_bus_get_device(graphics_handle, &tmp_dev);
 		if (ACPI_FAILURE(status)) {
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-20  3:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19  6:03 [PATCH] video: add quirk table for video backlight vendor mode Lee, Chun-Yi
2012-03-19 13:31 ` Matthew Garrett
2012-03-20  3:49   ` joeyli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox