[X][D][SRU][PATCH 0/1] Fix backlight control for ASUS laptops

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[X][D][SRU][PATCH 0/1] Fix backlight control for ASUS laptops

Po-Hsu Lin (Sam)
BugLink: https://bugs.launchpad.net/bugs/1837117

== SRU Justification ==
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).

== Fix ==
* 1dd93f87 (platform/x86: asus-wmi: Only Tell EC the OS will handle
display hotkeys from asus_nb_wmi)

This patch addes a .wmi_backlight_set_devstate quirk for specific
models to make asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL)
conditional.

Only X/D contain the commit that introduce this issue (78f3ac76), this
patch can be cherry-picked into D.

For X, it needs some content adjustment to add quirks only to those
models that exist in Xenial tree.

== Test ==
Test kernels could be found here:
https://people.canonical.com/~phlin/kernel/lp-1837117-eeepc/

Bug reporter has verified that this fix works as expected on X.

== Regression Potential ==
Low, quirks limited to specific ASUS laptops and by far there is no
further change to this in upstream kernel.

Hans de Goede (1):
  platform/x86: asus-wmi: Only Tell EC the OS will handle display
    hotkeys from asus_nb_wmi

 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(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[X][SRU][PATCH 1/1] platform/x86: asus-wmi: Only Tell EC the OS will handle display hotkeys from asus_nb_wmi

Po-Hsu Lin (Sam)
From: Hans de Goede <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1837117

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 <[hidden email]>
Fixes: 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey")
Signed-off-by: Hans de Goede <[hidden email]>
Signed-off-by: Andy Shevchenko <[hidden email]>
(backported from commit 1dd93f873d8ed8e5b228d1ae324b1f3c1e94bfa8)
[PHLin: context adjustment, only add quirks for models existing in X]
Signed-off-by: Po-Hsu Lin <[hidden email]>
---
 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 b416ec0..9057931 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2093,7 +2093,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.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[D][SRU][PATCH 1/1] platform/x86: asus-wmi: Only Tell EC the OS will handle display hotkeys from asus_nb_wmi

Po-Hsu Lin (Sam)
In reply to this post by Po-Hsu Lin (Sam)
From: Hans de Goede <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1837117

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 <[hidden email]>
Fixes: 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey")
Signed-off-by: Hans de Goede <[hidden email]>
Signed-off-by: Andy Shevchenko <[hidden email]>
(cherry picked from commit 1dd93f873d8ed8e5b228d1ae324b1f3c1e94bfa8)
Signed-off-by: Po-Hsu Lin <[hidden email]>
---
 drivers/platform/x86/asus-nb-wmi.c | 8 ++++++++
 drivers/platform/x86/asus-wmi.c    | 2 +-
 drivers/platform/x86/asus-wmi.h    | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index b6f2ff9..59f3a37 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -78,10 +78,12 @@ static bool asus_q500a_i8042_filter(unsigned char data, unsigned char str,
 
 static struct quirk_entry quirk_asus_unknown = {
  .wapf = 0,
+ .wmi_backlight_set_devstate = true,
 };
 
 static struct quirk_entry quirk_asus_q500a = {
  .i8042_filter = asus_q500a_i8042_filter,
+ .wmi_backlight_set_devstate = true,
 };
 
 /*
@@ -92,26 +94,32 @@ static struct quirk_entry quirk_asus_q500a = {
 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 struct quirk_entry quirk_asus_ux303ub = {
  .wmi_backlight_native = true,
+ .wmi_backlight_set_devstate = true,
 };
 
 static struct quirk_entry quirk_asus_x550lb = {
+ .wmi_backlight_set_devstate = true,
  .xusb2pr = 0x01D9,
 };
 
 static struct quirk_entry quirk_asus_forceals = {
+ .wmi_backlight_set_devstate = true,
  .wmi_force_als_set = true,
 };
 
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 37b5de5..5fb645e4 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2131,7 +2131,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 6c1311f..57a79bd 100644
--- a/drivers/platform/x86/asus-wmi.h
+++ b/drivers/platform/x86/asus-wmi.h
@@ -44,6 +44,7 @@ struct quirk_entry {
  bool store_backlight_power;
  bool wmi_backlight_power;
  bool wmi_backlight_native;
+ bool wmi_backlight_set_devstate;
  bool wmi_force_als_set;
  int wapf;
  /*
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [X][D][SRU][PATCH 0/1] Fix backlight control for ASUS laptops

Kai-Heng Feng
In reply to this post by Po-Hsu Lin (Sam)
at 15:19, Po-Hsu Lin <[hidden email]> wrote:

> BugLink: https://bugs.launchpad.net/bugs/1837117
>
> == SRU Justification ==
> 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).
>
> == Fix ==
> * 1dd93f87 (platform/x86: asus-wmi: Only Tell EC the OS will handle
> display hotkeys from asus_nb_wmi)
>
> This patch addes a .wmi_backlight_set_devstate quirk for specific
> models to make asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL)
> conditional.
>
> Only X/D contain the commit that introduce this issue (78f3ac76), this
> patch can be cherry-picked into D.
>
> For X, it needs some content adjustment to add quirks only to those
> models that exist in Xenial tree.
>
> == Test ==
> Test kernels could be found here:
> https://people.canonical.com/~phlin/kernel/lp-1837117-eeepc/
>
> Bug reporter has verified that this fix works as expected on X.
>
> == Regression Potential ==
> Low, quirks limited to specific ASUS laptops and by far there is no
> further change to this in upstream kernel.

Acked-by: Kai-Heng Feng <[hidden email]>

>
> Hans de Goede (1):
>   platform/x86: asus-wmi: Only Tell EC the OS will handle display
>     hotkeys from asus_nb_wmi
>
>  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(-)
>
> --
> 2.7.4
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [X][D][SRU][PATCH 0/1] Fix backlight control for ASUS laptops

Connor Kuehl
In reply to this post by Po-Hsu Lin (Sam)
On 7/25/19 12:19 AM, Po-Hsu Lin wrote:

> BugLink: https://bugs.launchpad.net/bugs/1837117
>
> == SRU Justification ==
> 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).
>
> == Fix ==
> * 1dd93f87 (platform/x86: asus-wmi: Only Tell EC the OS will handle
> display hotkeys from asus_nb_wmi)
>
> This patch addes a .wmi_backlight_set_devstate quirk for specific
> models to make asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL)
> conditional.
>
> Only X/D contain the commit that introduce this issue (78f3ac76), this
> patch can be cherry-picked into D.
>
> For X, it needs some content adjustment to add quirks only to those
> models that exist in Xenial tree.
>
> == Test ==
> Test kernels could be found here:
> https://people.canonical.com/~phlin/kernel/lp-1837117-eeepc/
>
> Bug reporter has verified that this fix works as expected on X.
>
> == Regression Potential ==
> Low, quirks limited to specific ASUS laptops and by far there is no
> further change to this in upstream kernel.
>
> Hans de Goede (1):
>   platform/x86: asus-wmi: Only Tell EC the OS will handle display
>     hotkeys from asus_nb_wmi
>
>  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(-)
>

Acked-by: Connor Kuehl <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [X][D][SRU][PATCH 0/1] Fix backlight control for ASUS laptops

Khaled Elmously
In reply to this post by Po-Hsu Lin (Sam)
On 2019-07-25 15:19:08 , Po-Hsu Lin wrote:

> BugLink: https://bugs.launchpad.net/bugs/1837117
>
> == SRU Justification ==
> 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).
>
> == Fix ==
> * 1dd93f87 (platform/x86: asus-wmi: Only Tell EC the OS will handle
> display hotkeys from asus_nb_wmi)
>
> This patch addes a .wmi_backlight_set_devstate quirk for specific
> models to make asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL)
> conditional.
>
> Only X/D contain the commit that introduce this issue (78f3ac76), this
> patch can be cherry-picked into D.
>
> For X, it needs some content adjustment to add quirks only to those
> models that exist in Xenial tree.
>
> == Test ==
> Test kernels could be found here:
> https://people.canonical.com/~phlin/kernel/lp-1837117-eeepc/
>
> Bug reporter has verified that this fix works as expected on X.
>
> == Regression Potential ==
> Low, quirks limited to specific ASUS laptops and by far there is no
> further change to this in upstream kernel.
>
> Hans de Goede (1):
>   platform/x86: asus-wmi: Only Tell EC the OS will handle display
>     hotkeys from asus_nb_wmi
>
>  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(-)
>
> --
> 2.7.4
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team