Commit Graph

109 Commits

Author SHA1 Message Date
Mark Langsdorf 78c24787ea ACPI: video: Add backlight=native quirk for Lenovo Slim 7 16ARH7
JIRA: https://issues.redhat.com/browse/RHEL-54149

commit c901f63dc142c48326931f164f787dfff69273d9
Author: Takashi Iwai <tiwai@suse.de>
Date: Tue, 07 May 2024 13:43:19 +0000

Lenovo Slim 7 16ARH7 is a machine with switchable graphics between AMD
and Nvidia, and the backlight can't be adjusted properly unless
acpi_backlight=native is passed.  Although nvidia-wmi-backlight is
present and loaded, this doesn't work as expected at all.

For making it working as default, add the corresponding quirk entry
with a DMI matching "LENOVO" "82UX".

Link: https://bugzilla.suse.com/show_bug.cgi?id=1217750
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-08-22 11:22:25 -04:00
Mark Langsdorf 1f29800908 ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100
JIRA: https://issues.redhat.com/browse/RHEL-26871

commit 35a341c9b25da6a479bd8013bcb11a680a7233e3
Author: Ondrej Zary <linux@zary.sk>
Date: Tue, 03 Oct 2023 20:33:58 +0000

Toshiba Portégé R100 has both acpi_video and toshiba_acpi vendor
backlight driver working. But none of them gets activated as it has
a VGA with no kernel driver (Trident CyberBlade XP4m32).

The DMI strings are very generic ("Portable PC") so add a custom
callback function to check for Trident CyberBlade XP4m32 PCI device
before enabling the vendor backlight driver (better than acpi_video
as it has more brightness steps).

Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
Signed-off-by: Ondrej Zary <linux@zary.sk>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-05 17:00:49 -04:00
Mark Langsdorf a42fc62ec1 ACPI: video: Add "vendor" quirks for 3 Lenovo x86 Android tablets
JIRA: https://issues.redhat.com/browse/RHEL-26871

commit 2ce3262553c690f175705b3ecbdf4146448f5dc8
Author: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 18 Sep 2023 20:34:45 +0000

Like the Xiaomi Mi Pad 2 these 3 Lenovo x86 Android tablet models also
use a TI LP8557 backlight controller in direct I2C brightness register
control mode.

Add "vendor" quirks for these 3 models to disable the non-working
native / acpi_video backlight devices.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-05 17:00:49 -04:00
Mark Langsdorf 4945f1ac0d ACPI: video: Move Xiaomi Mi Pad 2 quirk to its own section
JIRA: https://issues.redhat.com/browse/RHEL-26871
Conflicts:
	drivers/acpi/video_detect.c - minor context
differences

commit 22c11b8f1b94ecd3e8c345df1d29eb3a5f931fff
Author: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 18 Sep 2023 20:34:45 +0000

The Xiaomi Mi Pad 2 is currently listed under the:
"Models which should use the vendor backlight interface,
because of broken ACPI video backlight control." section.

But this is not 100% correct. The Xiaomi Mi Pad 2 is one of a set of
x86 tablets which shipped with Android as factory OS. These tablets
have a TI LP8557 backlight controller with its PWM input _not_
connected to the PMIC or chipset (LPSS) PWM output.

Instead the backlight can be controlled by configuring the LP8557
for direct control through its brightness I2C register and then
using the lp855x driver.

This setup means that neither i915's native or acpi_video backlight
control works, so a "vendor" quirk is added for these tablets to
disable both the native and acpi_video backlight devices, but these
devices do not use vendor control in the typical meaning of
vendor specific SMBIOS or ACPI calls being used.

This patch is a preparation patch for adding "vendor" quirks
for a couple more such tablet models.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-05 17:00:49 -04:00
Mark Langsdorf d452953b58 ACPI: video: Add backlight=native DMI quirk for Apple iMac12,1 and iMac12,2
JIRA: https://issues.redhat.com/browse/RHEL-26871

commit 8cf04bb321f036dd2e523e993897e0789bd5265c
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 17 Aug 2023 19:29:58 +0000

Linux defaults to picking the non-working ACPI video backlight interface
on the Apple iMac12,1 and iMac12,2.

Add a DMI quirk to pick the working native radeon_bl0 interface instead.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1838
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2753
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-05 17:00:49 -04:00
Mark Langsdorf 0c3268ad92 ACPI: video: Add backlight=native DMI quirk for Lenovo Ideapad Z470
JIRA: https://issues.redhat.com/browse/RHEL-26871

commit 96b709be183c56293933ef45b8b75f8af268c6de
Author: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Date: Mon, 17 Jul 2023 15:02:43 +0000

The Lenovo Ideapad Z470 predates Windows 8, so it defaults to using
acpi_video for backlight control. But this is not functional on this
model.

Add a DMI quirk to use the native backlight interface which works.

