aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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)) {