stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] ACPI: video: Force backlight native for more TongFang devices
@ 2022-10-26 15:22 Werner Sembach
  2022-10-27 10:28 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Werner Sembach @ 2022-10-26 15:22 UTC (permalink / raw)
  To: stable; +Cc: hdegoede, daniel, airlied, lenb, rafael.j.wysocki

commit 3dbc80a3e4c55c4a5b89ef207bed7b7de36157b4 upstream.

This commit is very different from the upstream commit! It fixes the same
issue by adding more quirks, rather then the general fix from the 6.1
kernel, because the general fix from the 6.1 kernel is part of a larger
refactoring of the backlight code which is not suitable for the stable
series.

As described in "ACPI: video: Drop NL5x?U, PF4NU1F and PF5?U??
acpi_backlight=native quirks" (10212754a0d2) the upstream commit "ACPI:
video: Make backlight class device registration a separate step (v2)"
(3dbc80a3e4c5) makes these quirks unnecessary. However as mentioned in this
bugtracker ticket https://bugzilla.kernel.org/show_bug.cgi?id=215683#c17
the upstream fix is part of a larger patchset that is overall too complex
for stable.

The TongFang GKxNRxx, GMxNGxx, GMxZGxx, and GMxRGxx / TUXEDO
Stellaris/Polaris Gen 1-4, have the same problem as the Clevo NL5xRU and
NL5xNU / TUXEDO Aura 15 Gen1 and Gen2:
They have a working native and video interface for screen backlight.
However the default detection mechanism first registers the video interface
before unregistering it again and switching to the native interface during
boot. This results in a dangling SBIOS request for backlight change for
some reason, causing the backlight to switch to ~2% once per boot on the
first power cord connect or disconnect event. Setting the native interface
explicitly circumvents this buggy behaviour by avoiding the unregistering
process.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
---
 drivers/acpi/video_detect.c | 64 +++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index e39d59ad64964..b13713199ad94 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -500,6 +500,70 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		DMI_MATCH(DMI_BOARD_NAME, "PF5LUXG"),
 		},
 	},
