From: Corentin Chary <corentin.chary@gmail.com>
To: Len Brown <lenb@kernel.org>, Matthew Garrett <mjg59@srcf.ucam.org>
Cc: linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org,
Corentin Chary <corentin.chary@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] acpi/video_detect: blacklist samsung x360
Date: Wed, 13 Jun 2012 09:32:04 +0200 [thread overview]
Message-ID: <1339572727-24744-5-git-send-email-corentin.chary@gmail.com> (raw)
In-Reply-To: <1339572727-24744-1-git-send-email-corentin.chary@gmail.com>
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>
---
drivers/acpi/video_detect.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 942fa2a..b728880 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)
return AE_OK;
}
+/* Force to use vendor driver when the ACPI device is known to be
+ * buggy */
+static int video_detect_force_vendor(const struct dmi_system_id *d)
+{
+ acpi_video_support |= ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
+ return 0;
+}
+
+static struct dmi_system_id video_detect_dmi_table[] = {
+ /* On Samsung X360, the BIOS will set a flag (VDRV) if 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().
+ */
+ {
+ .callback = video_detect_force_vendor,
+ .ident = "X360",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "X360"),
+ DMI_MATCH(DMI_BOARD_NAME, "X360"),
+ },
+ },
+ { },
+};
+
/*
* Returns the video capabilities of a specific ACPI graphics device
*
@@ -164,6 +191,8 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
* ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
*}
*/
+
+ dmi_check_system(video_detect_dmi_table);
} else {
status = acpi_bus_get_device(graphics_handle, &tmp_dev);
if (ACPI_FAILURE(status)) {
--
1.7.9.5
next prev parent reply other threads:[~2012-06-13 7:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 7:32 [PATCH 0/7] platform-drivers-x86: backlight, samsung and asus Corentin Chary
2012-06-13 7:32 ` [PATCH 1/7] acpi: add a way to promote/demote vendor backlight drivers Corentin Chary
2012-06-26 22:19 ` Mattia Dongili
2012-06-29 12:19 ` Corentin Chary
2012-06-13 7:32 ` [PATCH 2/7] drivers-platform-x86: use acpi_video_dmi_promote_vendor() Corentin Chary
2012-06-14 9:58 ` joeyli
2012-06-14 10:54 ` Corentin Chary
2012-06-14 11:04 ` Corentin Chary
2012-06-14 12:53 ` joeyli
2012-06-14 20:02 ` Seth Forshee
2012-06-13 7:32 ` [PATCH 3/7] samsung-laptop: X360 ACPI backlight device is broken Corentin Chary
2012-06-13 7:32 ` Corentin Chary [this message]
2012-06-13 7:32 ` [PATCH 5/7] samsung-laptop: support R40/R41 Corentin Chary
2012-06-13 7:32 ` [PATCH 6/7] asus-wmi: control backlight power through WMI, not ACPI Corentin Chary
2012-06-14 11:05 ` Corentin Chary
2012-06-13 7:32 ` [PATCH 7/7] asus-wmi: enable resume on lid open Corentin Chary
2012-06-26 18:42 ` [PATCH 0/7] platform-drivers-x86: backlight, samsung and asus Matthew Garrett
2012-06-29 12:16 ` Corentin Chary
2012-07-16 5:45 ` Corentin Chary
2012-07-23 13:35 ` Matthew Garrett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339572727-24744-5-git-send-email-corentin.chary@gmail.com \
--to=corentin.chary@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).