aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin Chary <corentin.chary@gmail.com>2012-06-13 03:32:04 -0400
committerMatthew Garrett <mjg@redhat.com>2012-07-28 00:11:48 -0400
commit084940d5b101e9ca91a689eb5048151b14076839 (patch)
treea003682eaea8ebf1b8aaae6678dab31dbf904cf5
parent09d5677cf18f1b9f0e092eb83e9ba6a771c15c5c (diff)
acpi/video_detect: blacklist samsung x360
On Samsung X360, the BIOS will set a flag (VDRV) if the generic ACPI backlight device is used. This flag will definitively break the backlight interface (even the vendor interface) untill next reboot. It's why we should prevent video.ko from being used here and we can't rely on a later call to acpi_video_unregister(). Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
-rw-r--r--drivers/acpi/video_detect.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 942fa2a998f7..b728880ef10e 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -132,6 +132,33 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
132 return AE_OK; 132 return AE_OK;
133} 133}
134 134
135/* Force to use vendor driver when the ACPI device is known to be
136 * buggy */
137static int video_detect_force_vendor(const struct dmi_system_id *d)
138{
139 acpi_video_support |= ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
140 return 0;
141}
142
143static struct dmi_system_id video_detect_dmi_table[] = {
144 /* On Samsung X360, the BIOS will set a flag (VDRV) if generic
145 * ACPI backlight device is used. This flag will definitively break
146 * the backlight interface (even the vendor interface) untill next
147 * reboot. It's why we should prevent video.ko from being used here
148 * and we can't rely on a later call to acpi_video_unregister().
149 */
150 {
151 .callback = video_detect_force_vendor,
152 .ident = "X360",
153 .matches = {
154 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
155 DMI_MATCH(DMI_PRODUCT_NAME, "X360"),
156 DMI_MATCH(DMI_BOARD_NAME, "X360"),
157 },
158 },
159 { },
160};
161
135/* 162/*
136 * Returns the video capabilities of a specific ACPI graphics device 163 * Returns the video capabilities of a specific ACPI graphics device
137 * 164 *
@@ -164,6 +191,8 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
164 * ACPI_VIDEO_BACKLIGHT_DMI_VENDOR; 191 * ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
165 *} 192 *}
166 */ 193 */
194
195 dmi_check_system(video_detect_dmi_table);
167 } else { 196 } else {
168 status = acpi_bus_get_device(graphics_handle, &tmp_dev); 197 status = acpi_bus_get_device(graphics_handle, &tmp_dev);
169 if (ACPI_FAILURE(status)) { 198 if (ACPI_FAILURE(status)) {