Link: https://bugzilla.suse.com/show_bug.cgi?id=1208724
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-05 17:00:49 -04:00
Mark Langsdorf 876557c926 ACPI: video: Add backlight=native DMI quirk for Dell Studio 1569
JIRA: https://issues.redhat.com/browse/RHEL-26871

commit 23d28cc0444be3f694eb986cd653b6888b78431d
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 22 Jun 2023 17:54:45 +0000

The Dell Studio 1569 predates Windows 8, so it defaults to using
acpi_video# for backlight control, but this is non functional on
this model.

Add a DMI quirk to use the native intel_backlight interface which
does work properly.

Reported-by: raycekarneal <raycekarneal@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-05 17:00:49 -04:00
Mark Langsdorf c1739d625b ACPI: video: Add backlight=native DMI quirk for Lenovo ThinkPad X131e (3371 AMD version)
JIRA: https://issues.redhat.com/browse/RHEL-26871

commit bd5d93df86a7ddf98a2a37e9c3751e3cb334a66c
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 18 May 2023 20:23:44 +0000

Linux defaults to picking the non-working ACPI video backlight interface
on the Lenovo ThinkPad X131e (3371 AMD version).

Add a DMI quirk to pick the working native radeon_bl0 interface instead.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-05 17:00:48 -04:00
Mark Langsdorf 5b7efeafe5 ACPI: video: Add backlight=native DMI quirk for Apple iMac11,3
JIRA: https://issues.redhat.com/browse/RHEL-26871

commit 48436f2e9834b46b47b038b605c8142a1c07bc85
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 18 May 2023 20:23:44 +0000

Linux defaults to picking the non-working ACPI video backlight interface
on the Apple iMac11,3 .

Add a DMI quirk to pick the working native radeon_bl0 interface instead.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-05 17:00:48 -04:00
Mark Langsdorf 79356f5e95 ACPI: video: Remove desktops without backlight DMI quirks
JIRA: https://issues.redhat.com/browse/RHEL-26871
Conflicts:
	drivers/acpi/video_detect.c - the definition
for the GIGABYTE GB-BXBT-2807 wasn't present in RHEL-9,
but it was removed in this patch so I just removed the
other two entries.

commit abe4f5ae5efa6a63c7d5abfa07eb02bb56b4654e
Author: Hans de Goede <hdegoede@redhat.com>
Date: Tue, 11 Apr 2023 20:55:46 +0000

After the recent backlight changes acpi_video# backlight devices are only
registered when explicitly requested from the cmdline, by DMI quirk or by
the GPU driver.

This means that we no longer get false-positive backlight control support
advertised on desktop boards.

Remove the 3 DMI quirks for desktop boards where the false-positive issue
was fixed through quirks before. Note many more desktop boards were
affected but we never build a full quirk list for this.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-05 17:00:48 -04:00
Kate Hsuan f55e93b530 ACPI: video: Allow selecting NVidia-WMI-EC or Apple GMUX backlight from the cmdline
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2185526
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2221211

commit 420a1116aef0e8e12c305508f45ce73e5ae30a09
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 9 Jan 2023 20:18:11 +0100

The patches adding NVidia-WMI-EC and Apple GMUX backlight detection
support to acpi_video_get_backlight_type(), forgot to update
acpi_video_parse_cmdline() to allow manually selecting these from
the commandline.

Add support for these to acpi_video_parse_cmdline().

Fixes: fe7aebb40d42 ("ACPI: video: Add Nvidia WMI EC brightness control detection (v3)")
Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Kate Hsuan <hpa@redhat.com>
2023-08-01 15:18:56 +08:00
Kate Hsuan b38656cddc ACPI: video: Add Nvidia WMI EC brightness control detection (v3)
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2185526
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2221211

commit fe7aebb40d42bf8e830019d6f57c47cf7d85aa61
Author: Hans de Goede <hdegoede@redhat.com>
Date: Sat, 4 Jun 2022 14:06:18 +0200

On some new laptop designs a new Nvidia specific WMI interface is present
which gives info about panel brightness control and may allow controlling
the brightness through this interface when the embedded controller is used
for brightness control.

When this WMI interface is present and indicates that the EC is used,
then this interface should be used for brightness control.

Changes in v2:
- Use the new shared nvidia-wmi-ec-backlight.h header for the
  WMI firmware API definitions
- ACPI_VIDEO can now be enabled on non X86 too,
  adjust the Kconfig changes to match this.

Changes in v3:
- Use WMI_BRIGHTNESS_GUID define

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Signed-off-by: Kate Hsuan <hpa@redhat.com>
2023-08-01 15:18:47 +08:00
Mark Langsdorf 5feb502cb1 ACPI: video: Add acpi_backlight=video quirk for Lenovo ThinkPad W530
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2186058
Upstream-status: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