+	/*
+	 * More Tongfang devices with the same issue as the Clevo NL5xRU and
+	 * NL5xNU/TUXEDO Aura 15 Gen1 and Gen2. See the description above.
+	 */
+	{
+	.callback = video_detect_force_native,
+	.ident = "TongFang GKxNRxx",
+	.matches = {
+		DMI_MATCH(DMI_BOARD_NAME, "GKxNRxx"),
+		},
+	},
+	{
+	.callback = video_detect_force_native,
+	.ident = "TongFang GKxNRxx",
+	.matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
+		DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A1650TI"),
+		},
+	},
+	{
+	.callback = video_detect_force_native,
+	.ident = "TongFang GKxNRxx",
+	.matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
+		DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A2060"),
+		},
+	},
+	{
+	.callback = video_detect_force_native,
+	.ident = "TongFang GKxNRxx",
+	.matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
+		DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A1650TI"),
+		},
+	},
+	{
+	.callback = video_detect_force_native,
+	.ident = "TongFang GKxNRxx",
+	.matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
+		DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A2060"),
+		},
+	},
+	{
+	.callback = video_detect_force_native,
+	.ident = "TongFang GMxNGxx",
+	.matches = {
+		DMI_MATCH(DMI_BOARD_NAME, "GMxNGxx"),
+		},
+	},
+	{
+	.callback = video_detect_force_native,
+	.ident = "TongFang GMxZGxx",
+	.matches = {
+		DMI_MATCH(DMI_BOARD_NAME, "GMxZGxx"),
+		},
+	},
+	{
+	.callback = video_detect_force_native,
+	.ident = "TongFang GMxRGxx",
+	.matches = {
+		DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"),
+		},
+	},
 	/*
 	 * Desktops which falsely report a backlight and which our heuristics
 	 * for this do not catch.
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] ACPI: video: Force backlight native for more TongFang devices
  2022-10-26 15:22 [PATCH v3] ACPI: video: Force backlight native for more TongFang devices Werner Sembach
@ 2022-10-27 10:28 ` Greg KH
  2022-10-27 10:45   ` Werner Sembach
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2022-10-27 10:28 UTC (permalink / raw)
  To: Werner Sembach; +Cc: stable, hdegoede, daniel, airlied, lenb, rafael.j.wysocki

On Wed, Oct 26, 2022 at 05:22:46PM +0200, Werner Sembach wrote:
> commit 3dbc80a3e4c55c4a5b89ef207bed7b7de36157b4 upstream.
> 
> This commit is very different from the upstream commit! It fixes the same
> issue by adding more quirks, rather then the general fix from the 6.1
> kernel, because the general fix from the 6.1 kernel is part of a larger
> refactoring of the backlight code which is not suitable for the stable
> series.
> 
> As described in "ACPI: video: Drop NL5x?U, PF4NU1F and PF5?U??
> acpi_backlight=native quirks" (10212754a0d2) the upstream commit "ACPI:
> video: Make backlight class device registration a separate step (v2)"
> (3dbc80a3e4c5) makes these quirks unnecessary. However as mentioned in this
> bugtracker ticket https://bugzilla.kernel.org/show_bug.cgi?id=215683#c17
> the upstream fix is part of a larger patchset that is overall too complex
> for stable.
> 
> The TongFang GKxNRxx, GMxNGxx, GMxZGxx, and GMxRGxx / TUXEDO
> Stellaris/Polaris Gen 1-4, have the same problem as the Clevo NL5xRU and
> NL5xNU / TUXEDO Aura 15 Gen1 and Gen2:
> They have a working native and video interface for screen backlight.
> However the default detection mechanism first registers the video interface
> before unregistering it again and switching to the native interface during
> boot. This results in a dangling SBIOS request for backlight change for
> some reason, causing the backlight to switch to ~2% once per boot on the
> first power cord connect or disconnect event. Setting the native interface
> explicitly circumvents this buggy behaviour by avoiding the unregistering
> process.
> 
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> ---
>  drivers/acpi/video_detect.c | 64 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 64 insertions(+)

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] ACPI: video: Force backlight native for more TongFang devices
  2022-10-27 10:28 ` Greg KH
@ 2022-10-27 10:45   ` Werner Sembach
  0 siblings, 0 replies; 3+ messages in thread
From: Werner Sembach @ 2022-10-27 10:45 UTC (permalink / raw)
  To: Greg KH; +Cc: stable, hdegoede, daniel, airlied, lenb, rafael.j.wysocki

Am 27.10.22 um 12:28 schrieb Greg KH:
> On Wed, Oct 26, 2022 at 05:22:46PM +0200, Werner Sembach wrote:
>> commit 3dbc80a3e4c55c4a5b89ef207bed7b7de36157b4 upstream.
>>
>> This commit is very different from the upstream commit! It fixes the same
>> issue by adding more quirks, rather then the general fix from the 6.1
>> kernel, because the general fix from the 6.1 kernel is part of a larger
>> refactoring of the backlight code which is not suitable for the stable
>> series.
>>
>> As described in "ACPI: video: Drop NL5x?U, PF4NU1F and PF5?U??
>> acpi_backlight=native quirks" (10212754a0d2) the upstream commit "ACPI:
>> video: Make backlight class device registration a separate step (v2)"
>> (3dbc80a3e4c5) makes these quirks unnecessary. However as mentioned in this
>> bugtracker ticket https://bugzilla.kernel.org/show_bug.cgi?id=215683#c17
>> the upstream fix is part of a larger patchset that is overall too complex
>> for stable.
>>
>> The TongFang GKxNRxx, GMxNGxx, GMxZGxx, and GMxRGxx / TUXEDO
>> Stellaris/Polaris Gen 1-4, have the same problem as the Clevo NL5xRU and
>> NL5xNU / TUXEDO Aura 15 Gen1 and Gen2:
>> They have a working native and video interface for screen backlight.
>> However the default detection mechanism first registers the video interface
>> before unregistering it again and switching to the native interface during
>> boot. This results in a dangling SBIOS request for backlight change for
>> some reason, causing the backlight to switch to ~2% once per boot on the
>> first power cord connect or disconnect event. Setting the native interface
>> explicitly circumvents this buggy behaviour by avoiding the unregistering
>> process.
>>
>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
>> ---
>>   drivers/acpi/video_detect.c | 64 +++++++++++++++++++++++++++++++++++++
>>   1 file changed, 64 insertions(+)
> 
> Now queued up, thanks.
Thanks for bearing my learning process ^^
> 
> greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-27 10:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26 15:22 [PATCH v3] ACPI: video: Force backlight native for more TongFang devices Werner Sembach
2022-10-27 10:28 ` Greg KH
2022-10-27 10:45   ` Werner Sembach

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