Add no backlight quirks for various Asus machines (rhbz 1097436)
From: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
9d60dbe3b5
commit
55244d5e48
69
asus-wmi-Add-a-no-backlight-quirk.patch
Normal file
69
asus-wmi-Add-a-no-backlight-quirk.patch
Normal file
@ -0,0 +1,69 @@
|
||||
Bugzilla: 1097436
|
||||
Upstream-status: Sent upstream for 3.16
|
||||
|
||||
From f6fad201a0e4584e9826a2deb8ebbfccdb8cb13b Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Mon, 2 Jun 2014 17:41:01 +0200
|
||||
Subject: [PATCH 04/14] asus-wmi: Add a no backlight quirk
|
||||
|
||||
Some Asus motherboards for desktop PC-s export an acpi-video and
|
||||
an asus-wmi interface advertising backlight support. Add a quirk to allow
|
||||
to blacklist these so that desktop environments such as gnome don't start
|
||||
showing nonsense brightness controls.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1097436
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/platform/x86/asus-wmi.c | 8 ++++++--
|
||||
drivers/platform/x86/asus-wmi.h | 1 +
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
|
||||
index c5e082fb82fa..6f73dc5125ca 100644
|
||||
--- a/drivers/platform/x86/asus-wmi.c
|
||||
+++ b/drivers/platform/x86/asus-wmi.c
|
||||
@@ -1272,6 +1272,9 @@ static int asus_wmi_backlight_init(struct asus_wmi *asus)
|
||||
int max;
|
||||
int power;
|
||||
|
||||
+ if (asus->driver->quirks->no_backlight)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
max = read_brightness_max(asus);
|
||||
|
||||
if (max == -ENODEV)
|
||||
@@ -1370,7 +1373,7 @@ static void asus_wmi_notify(u32 value, void *context)
|
||||
code = ASUS_WMI_BRN_DOWN;
|
||||
|
||||
if (code == ASUS_WMI_BRN_DOWN || code == ASUS_WMI_BRN_UP) {
|
||||
- if (!acpi_video_backlight_support()) {
|
||||
+ if (asus->backlight_device) {
|
||||
asus_wmi_backlight_notify(asus, orig_code);
|
||||
goto exit;
|
||||
}
|
||||
@@ -1773,7 +1776,8 @@ static int asus_wmi_add(struct platform_device *pdev)
|
||||
if (err)
|
||||
goto fail_rfkill;
|
||||
|
||||
- if (asus->driver->quirks->wmi_backlight_power)
|
||||
+ if (asus->driver->quirks->wmi_backlight_power ||
|
||||
+ asus->driver->quirks->no_backlight)
|
||||
acpi_video_dmi_promote_vendor();
|
||||
if (!acpi_video_backlight_support()) {
|
||||
pr_info("Disabling ACPI video driver\n");
|
||||
diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h
|
||||
index 4da4c8bafe70..cc47efe14974 100644
|
||||
--- a/drivers/platform/x86/asus-wmi.h
|
||||
+++ b/drivers/platform/x86/asus-wmi.h
|
||||
@@ -42,6 +42,7 @@ struct quirk_entry {
|
||||
bool scalar_panel_brightness;
|
||||
bool store_backlight_power;
|
||||
bool wmi_backlight_power;
|
||||
+ bool no_backlight;
|
||||
int wapf;
|
||||
/*
|
||||
* For machines with AMD graphic chips, it will send out WMI event
|
||||
--
|
||||
1.9.0
|
||||
|
50
eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch
Normal file
50
eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch
Normal file
@ -0,0 +1,50 @@
|
||||
Bugzilla: 1097463
|
||||
Upstream-status: Sent for 3.16
|
||||
|
||||
From 7ad066ecd4dfb4c36fb00f9f9eb1a5d6099db834 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Mon, 2 Jun 2014 17:41:02 +0200
|
||||
Subject: [PATCH 05/14] eeepc-wmi: Add no backlight quirk for Asus H87I-PLUS
|
||||
Motherboard
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1097436
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/platform/x86/eeepc-wmi.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
|
||||
index 6112933f6278..a7286bbfe28e 100644
|
||||
--- a/drivers/platform/x86/eeepc-wmi.c
|
||||
+++ b/drivers/platform/x86/eeepc-wmi.c
|
||||
@@ -114,6 +114,10 @@ static struct quirk_entry quirk_asus_x101ch = {
|
||||
.wmi_backlight_power = true,
|
||||
};
|
||||
|
||||
+static struct quirk_entry quirk_asus_no_backlight = {
|
||||
+ .no_backlight = true,
|
||||
+};
|
||||
+
|
||||
static struct quirk_entry *quirks;
|
||||
|
||||
static void et2012_quirks(void)
|
||||
@@ -182,6 +186,15 @@ static struct dmi_system_id asus_quirks[] = {
|
||||
},
|
||||
.driver_data = &quirk_asus_x101ch,
|
||||
},
|
||||
+ {
|
||||
+ .callback = dmi_matched,
|
||||
+ .ident = "ASUSTeK Computer INC. H87I-PLUS",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
+ DMI_MATCH(DMI_BOARD_NAME, "H87I-PLUS"),
|
||||
+ },
|
||||
+ .driver_data = &quirk_asus_no_backlight,
|
||||
+ },
|
||||
{},
|
||||
};
|
||||
|
||||
--
|
||||
1.9.0
|
||||
|
@ -647,6 +647,8 @@ Patch26000: perf-lib64.patch
|
||||
Patch26001: thinkpad_acpi-Add-mappings-for-F9-F12-hotkeys-on-X24.patch
|
||||
Patch26002: samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch
|
||||
Patch26003: ideapad-laptop-Blacklist-rfkill-control-on-the-Lenov.patch
|
||||
Patch26004: asus-wmi-Add-a-no-backlight-quirk.patch
|
||||
Patch26005: eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch
|
||||
|
||||
# END OF PATCH DEFINITIONS
|
||||
|
||||
@ -1371,6 +1373,8 @@ ApplyPatch perf-lib64.patch
|
||||
ApplyPatch thinkpad_acpi-Add-mappings-for-F9-F12-hotkeys-on-X24.patch
|
||||
ApplyPatch samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch
|
||||
ApplyPatch ideapad-laptop-Blacklist-rfkill-control-on-the-Lenov.patch
|
||||
ApplyPatch asus-wmi-Add-a-no-backlight-quirk.patch
|
||||
ApplyPatch eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch
|
||||
|
||||
# END OF PATCH APPLICATIONS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user