commit a5b2781dcab2c77979a4b8adda781d2543580901
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Tue, 4 Apr 2023 13:02:49 +0200

The Lenovo ThinkPad W530 uses a nvidia k1000m GPU. When this gets used
together with one of the older nvidia binary driver series (the latest
series does not support it), then backlight control does not work.

This is caused by commit 3dbc80a3e4c5 ("ACPI: video: Make backlight
class device registration a separate step (v2)") combined with
commit 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for
creating ACPI backlight by default").

After these changes the acpi_video# backlight device is only registered
when requested by a GPU driver calling acpi_video_register_backlight()
which the nvidia binary driver does not do.

I realize that using the nvidia binary driver is not a supported use-case
and users can workaround this by adding acpi_backlight=video on the kernel
commandline, but the ThinkPad W530 is a popular model under Linux users,
so it seems worthwhile to add a quirk for this.

I will also email Nvidia asking them to make the driver call
acpi_video_register_backlight() when an internal LCD panel is detected.
So maybe the next maintenance release of the drivers will fix this...

Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
Cc: All applicable <stable@vger.kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-07-06 13:21:22 -04:00
Mark Langsdorf d0f9845002 ACPI: video: Stop trying to use vendor backlight control on laptops from after ~2012
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2186058
Upstream-status: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

commit aa8a950a5d6b2094830aff834198777371ff91ff
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Thu Jun 8 11:12:58 2023 +0200

There have been 2 separate reports now about a non working
"dell_backlight" device getting registered under /sys/class/backlight
1 report for a Raptor Lake based Dell and 1 report for a Meteor Lake
(development) platform.

On hw from the last 10 years dell-laptop will not register "dell_backlight"
because acpi_video_get_backlight_type() will return acpi_backlight_video
there if called before the GPU/kms driver loads. So it does not matter if
the GPU driver's native backlight is registered after dell-laptop loads.

But it seems that on the latest generation laptops the ACPI tables
no longer contain acpi_video backlight control support which causes
acpi_video_get_backlight_type() to return acpi_backlight_vendor causing
"dell_backlight" to get registered if the dell-laptop module is loaded
before the GPU/kms driver.

Vendor specific backlight control like the "dell_backlight" device is
only necessary on quite old hw (from before acpi_video backlight control
was introduced). Work around "dell_backlight" registering on very new
hw (where acpi_video backlight control seems to be no more) by making
acpi_video_get_backlight_type() return acpi_backlight_none instead
of acpi_backlight_vendor as final fallback when the ACPI tables have
support for Windows 8 or later (laptops from after ~2012).

Suggested-by: Matthew Garrett <mjg59@srcf.ucam.org>
Reported-by: AceLan Kao <acelan.kao@canonical.com>
Closes: https://lore.kernel.org/platform-driver-x86/20230607034331.576623-1-acelan.kao@canonical.com/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-07-06 13:13:31 -04:00
Mark Langsdorf 92640ca193 ACPI: video: Prefer native over vendor
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2186058
Conflicts:
       drivers/acpi/video_detect.c - second stanza did not apply
at all. the final version of acpi_video_backlight_use_native() was
already present in include/acpi/video.h so it was dropped.
Omitted-fix: 9dcb34234b82
Omitted-fix: e6b3086fddc0
	both are out of scope for this MR and will be backported
as part of the next round of ACPI updates

commit fb1836c91317e0770950260dfa91eb9b2170cb27
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Mon Nov 14 15:44:59 2022 +0100

When available prefer native backlight control over vendor backlight
control.

Testing has shown that there are quite a few laptop models which rely
on native backlight control (they don't have ACPI video bus backlight
control) and on which acpi_osi_is_win8() returns false.

Currently __acpi_video_get_backlight_type() returns vendor on these
laptops, leading to an empty /sys/class/backlight.

As a workaround for this acpi_video_backlight_use_native() has been
temporarily changed to always return true.

This re-introduces the problem of having multiple backlight
devices under /sys/class/backlight for a single panel.

Change __acpi_video_get_backlight_type() to prefer native over vendor
when available. So that it returns native on these models.

And change acpi_video_backlight_use_native() back to only return
true when __acpi_video_get_backlight_type() returns native.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-07-06 12:11:33 -04:00
Mark Langsdorf 05a8886de4 ACPI: video: Simplify __acpi_video_get_backlight_type()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2186058

commit a5df42521f328b45c9d89c13740e747be08ac66e
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Mon Nov 14 15:44:58 2022 +0100

Simplify __acpi_video_get_backlight_type() removing a nested if which
makes the flow harder to follow.

This also results in having only 1 exit point with
return acpi_backlight_native instead of 2.

Note this drops the (video_caps & ACPI_VIDEO_BACKLIGHT) check from
the if (acpi_osi_is_win8() && native_available) return native path.
Windows 8's hardware certification requirements include that there must
be ACPI video bus backlight control, so the ACPI_VIDEO_BACKLIGHT check
is redundant.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-07-06 12:05:04 -04:00
Mark Langsdorf 113d8cd658 ACPI: video: Remove acpi_backlight=video quirk for Lenovo ThinkPad W530
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554

commit 3db66620ea90b0fd4134b31eabfec16d7b07d7e3
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Fri Apr 28 15:23:50 2023 +0200

Remove the acpi_backlight=video quirk for Lenovo ThinkPad W530.

This was intended to help users of the (unsupported) Nvidia binary driver,
but this has been reported to cause backlight control issues for users
who have the gfx configured in hybrid (dual-GPU) mode, so drop this.

The Nvidia binary driver should call acpi_video_register_backlight()
when necessary and this has been reported to Nvidia.

Until this is fixed Nvidia binary driver users can work around this by
passing "acpi_backlight=video" on the kernel commandline (with the latest
6.1.y or newer stable series, kernels < 6.1.y don't need this).

Fixes: a5b2781dcab2 ("ACPI: video: Add acpi_backlight=video quirk for Lenovo ThinkPad W530")
Reported-by: Русев Путин <rockeraliexpress@gmail.com>
Link: https://lore.kernel.org/linux-acpi/CAK4BXn0ngZRmzx1bodAF8nmYj0PWdUXzPGHofRrsyZj8MBpcVA@mail.gmail.com/
Cc: 6.1+ <stable@vger.kernel.org> # 6.1+
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:37 -04:00
Mark Langsdorf fa432bd6fa ACPI: video: Improve Chromebook checks
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554

commit 59dc2a7e7c6a0d4a2a2c4dafea874af484fc0592
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Mon Oct 31 11:17:45 2022 +0100

2 improvements for the Chromebook handling in
acpi_video_get_backlight_type():

1. Also check for the "GOOG000C" ACPI HID used on some models
2. Move the Chromebook check to above the ACPI-video check normally
   Chromebooks don't have ACPI video backlight support, but when
   flashed with upstream coreboot builds they may have ACPI video
   backlight support, but native should still be used/preferred then.

Suggested-by: Mr. Chromebox <mrchromebox@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:36 -04:00
Mark Langsdorf b32bd5555b ACPI: video: Fix missing native backlight on Chromebooks
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554

commit e9cf4d9b9a6fdb1df6401a59f5ac5d24006bfeae
Author: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Date:   Mon Oct 24 17:12:10 2022 +0300

Chromebooks don't have backlight in ACPI table, they suppose to use
native backlight in this case. Check presence of the CrOS embedded
controller ACPI device and prefer the native backlight if EC found.

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Fixes: 2600bfa3df99 ("ACPI: video: Add acpi_video_backlight_use_native() helper")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20221024141210.67784-1-dmitry.osipenko@collabora.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:36 -04:00
Mark Langsdorf 591eb43b70 ACPI: video: Refactor acpi_video_get_backlight_type() a bit
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554
Conflicts:
      drivers/acpi/video_detect.c - minor context differences
from patches being applied out of order

commit b39be9f441f9d7320e6020bdf8ec1522d6c81d1e
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Sat Jun 4 14:38:24 2022 +0200

Refactor acpi_video_get_backlight_type() so that the heuristics /
detection steps are stricly in order of descending precedence.

Also move the comments describing the steps to when the various steps are
actually done, to avoid the comments getting out of sync with the code.

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:36 -04:00
Mark Langsdorf 6894fc60c4 ACPI: video: Remove code to unregister acpi_video backlight when a native backlight registers
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554

commit 6cb634d0dc850cc1ae54868de7815df53e64a465
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Fri Apr 29 13:00:15 2022 +0200

Remove the code to unregister acpi_video backlight devices when
a native backlight device gets registered later.

Now that the acpi_video backlight device registration is a separate step
which runs later, after the drm/kms driver is done setting up its own
native backlight device, it is no longer necessary to monitor for a
native (BACKLIGHT_RAW) device showing up later and to then unregister
the acpi_video backlight device(s).

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:36 -04:00
Mark Langsdorf 81495af250 ACPI: video: Drop backlight_device_get_by_type() call from acpi_video_get_backlight_type()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554

commit a2fc3c899bb091ec69cd74d4d69d71f8b2acdc11
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Thu Apr 28 14:45:35 2022 +0200

All x86/ACPI kms drivers which register native/BACKLIGHT_RAW type
backlight devices call acpi_video_backlight_use_native() now. This sets
__acpi_video_get_backlight_type()'s internal static native_available flag.

This makes the backlight_device_get_by_type(BACKLIGHT_RAW) check
unnecessary.

Relying on the cached native_available value not only is simpler, it will
also work correctly in cases where then native backlight registration was
skipped because of acpi_video_backlight_use_native() returning false.

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:36 -04:00
Mark Langsdorf ebc51616b4 ACPI: video: Add acpi_backlight=video quirk for Lenovo ThinkPad W530
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554

commit a5b2781dcab2c77979a4b8adda781d2543580901
Author: Hans de Goede <hdegoede@redhat.com>
Date: Tue, 4 Apr 2023 13:02:49 +0200

The Lenovo ThinkPad W530 uses a nvidia k1000m GPU. When this gets used
together with one of the older nvidia binary driver series (the latest
series does not support it), then backlight control does not work.

This is caused by commit 3dbc80a3e4c5 ("ACPI: video: Make backlight
class device registration a separate step (v2)") combined with
commit 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for
creating ACPI backlight by default").

After these changes the acpi_video# backlight device is only registered
when requested by a GPU driver calling acpi_video_register_backlight()
which the nvidia binary driver does not do.

I realize that using the nvidia binary driver is not a supported use-case
and users can workaround this by adding acpi_backlight=video on the kernel
commandline, but the ThinkPad W530 is a popular model under Linux users,
so it seems worthwhile to add a quirk for this.

I will also email Nvidia asking them to make the driver call
acpi_video_register_backlight() when an internal LCD panel is detected.
So maybe the next maintenance release of the drivers will fix this...

Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
Cc: All applicable <stable@vger.kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:36 -04:00
Mark Langsdorf eb2edcfaef ACPI: video: Add acpi_backlight=video quirk for Apple iMac14,1 and iMac14,2
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554

commit 2699107989431d6db44f8a9e809ea74c387336d1
Author: Hans de Goede <hdegoede@redhat.com>
Date: Tue, 4 Apr 2023 13:02:48 +0200

On the Apple iMac14,1 and iMac14,2 all-in-ones (monitors with builtin "PC")
the connection between the GPU and the panel is seen by the GPU driver as
regular DP instead of eDP, causing the GPU driver to never call
acpi_video_register_backlight().

(GPU drivers only call acpi_video_register_backlight() when an internal
 panel is detected, to avoid non working acpi_video# devices getting
 registered on desktops which unfortunately is a real issue.)

Fix the missing acpi_video# backlight device on these all-in-ones by
adding a acpi_backlight=video DMI quirk, so that video.ko will
immediately register the backlight device instead of waiting for
an acpi_video_register_backlight() call.

Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
Cc: All applicable <stable@vger.kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:36 -04:00
Mark Langsdorf 13c8ee278b ACPI: video: Add auto_detect arg to __acpi_video_get_backlight_type()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554
Conflicts:
	drivers/acpi/video_detect.c - minor context differences
	include/acpi/video.h - minor context differences

commit 78dfc9d1d1abb9e400386fa9c5724a8f7d75e3b9
Author: Hans de Goede <hdegoede@redhat.com>
Date: Tue, 4 Apr 2023 13:02:46 +0200

Allow callers of __acpi_video_get_backlight_type() to pass a pointer
to a bool which will get set to false if the backlight-type comes from
the cmdline or a DMI quirk and set to true if auto-detection was used.

And make __acpi_video_get_backlight_type() non static so that it can
be called directly outside of video_detect.c .

While at it turn the acpi_video_get_backlight_type() and
acpi_video_backlight_use_native() wrappers into static inline functions
in include/acpi/video.h, so that we need to export one less symbol.

Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
Cc: All applicable <stable@vger.kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:36 -04:00
Mark Langsdorf 65671edd7b ACPI: video: Add backlight=native DMI quirk for Acer Aspire 3830TG
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554

commit 5e7a3bf65db57461d0f47955248fcadf37321a74
Author: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 20 Mar 2023 16:59:46 +0100

The Acer Aspire 3830TG predates Windows 8, so it defaults to using
acpi_video# for backlight control, but this is non functional on
this model.

Add a DMI quirk to use the native backlight interface which does
work properly.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:36 -04:00
Mark Langsdorf a11d826fb7 ACPI: video: Add backlight=native DMI quirk for Dell Vostro 15 3535
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176554

commit 89b0411481967a2e8c91190a211a359966cfcf4b
Author: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
Date: Thu, 2 Mar 2023 17:33:00 +0800

Sometimes the system boots up with a acpi_video0 backlight interface
which doesn't work. So add Dell Vostro 15 3535 into the
video_detect_dmi_table to set it to native explicitly.

Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Signed-off-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-05-18 15:46:36 -04:00
Mika Penttilä 371c963ada ACPI: video: Add acpi_video_backlight_use_native() helper
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2160456
Upstream Status: v6.1-rc1

commit 2600bfa3df9944562d43d1f17016832a6ffa3b38
Author:     Hans de Goede <hdegoede@redhat.com>
AuthorDate: Fri Apr 15 13:59:48 2022 +0200
Commit:     Hans de Goede <hdegoede@redhat.com>
CommitDate: Wed Aug 17 12:30:05 2022 +0200

    ATM on x86 laptops where we want userspace to use the acpi_video backlight
    device we often register both the GPU's native backlight device and
    acpi_video's firmware acpi_video# backlight device. This relies on
    userspace preferring firmware type backlight devices over native ones, but
    registering 2 backlight devices for a single display really is undesirable.

    On x86 laptops where the native GPU backlight device should be used,
    the registering of other backlight devices is avoided by their drivers
    using acpi_video_get_backlight_type() and only registering their backlight
    if the return value matches their type.

    acpi_video_get_backlight_type() uses
    backlight_device_get_by_type(BACKLIGHT_RAW) to determine if a native
    driver is available and will never return native if this returns
    false. This means that the GPU's native backlight registering code
    cannot just call acpi_video_get_backlight_type() to determine if it
    should register its backlight, since acpi_video_get_backlight_type() will
    never return native until the native backlight has already registered.

    To fix this add a new internal native function parameter to
    acpi_video_get_backlight_type(), which when set to true will make
    acpi_video_get_backlight_type() behave as if a native backlight has
    already been registered.

    And add a new acpi_video_backlight_use_native() helper, which sets this
    to true, for use in native GPU backlight code.

    Changes in v2:
    - Replace adding a native parameter to acpi_video_get_backlight_type() with
      adding a new acpi_video_backlight_use_native() helper.

    Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Signed-off-by: Mika Penttilä <mpenttil@redhat.com>
2023-04-07 16:04:01 +03:00
Mark Langsdorf 3282db65a8 ACPI: video: Use native backlight on Dell Inspiron N4010
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2122317

commit 03c440a26cba6cfa540d65924e9db86fcea362b2
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 14 Jul 2022 21:16:11 +0200

The Dell Inspiron N4010 does not have ACPI backlight control,
so acpi_video_get_backlight_type()'s heuristics return vendor as
the type to use.

But the vendor interface is broken, where as the native (intel_backlight)
works well, add a quirk to use native.

Link: https://lore.kernel.org/regressions/CALF=6jEe5G8+r1Wo0vvz4GjNQQhdkLT5p8uCHn6ZXhg4nsOWow@mail.gmail.com/
Reported-and-tested-by: Ben Greening <bgreening@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2022-11-01 11:04:33 -04:00
Mark Langsdorf db3fc1ac03 ACPI: video: Shortening quirk list by identifying Clevo by board_name only
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2122317

commit f0341e67b3782603737f7788e71bd3530012a4f4
Author: Werner Sembach <wse@tuxedocomputers.com>
Date: Thu, 7 Jul 2022 20:09:53 +0200

Taking a recent change in the i8042 quirklist to this one: Clevo
board_names are somewhat unique, and if not: The generic Board_-/Sys_Vendor
string "Notebook" doesn't help much anyway. So identifying the devices just
by the board_name helps keeping the list significantly shorter and might
even hit more devices requiring the fix.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Fixes: c844d22fe0c0 ("ACPI: video: Force backlight native for Clevo NL5xRU and NL5xNU")
Cc: All applicable <stable@vger.kernel.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2022-11-01 11:04:30 -04:00
Mark Langsdorf f4494c038f ACPI: video: Force backlight native for some TongFang devices
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2122317

commit c752089f7cf5b5800c6ace4cdd1a8351ee78a598
Author: Werner Sembach <wse@tuxedocomputers.com>
Date: Thu, 7 Jul 2022 20:09:52 +0200

The TongFang PF5PU1G, PF4NU1F, PF5NU1G, and PF5LUXG/TUXEDO BA15 Gen10,
Pulse 14/15 Gen1, and Pulse 15 Gen2 have the same problem as the Clevo
NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2:
They have a working native and video interface. 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.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: All applicable <stable@vger.kernel.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2022-11-01 11:04:29 -04:00
Mark Langsdorf 99e6b48b2e ACPI: video: Force backlight native for Clevo NL5xRU and NL5xNU
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2067297

commit c844d22fe0c0b37dc809adbdde6ceb6462c43acf
Author: Werner Sembach <wse@tuxedocomputers.com>
Date: Tue, 15 Mar 2022 20:02:28 +0100

Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2 have both a working
native and video interface. 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.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2022-08-01 14:19:23 -04:00
Mark Langsdorf acfb3f0ca8 ACPI: Use acpi_fetch_acpi_dev() instead of acpi_bus_get_device()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2067294

commit 99ece713773bfa17fdb4ee2a1fb3b7bee82e4b1a
Author: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Date: Fri, 3 Dec 2021 17:37:10 +0100

Modify the ACPI code to use acpi_fetch_acpi_dev() instead of
acpi_bus_get_device() where applicable.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2022-06-07 10:50:14 -04:00
Mark Langsdorf 342c2a9694 ACPI: video: use platform backlight driver on Xiaomi Mi Pad 2
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1998271

commit 60e6655f0a6c6e4604e4b89444e5fb8e3d43a67b
Author: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 3 Nov 2021 15:26:20 +0100

The Xiaomi Mi Pad 2 is a Cherry Trail based x86 tablet which does not
use the i915's driver backlight control support:
 i915 0000:00:02.0: [drm:intel_panel_setup_backlight [i915]] no backlight present per VBT

Like all Cherry Trail devices the ACPI tables on the Xiaomi Mi Pad 2
contain a broken ACPI-video implementation which causes 6 different
acpi_video backlights to get registered when used.

The lack of the i915 driver registering a BACKLIGHT_RAW (aka native) type
backlight causes acpi_video_get_backlight_type() to pick the broken
acpi_video backlight code as the backlight driver to use.

There actually is a separate lp8556 backlight controller connected
over I2C which gets registered as a BACKLIGHT_PLATFORM (aka vendor).

Add a quirk to force acpi_video_get_backlight_type() to return
acpi_backlight_vendor, so that the broken acpi_video backlight
interfaces do not get registered.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2022-05-05 14:57:13 -04:00
Mark Langsdorf 4d814317a8 ACPI: video: Drop dmi_system_id.ident settings from video_detect_dmi_table[]
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1998271

commit 3b6740bdd53cb3713642942c5476fcb6969d57d8
Author: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 3 Nov 2021 15:26:19 +0100

The .ident field of the dmi_system_id structs in the
video_detect_dmi_table[] is not used by the code.

Change all .ident = "..." assignments to comments, this reduces the
size of video_detect.o / video.ko by about 1500 bytes.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2022-05-05 14:57:13 -04:00
Luke D Jones 2dfbacc65d ACPI: video: use native backlight for GA401/GA502/GA503
Force backlight control in these models to use the native interface
at /sys/class/backlight/amdgpu_bl0.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-04-21 18:54:41 +02:00
Chris Chiu c1d1e25a8c ACPI: video: Add missing callback back for Sony VPCEH3U1E
The .callback of the quirk for Sony VPCEH3U1E was unintetionally
removed by the commit 25417185e9 ("ACPI: video: Add DMI quirk
for GIGABYTE GB-BXBT-2807"). Add it back to make sure the quirk
for Sony VPCEH3U1E works as expected.

Fixes: 25417185e9 ("ACPI: video: Add DMI quirk for GIGABYTE GB-BXBT-2807")
Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Reported-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Pavel Machek (CIP) <pavel@denx.de>
Cc: 5.11+ <stable@vger.kernel.org> # 5.11+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-03-19 17:42:41 +01:00
Jasper St. Pierre 25417185e9 ACPI: video: Add DMI quirk for GIGABYTE GB-BXBT-2807
The GIGABYTE GB-BXBT-2807 is a mini-PC which uses off the shelf
components, like an Intel GPU which is meant for mobile systems.
As such, it, by default, has a backlight controller exposed.

Unfortunately, the backlight controller only confuses userspace, which
sees the existence of a backlight device node and has the unrealistic
belief that there is actually a backlight there!

Add a DMI quirk to force the backlight off on this system.

Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Chris Chiu <chiu@endlessos.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-12-07 14:01:22 +01:00
Maximilian Luz c6237b210d ACPI: Fix whitespace inconsistencies
Replaces spaces with tabs where spaces have been (inconsistently) used
for indentation and removes trailing whitespaces.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-11-09 19:08:06 +01:00
Rafael J. Wysocki 5d2a3ca813 Merge branch 'acpi-misc'
* acpi-misc:
  ACPI: Make acpi_evaluate_dsm() prototype consistent
  ACPI: wakeup: Remove dead ACPICA debug code
  ACPI: video: Remove leftover ACPICA debug code
  ACPI: tiny-power-button: Remove dead ACPICA debug code
  ACPI: processor: Remove dead ACPICA debug code
  ACPI: proc: Remove dead ACPICA debug code
  ACPI: PCI: Remove unused ACPICA debug code
  ACPI: event: Remove leftover ACPICA debug code
  ACPI: dock: Remove dead ACPICA debug code
  ACPI: debugfs: Remove dead ACPICA debug code
  ACPI: custom_method: Remove dead ACPICA debug code
  ACPI: container: Remove leftover ACPICA debug functionality
  ACPI: platform: Remove ACPI_MODULE_NAME()
  ACPI: memhotplug: Remove leftover ACPICA debug functionality
  ACPI: LPSS: Remove ACPI_MODULE_NAME()
  ACPI: cmos_rtc: Remove leftover ACPI_MODULE_NAME()
  ACPI: Remove three unused inline functions
2020-10-13 14:44:57 +02:00
Hanjun Guo e0e13705ed ACPI: video: Remove leftover ACPICA debug code
After commit (87521e16a7 "acpi-video-detect: Rewrite backlight interface
selection logic"), ACPI_DEBUG_PRINT() was remove, so ACPI_MODULE_NAME()
and _COMPONENT are not used anymore, remove them.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-09-25 18:25:51 +02:00
Alex Hung b226faab4e ACPI: video: use ACPI backlight for HP 635 Notebook
The default backlight interface is AMD's radeon_bl0 which does not
work on this system, so use the ACPI backlight interface on it
instead.

BugLink: https://bugs.launchpad.net/bugs/1894667
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Alex Hung <alex.hung@canonical.com>
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-09-25 12:59:24 +02:00
Paul Menzel c41c36e900 ACPI: video: Use native backlight on Acer TravelMate 5735Z
Currently, changing the brightness of the internal display of the Acer
TravelMate 5735Z does not work. Pressing the function keys or changing the
slider, GNOME Shell 3.36.2 displays the OSD (five steps), but the
brightness does not change.

The Acer TravelMate 5735Z shipped with Windows 7 and as such does not
trigger our "win8 ready" heuristic for preferring the native backlight
interface.

Still ACPI backlight control doesn't work on this model, where as the
native (intel_video) backlight interface does work by adding
`acpi_backlight=native` or `acpi_backlight=none` to Linux’ command line.

So, add a quirk to force using native backlight control on this model.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=207835
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-05-25 11:58:51 +02:00
Hans de Goede 1c8fbc1f9b ACPI: video: Use native backlight on Acer Aspire 5783z
The Acer Aspire 5783z shipped with Windows 7 and as such does not trigger
our "win8 ready" heuristic for prefering the native backlight interface.

Still ACPI backlight control doesn't work on this model, where as the
native (intel_video) backlight interface does work. Add a quirk to
force using native backlight control on this model.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-04-01 11:18:31 +02:00
Hans de Goede d21a91629f ACPI: video: Do not export a non working backlight interface on MSI MS-7721 boards
Despite our heuristics to not wrongly export a non working ACPI backlight
interface on desktop machines, we still end up exporting one on desktops
using a motherboard from the MSI MS-7721 series.

I've looked at improving the heuristics, but in this case a quirk seems
to be the only way to solve this.

While at it also add a comment to separate the video_detect_force_none
entries in the video_detect_dmi_table from other type of entries, as we
already do for the other entry types.

Cc: All applicable <stable@vger.kernel.org>
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1783786
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-12-19 23:01:52 +01:00
Aaron Ma 53870cf03f ACPI: video: Use native backlight on Lenovo E41-25/45
ACPI backlight control doesn't work on 2 Lenovo E41 laptops.
So force to use native backlight control on them.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-12-16 11:26:55 +01:00
Rafael J. Wysocki 7e8e05fd08 Merge branches 'acpi-utils', 'acpi-video', 'acpi-soc' and 'acpi-button'
* acpi-utils:
  gpio: merrifield: Fix build err without CONFIG_ACPI
  ACPI / utils: Remove deprecated function since no user left
  ASoC: Intel: cht_bsw_rt5672: Convert to use acpi_dev_get_first_match_dev()
  ASoC: Intel: cht_bsw_rt5645: Convert to use acpi_dev_get_first_match_dev()
  ASoC: Intel: bytcr_rt5651: Convert to use acpi_dev_get_first_match_dev()
  ASoC: Intel: bytcr_rt5640: Convert to use acpi_dev_get_first_match_dev()
  ASoC: Intel: bytcht_es8316: Convert to use acpi_dev_get_first_match_dev()
  ASoC: Intel: bytcht_da7213: Convert to use acpi_dev_get_first_match_dev()
  gpio: merrifield: Convert to use acpi_dev_get_first_match_dev()
  extcon: axp288: Convert to use acpi_dev_get_first_match_dev()
  ACPI / utils: Introduce acpi_dev_get_first_match_dev() helper

* acpi-video:
  ACPI: video: Use vendor backlight on Sony VPCEH3U1E

* acpi-soc:
  ACPI / LPSS: Use acpi_lpss_* instead of acpi_subsys_* functions for hibernate

* acpi-button:
  ACPI: button: reinitialize button state upon resume
2019-05-06 10:50:08 +02:00
Zhang Rui aefa763b18 ACPI: video: Use vendor backlight on Sony VPCEH3U1E
On Sony Vaio VPCEH3U1E, ACPI backlight control does not work, and native
backlight works. Thus force use vendor backlight control on this system.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=202401
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-04-01 11:04:54 +02:00
Bjorn Helgaas 603fadf336 ACPI: Fix comment typos
Fix some misspellings in comments.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-03-26 22:33:43 +01:00
Hans de Goede bbf038618a ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E
Just like many other Samsung models, the 670Z5E needs to use the acpi-video
backlight interface rather then the native one for backlight control to
work, add a quirk for this.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1557060
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-03-20 10:38:17 +01:00