Skip to contentSkip to conversation

video: add quirk table for video backlight vendor mode

PATCH In review Lee, Chun-Yi 3 participants 3 messages Mar 19, 2012 – Mar 20, 2012 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: add quirk table for video backlight vendor mode

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

---
 drivers/acpi/video_detect.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
drivers/acpi/video_detect.c +27 -0
index f3f0fe7..acb15d6 100644
@@ -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)) {
Signature · 1 line
1.7.7
#1 lore raw
Quoted 24 lines · Chun-Yi
drivers/acpi/video_detect.c +16 -0
index f3f0fe7..acb15d6 100644
@@ -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"),
+		},
+	},
+	{

drivers/acpi/video_detect.c find_video(acpi_handle handle, u32 lvl, void *context, void **rv) · line 160

Quoted 10 lines
drivers/acpi/video_detect.c +10 -0
+	 .callback = video_set_backlight_vendor,
+	 .ident = "Acer TravelMate 4750",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
+		},
+	},
+	{}
+};
+

I think it would be neater to put this in the Acer driver and have it call unregister_acpi_video().

Signature · 1 line
Matthew Garrett | [email protected]
#2 lore raw

Hi Matthew,

於 一,2012-03-19 於 13:31 +0000,Matthew Garrett 提到:

Quoted 31 lines · Chun-Yi
Quoted 30 lines
drivers/acpi/video_detect.c +21 -0
index f3f0fe7..acb15d6 100644
@@ -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"),
Quoted 9 lines

drivers/acpi/video_detect.c find_video(acpi_handle handle, u32 lvl, void *context, void **rv) · line 160

Quoted 5 lines
drivers/acpi/video_detect.c +5 -0
+		},
+	},
+	{}
+};
+

I think it would be neater to put this in the Acer driver and have it call unregister_acpi_video().

Thanks for your review and suggestion.
I will send out a new patch for acer-wmi.

Thanks a lot!
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html