From: Willy Tarreau <w@1wt.eu>
To: Bob Funk <bobfunk11@gmail.com>
Cc: gregkh@linuxfoundation.org, sashal@kernel.org, stable@vger.kernel.org
Subject: Re: Bug Report - Kernel Branch 4.4.y - asus-wmi.c
Date: Sat, 23 Nov 2019 07:20:47 +0100 [thread overview]
Message-ID: <20191123062047.GB14713@1wt.eu> (raw)
In-Reply-To: <20191123061446.GA14713@1wt.eu>
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
On Sat, Nov 23, 2019 at 07:14:46AM +0100, Willy Tarreau wrote:
> I suspect that this is caused by missing commit 401fee81, which fixes
> 78f3ac76d9e5, was backported to 4.19 but not to 4.4. However you will
> have to backport it by hand as it doesn't apply due to context
> differences, but it trivial to do.
Please try the attached patch. I haven't even tried to compile it but
I think it's OK.
Willy
[-- Attachment #2: 0001-platform-x86-asus-wmi-Only-Tell-EC-the-OS-will-handl.patch --]
[-- Type: text/plain, Size: 3312 bytes --]
From cfc80c044499f17e82c3ede448a4e1462572ae39 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 12 Jun 2019 09:02:02 +0200
Subject: platform/x86: asus-wmi: Only Tell EC the OS will handle display
hotkeys from asus_nb_wmi
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
commit 401fee8195d401b2b94dee57383f627050724d5b upstream.
Commit 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will
handle the display off hotkey") causes the backlight to be permanently off
on various EeePC laptop models using the eeepc-wmi driver (Asus EeePC
1015BX, Asus EeePC 1025C).
The asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL) call added
by that commit is made conditional in this commit and only enabled in
the quirk_entry structs in the asus-nb-wmi driver fixing the broken
display / backlight on various EeePC laptop models.
Cc: João Paulo Rechi Vita <jprvita@endlessm.com>
Fixes: 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[wt: dropped changes for missing quirks]
Signed-off-by: Willy Tarreau <w@1wt.eu>
---
drivers/platform/x86/asus-nb-wmi.c | 4 ++++
drivers/platform/x86/asus-wmi.c | 2 +-
drivers/platform/x86/asus-wmi.h | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index a284a2b..bbea208 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -57,6 +57,7 @@ static struct quirk_entry *quirks;
static struct quirk_entry quirk_asus_unknown = {
.wapf = 0,
+ .wmi_backlight_set_devstate = true,
};
/*
@@ -67,15 +68,18 @@ static struct quirk_entry quirk_asus_unknown = {
static struct quirk_entry quirk_asus_x55u = {
.wapf = 4,
.wmi_backlight_power = true,
+ .wmi_backlight_set_devstate = true,
.no_display_toggle = true,
};
static struct quirk_entry quirk_asus_wapf4 = {
.wapf = 4,
+ .wmi_backlight_set_devstate = true,
};
static struct quirk_entry quirk_asus_x200ca = {
.wapf = 2,
+ .wmi_backlight_set_devstate = true,
};
static int dmi_matched(const struct dmi_system_id *dmi)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 7c1defa..c4386ae 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2084,7 +2084,7 @@ static int asus_wmi_add(struct platform_device *pdev)
err = asus_wmi_backlight_init(asus);
if (err && err != -ENODEV)
goto fail_backlight;
- } else
+ } else if (asus->driver->quirks->wmi_backlight_set_devstate)
err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL);
status = wmi_install_notify_handler(asus->driver->event_guid,
diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h
index 4da4c8b..0f565cc 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 wmi_backlight_set_devstate;
int wapf;
/*
* For machines with AMD graphic chips, it will send out WMI event
--
2.9.0
next prev parent reply other threads:[~2019-11-23 6:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-23 2:33 Bug Report - Kernel Branch 4.4.y - asus-wmi.c Bob Funk
2019-11-23 6:14 ` Willy Tarreau
2019-11-23 6:20 ` Willy Tarreau [this message]
2019-11-23 18:41 ` Bob Funk
2019-11-23 9:27 ` Greg KH
2019-11-23 19:08 ` Bob Funk
2019-11-23 19:22 ` Willy Tarreau
2019-11-25 13:30 ` Sasha Levin
2019-11-25 13:33 ` Willy Tarreau
2019-11-28 2:17 ` Bob Funk
2019-11-28 7:19 ` Greg KH
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=20191123062047.GB14713@1wt.eu \
--to=w@1wt.eu \
--cc=bobfunk11@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=sashal@kernel.org \
--cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.