summaryrefslogtreecommitdiff
path: root/block/bfq-iosched.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2022-12-15 12:41:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-04 13:28:51 +0300
commit5fe70f9683f872e63793edf098a89fe95e5fca95 (patch)
tree050d2c039760bcdb807a84afc6ecbb8f8e6a33fa /block/bfq-iosched.c
parentba074330a4872a1466bf6a5e7df32b5f18ee1729 (diff)
downloadlinux-5fe70f9683f872e63793edf098a89fe95e5fca95.tar.xz
ACPI: video: Fix Apple GMUX backlight detection
[ Upstream commit 3cf3b7f012f3ea8bdc56196e367cf07c10424855 ] The apple-gmux driver only binds to old GMUX devices which have an IORESOURCE_IO resource (using inb()/outb()) rather then memory-mapped IO (IORESOURCE_MEM). T2 MacBooks use the new style GMUX devices (with IORESOURCE_MEM access), so these are not supported by the apple-gmux driver. This is not a problem since they have working ACPI video backlight support. But the apple_gmux_present() helper only checks if an ACPI device with the "APP000B" HID is present, causing acpi_video_get_backlight_type() to return acpi_backlight_apple_gmux disabling the acpi_video backlight device. Add a new apple_gmux_backlight_present() helper which checks that the "APP000B" device actually is an old GMUX device with an IORESOURCE_IO resource. This fixes the acpi_video0 backlight no longer registering on T2 MacBooks. Note people are working to add support for the new style GMUX to Linux: https://github.com/kekrby/linux-t2/commits/wip/hybrid-graphics Once this lands this patch should be reverted so that acpi_video_get_backlight_type() also prefers the gmux on new style GMUX MacBooks, but for now this is necessary to avoid regressing backlight control on T2 Macs. Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection") Reported-and-tested-by: Aditya Garg <gargaditya08@live.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block/bfq-iosched.c')
0 files changed, 0 insertions, 0 deletions