2008-08-01 23:37:55 +08:00
|
|
|
/*
|
2015-06-16 22:27:48 +08:00
|
|
|
* Copyright (C) 2015 Red Hat Inc.
|
|
|
|
* Hans de Goede <hdegoede@redhat.com>
|
2008-08-01 23:37:55 +08:00
|
|
|
* Copyright (C) 2008 SuSE Linux Products GmbH
|
|
|
|
* Thomas Renninger <trenn@suse.de>
|
|
|
|
*
|
|
|
|
* May be copied or modified under the terms of the GNU General Public License
|
|
|
|
*
|
|
|
|
* video_detect.c:
|
|
|
|
* After PCI devices are glued with ACPI devices
|
2009-06-11 03:56:00 +08:00
|
|
|
* acpi_get_pci_dev() can be called to identify ACPI graphics
|
2008-08-01 23:37:55 +08:00
|
|
|
* devices for which a real graphics card is plugged in
|
|
|
|
*
|
|
|
|
* Depending on whether ACPI graphics extensions (cmp. ACPI spec Appendix B)
|
|
|
|
* are available, video.ko should be used to handle the device.
|
|
|
|
*
|
2011-12-15 15:27:37 +08:00
|
|
|
* Otherwise vendor specific drivers like thinkpad_acpi, asus-laptop,
|
2010-12-06 15:04:21 +08:00
|
|
|
* sony_acpi,... can take care about backlight brightness.
|
2008-08-01 23:37:55 +08:00
|
|
|
*
|
2022-04-15 19:59:48 +08:00
|
|
|
* Backlight drivers can use acpi_video_get_backlight_type() to determine which
|
|
|
|
* driver should handle the backlight. RAW/GPU-driver backlight drivers must
|
|
|
|
* use the acpi_video_backlight_use_native() helper for this.
|
2008-08-01 23:37:55 +08:00
|
|
|
*
|
2015-06-16 22:27:48 +08:00
|
|
|
* If CONFIG_ACPI_VIDEO is neither set as "compiled in" (y) nor as a module (m)
|
|
|
|
* this file will not be compiled and acpi_video_get_backlight_type() will
|
|
|
|
* always return acpi_backlight_vendor.
|
2008-08-01 23:37:55 +08:00
|
|
|
*/
|
|
|
|
|
2011-10-27 04:22:14 +08:00
|
|
|
#include <linux/export.h>
|
2008-08-01 23:37:55 +08:00
|
|
|
#include <linux/acpi.h>
|
2022-06-04 21:21:51 +08:00
|
|
|
#include <linux/apple-gmux.h>
|
2015-06-16 22:27:48 +08:00
|
|
|
#include <linux/backlight.h>
|
2008-08-01 23:37:55 +08:00
|
|
|
#include <linux/dmi.h>
|
2015-06-16 22:27:47 +08:00
|
|
|
#include <linux/module.h>
|
2009-06-11 03:56:00 +08:00
|
|
|
#include <linux/pci.h>
|
2022-06-04 20:06:18 +08:00
|
|
|
#include <linux/platform_data/x86/nvidia-wmi-ec-backlight.h>
|
2022-12-15 17:41:38 +08:00
|
|
|
#include <linux/pnp.h>
|
2015-06-16 22:27:48 +08:00
|
|
|
#include <linux/types.h>
|
2015-08-14 00:53:37 +08:00
|
|
|
#include <linux/workqueue.h>
|
2015-06-16 22:27:48 +08:00
|
|
|
#include <acpi/video.h>
|
2008-08-01 23:37:55 +08:00
|
|
|
|
2015-06-16 22:27:48 +08:00
|
|
|
static enum acpi_backlight_type acpi_backlight_cmdline = acpi_backlight_undef;
|
|
|
|
static enum acpi_backlight_type acpi_backlight_dmi = acpi_backlight_undef;
|
2008-08-01 23:37:55 +08:00
|
|
|
|
2015-06-16 22:27:47 +08:00
|
|
|
static void acpi_video_parse_cmdline(void)
|
|
|
|
{
|
|
|
|
if (!strcmp("vendor", acpi_video_backlight_string))
|
2015-06-16 22:27:48 +08:00
|
|
|
acpi_backlight_cmdline = acpi_backlight_vendor;
|
2015-06-16 22:27:47 +08:00
|
|
|
if (!strcmp("video", acpi_video_backlight_string))
|
2015-06-16 22:27:48 +08:00
|
|
|
acpi_backlight_cmdline = acpi_backlight_video;
|
|
|
|
if (!strcmp("native", acpi_video_backlight_string))
|
|
|
|
acpi_backlight_cmdline = acpi_backlight_native;
|
2023-01-10 03:18:11 +08:00
|
|
|
if (!strcmp("nvidia_wmi_ec", acpi_video_backlight_string))
|
|
|
|
acpi_backlight_cmdline = acpi_backlight_nvidia_wmi_ec;
|
|
|
|
if (!strcmp("apple_gmux", acpi_video_backlight_string))
|
|
|
|
acpi_backlight_cmdline = acpi_backlight_apple_gmux;
|
2015-06-16 22:27:48 +08:00
|
|
|
if (!strcmp("none", acpi_video_backlight_string))
|
|
|
|
acpi_backlight_cmdline = acpi_backlight_none;
|
2015-06-16 22:27:47 +08:00
|
|
|
}
|
|
|
|
|
2008-08-01 23:37:55 +08:00
|
|
|
static acpi_status
|
|
|
|
find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
|
|
|
|
{
|
2021-12-04 00:37:10 +08:00
|
|
|
struct acpi_device *acpi_dev = acpi_fetch_acpi_dev(handle);
|
2008-08-01 23:37:55 +08:00
|
|
|
long *cap = context;
|
2009-06-11 03:56:00 +08:00
|
|
|
struct pci_dev *dev;
|
2008-08-01 23:37:55 +08:00
|
|
|
|
2015-06-13 20:26:59 +08:00
|
|
|
static const struct acpi_device_id video_ids[] = {
|
2008-08-01 23:37:55 +08:00
|
|
|
{ACPI_VIDEO_HID, 0},
|
|
|
|
{"", 0},
|
|
|
|
};
|
|
|
|
|
2021-12-04 00:37:10 +08:00
|
|
|
if (acpi_dev && !acpi_match_device_ids(acpi_dev, video_ids)) {
|
2009-06-11 03:56:00 +08:00
|
|
|
dev = acpi_get_pci_dev(handle);
|
2008-08-01 23:37:55 +08:00
|
|
|
if (!dev)
|
|
|
|
return AE_OK;
|
2009-06-11 03:56:00 +08:00
|
|
|
pci_dev_put(dev);
|
2013-03-05 05:30:41 +08:00
|
|
|
*cap |= acpi_is_video_device(handle);
|
2008-08-01 23:37:55 +08:00
|
|
|
}
|
|
|
|
return AE_OK;
|
|
|
|
}
|
|
|
|
|
2022-06-04 20:06:18 +08:00
|
|
|
/* This depends on ACPI_WMI which is X86 only */
|
|
|
|
#ifdef CONFIG_X86
|
|
|
|
static bool nvidia_wmi_ec_supported(void)
|
|
|
|
{
|
|
|
|
struct wmi_brightness_args args = {
|
|
|
|
.mode = WMI_BRIGHTNESS_MODE_GET,
|
|
|
|
.val = 0,
|
|
|
|
.ret = 0,
|
|
|
|
};
|
|
|
|
struct acpi_buffer buf = { (acpi_size)sizeof(args), &args };
|
|
|
|
acpi_status status;
|
|
|
|
|
|
|
|
status = wmi_evaluate_method(WMI_BRIGHTNESS_GUID, 0,
|
|
|
|
WMI_BRIGHTNESS_METHOD_SOURCE, &buf, &buf);
|
|
|
|
if (ACPI_FAILURE(status))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If brightness is handled by the EC then nvidia-wmi-ec-backlight
|
|
|
|
* should be used, else the GPU driver(s) should be used.
|
|
|
|
*/
|
|
|
|
return args.ret == WMI_BRIGHTNESS_SOURCE_EC;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
static bool nvidia_wmi_ec_supported(void)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-06-13 15:32:04 +08:00
|
|
|
/* Force to use vendor driver when the ACPI device is known to be
|
|
|
|
* buggy */
|
|
|
|
static int video_detect_force_vendor(const struct dmi_system_id *d)
|
|
|
|
{
|
2015-06-16 22:27:48 +08:00
|
|
|
acpi_backlight_dmi = acpi_backlight_vendor;
|
2012-06-13 15:32:04 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-06-16 22:27:51 +08:00
|
|
|
static int video_detect_force_video(const struct dmi_system_id *d)
|
|
|
|
{
|
|
|
|
acpi_backlight_dmi = acpi_backlight_video;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int video_detect_force_native(const struct dmi_system_id *d)
|
|
|
|
{
|
|
|
|
acpi_backlight_dmi = acpi_backlight_native;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-09-30 04:20:55 +08:00
|
|
|
static int video_detect_portege_r100(const struct dmi_system_id *d)
|
|
|
|
{
|
|
|
|
struct pci_dev *dev;
|
|
|
|
/* Search for Trident CyberBlade XP4m32 to confirm Portégé R100 */
|
|
|
|
dev = pci_get_device(PCI_VENDOR_ID_TRIDENT, 0x2100, NULL);
|
|
|
|
if (dev)
|
|
|
|
acpi_backlight_dmi = acpi_backlight_vendor;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-06-13 20:26:59 +08:00
|
|
|
static const struct dmi_system_id video_detect_dmi_table[] = {
|
2022-11-14 22:44:55 +08:00
|
|
|
/*
|
|
|
|
* Models which should use the vendor backlight interface,
|
|
|
|
* because of broken ACPI video backlight control.
|
|
|
|
*/
|
2022-06-05 00:28:52 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1128309 */
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Acer KAV80 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "KAV80"),
|
|
|
|
},
|
|
|
|
},
|
2012-11-30 20:02:50 +08:00
|
|
|
{
|
2022-06-19 01:19:51 +08:00
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Asus UL30VT */
|
|
|
|
.matches = {
|
2012-11-30 20:02:50 +08:00
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "UL30VT"),
|
|
|
|
},
|
|
|
|
},
|
2013-05-19 19:52:33 +08:00
|
|
|
{
|
2022-06-19 01:19:51 +08:00
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Asus UL30A */
|
|
|
|
.matches = {
|
2013-05-19 19:52:33 +08:00
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "UL30A"),
|
|
|
|
},
|
|
|
|
},
|
2022-06-18 23:15:24 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Asus X55U */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X55U"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2022-11-14 22:44:53 +08:00
|
|
|
/* https://bugs.launchpad.net/bugs/1000146 */
|
2022-06-18 23:15:24 +08:00
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Asus X101CH */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X101CH"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Asus X401U */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X401U"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Asus X501U */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "X501U"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2022-11-14 22:44:53 +08:00
|
|
|
/* https://bugs.launchpad.net/bugs/1000146 */
|
2022-06-18 23:15:24 +08:00
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Asus 1015CX */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "1015CX"),
|
|
|
|
},
|
|
|
|
},
|
2022-06-19 01:01:05 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Samsung N150/N210/N220 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "N150/N210/N220"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Samsung NF110/NF210/NF310 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "NF110/NF210/NF310"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "NF110/NF210/NF310"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Samsung NC210 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "NC210/NC110"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "NC210/NC110"),
|
|
|
|
},
|
|
|
|
},
|
2015-06-16 22:27:51 +08:00
|
|
|
|
2022-11-14 22:44:56 +08:00
|
|
|
/*
|
|
|
|
* Models which should use the vendor backlight interface,
|
|
|
|
* because of broken native backlight control.
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Sony Vaio PCG-FRV35 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "PCG-FRV35"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2022-06-04 22:18:05 +08:00
|
|
|
/*
|
|
|
|
* Toshiba models with Transflective display, these need to use
|
|
|
|
* the toshiba_acpi vendor driver for proper Transflective handling.
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE R500"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE R600"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2023-09-30 04:20:55 +08:00
|
|
|
/*
|
|
|
|
* Toshiba Portégé R100 has working both acpi_video and toshiba_acpi
|
|
|
|
* vendor driver. But none of them gets activated as it has a VGA with
|
|
|
|
* no kernel driver (Trident CyberBlade XP4m32).
|
|
|
|
* The DMI strings are generic so check for the VGA chip in callback.
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
.callback = video_detect_portege_r100,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "Portable PC")
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2023-04-04 19:02:48 +08:00
|
|
|
/*
|
|
|
|
* Models which need acpi_video backlight control where the GPU drivers
|
|
|
|
* do not call acpi_video_register_backlight() because no internal panel
|
|
|
|
* is detected. Typically these are all-in-ones (monitors with builtin
|
|
|
|
* PC) where the panel connection shows up as regular DP instead of eDP.
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_video,
|
|
|
|
/* Apple iMac14,1 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "iMac14,1"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_video,
|
|
|
|
/* Apple iMac14,2 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "iMac14,2"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2015-06-16 22:27:51 +08:00
|
|
|
/*
|
|
|
|
* These models have a working acpi_video backlight control, and using
|
|
|
|
* native backlight causes a regression where backlight does not work
|
|
|
|
* when userspace is not handling brightness key events. Disable
|
|
|
|
* native_backlight on these to fix this:
|
|
|
|
* https://bugzilla.kernel.org/show_bug.cgi?id=81691
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* ThinkPad T420 */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T420"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* ThinkPad T520 */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T520"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* ThinkPad X201s */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"),
|
|
|
|
},
|
|
|
|
},
|
2020-11-05 10:06:00 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* ThinkPad X201T */
|
2020-11-05 10:06:00 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201T"),
|
|
|
|
},
|
|
|
|
},
|
2015-06-16 22:27:51 +08:00
|
|
|
|
|
|
|
/* The native backlight controls do not work on some older machines */
|
|
|
|
{
|
|
|
|
/* https://bugs.freedesktop.org/show_bug.cgi?id=81515 */
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* HP ENVY 15 Notebook */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "HP ENVY 15 Notebook PC"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* SAMSUNG 870Z5E/880Z5E/680Z5E */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "870Z5E/880Z5E/680Z5E"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* SAMSUNG 370R4E/370R4V/370R5E/3570RE/370R5V */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME,
|
|
|
|
"370R4E/370R4V/370R5E/3570RE/370R5V"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1186097 */
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* SAMSUNG 3570R/370R/470R/450R/510R/4450RV */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME,
|
|
|
|
"3570R/370R/470R/450R/510R/4450RV"),
|
|
|
|
},
|
|
|
|
},
|
2018-03-20 01:01:45 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1557060 */
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* SAMSUNG 670Z5E */
|
2018-03-20 01:01:45 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "670Z5E"),
|
|
|
|
},
|
|
|
|
},
|
2015-06-16 22:27:51 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1094948 */
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* SAMSUNG 730U3E/740U3E */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "730U3E/740U3E"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* https://bugs.freedesktop.org/show_bug.cgi?id=87286 */
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* SAMSUNG 900X3C/900X3D/900X3E/900X4C/900X4D */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME,
|
|
|
|
"900X3C/900X3D/900X3E/900X4C/900X4D"),
|
|
|
|
},
|
|
|
|
},
|
2015-10-26 22:20:46 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1272633 */
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Dell XPS14 L421X */
|
2015-10-26 22:20:46 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "XPS L421X"),
|
|
|
|
},
|
|
|
|
},
|
2015-06-16 22:27:51 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1163574 */
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Dell XPS15 L521X */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "XPS L521X"),
|
|
|
|
},
|
|
|
|
},
|
2015-12-30 13:11:24 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.kernel.org/show_bug.cgi?id=108971 */
|
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* SAMSUNG 530U4E/540U4E */
|
2015-12-30 13:11:24 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "530U4E/540U4E"),
|
|
|
|
},
|
|
|
|
},
|
2020-09-14 06:34:03 +08:00
|
|
|
{
|
2022-11-14 22:44:53 +08:00
|
|
|
/* https://bugs.launchpad.net/bugs/1894667 */
|
2020-09-14 06:34:03 +08:00
|
|
|
.callback = video_detect_force_video,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* HP 635 Notebook */
|
2020-09-14 06:34:03 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "HP 635 Notebook PC"),
|
|
|
|
},
|
|
|
|
},
|
2015-06-16 22:27:51 +08:00
|
|
|
|
|
|
|
/* Non win8 machines which need native backlight nevertheless */
|
2015-10-21 19:45:03 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1201530 */
|
|
|
|
.callback = video_detect_force_native,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Lenovo Ideapad S405 */
|
2015-10-21 19:45:03 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "Lenovo IdeaPad S405"),
|
|
|
|
},
|
|
|
|
},
|
2023-04-18 14:42:00 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.suse.com/show_bug.cgi?id=1208724 */
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Lenovo Ideapad Z470 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Z470"),
|
|
|
|
},
|
|
|
|
},
|
2015-06-16 22:27:51 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */
|
|
|
|
.callback = video_detect_force_native,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Lenovo Ideapad Z570 */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
2023-02-02 20:44:49 +08:00
|
|
|
DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"),
|
2015-06-16 22:27:51 +08:00
|
|
|
},
|
|
|
|
},
|
2019-12-16 17:55:12 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Lenovo E41-25 */
|
2019-12-16 17:55:12 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "81FS"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Lenovo E41-45 */
|
2019-12-16 17:55:12 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "82BK"),
|
|
|
|
},
|
|
|
|
},
|
2023-05-17 17:23:59 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Lenovo ThinkPad X131e (3371 AMD version) */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "3371"),
|
|
|
|
},
|
|
|
|
},
|
2023-05-17 17:23:58 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Apple iMac11,3 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "iMac11,3"),
|
|
|
|
},
|
|
|
|
},
|
2023-08-07 17:44:08 +08:00
|
|
|
{
|
|
|
|
/* https://gitlab.freedesktop.org/drm/amd/-/issues/1838 */
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Apple iMac12,1 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "iMac12,1"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* https://gitlab.freedesktop.org/drm/amd/-/issues/2753 */
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Apple iMac12,2 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "iMac12,2"),
|
|
|
|
},
|
|
|
|
},
|
2015-06-16 22:27:51 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1217249 */
|
|
|
|
.callback = video_detect_force_native,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Apple MacBook Pro 12,1 */
|
2015-06-16 22:27:51 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro12,1"),
|
|
|
|
},
|
|
|
|
},
|
2022-07-15 03:16:11 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Dell Inspiron N4010 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron N4010"),
|
|
|
|
},
|
|
|
|
},
|
2015-12-23 02:09:52 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Dell Vostro V131 */
|
2015-12-23 02:09:52 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
|
|
|
|
},
|
|
|
|
},
|
2016-11-29 22:32:15 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1123661 */
|
|
|
|
.callback = video_detect_force_native,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Dell XPS 17 L702X */
|
2016-11-29 22:32:15 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Dell System XPS L702X"),
|
|
|
|
},
|
|
|
|
},
|
2017-06-14 16:29:16 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Dell Precision 7510 */
|
2017-06-14 16:29:16 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"),
|
|
|
|
},
|
|
|
|
},
|
2023-06-21 02:45:04 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Dell Studio 1569 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1569"),
|
|
|
|
},
|
|
|
|
},
|
2023-03-20 23:59:46 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Acer Aspire 3830TG */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 3830TG"),
|
|
|
|
},
|
|
|
|
},
|
2023-01-13 19:41:26 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Acer Aspire 4810T */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4810T"),
|
|
|
|
},
|
|
|
|
},
|
2020-03-31 20:36:23 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Acer Aspire 5738z */
|
2020-03-31 20:36:23 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "JV50"),
|
|
|
|
},
|
|
|
|
},
|
2022-06-05 00:28:52 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1012674 */
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Acer Aspire 5741 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5741"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* https://bugzilla.kernel.org/show_bug.cgi?id=42993 */
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Acer Aspire 5750 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5750"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* https://bugzilla.kernel.org/show_bug.cgi?id=42833 */
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Acer Extensa 5235 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Extensa 5235"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Acer TravelMate 4750 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
|
|
|
|
},
|
|
|
|
},
|
2020-05-22 20:22:28 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.kernel.org/show_bug.cgi?id=207835 */
|
|
|
|
.callback = video_detect_force_native,
|
2021-11-03 22:26:19 +08:00
|
|
|
/* Acer TravelMate 5735Z */
|
2020-05-22 20:22:28 +08:00
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5735Z"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "BA51_MV"),
|
|
|
|
},
|
|
|
|
},
|
2022-06-05 00:28:52 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.kernel.org/show_bug.cgi?id=36322 */
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Acer TravelMate 5760 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5760"),
|
|
|
|
},
|
|
|
|
},
|
2021-04-19 15:39:17 +08:00
|
|
|
{
|
2022-06-19 01:19:51 +08:00
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* ASUSTeK COMPUTER INC. GA401 */
|
|
|
|
.matches = {
|
2021-04-19 15:39:17 +08:00
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "GA401"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2022-06-19 01:19:51 +08:00
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* ASUSTeK COMPUTER INC. GA502 */
|
|
|
|
.matches = {
|
2021-04-19 15:39:17 +08:00
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "GA502"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2022-06-19 01:19:51 +08:00
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* ASUSTeK COMPUTER INC. GA503 */
|
|
|
|
.matches = {
|
2021-04-19 15:39:17 +08:00
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "GA503"),
|
|
|
|
},
|
|
|
|
},
|
2023-01-20 01:24:41 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Asus U46E */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "U46E"),
|
|
|
|
},
|
|
|
|
},
|
2022-06-18 23:44:58 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Asus UX303UB */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "UX303UB"),
|
|
|
|
},
|
|
|
|
},
|
2023-01-20 00:37:44 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* HP EliteBook 8460p */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 8460p"),
|
|
|
|
},
|
|
|
|
},
|
2023-01-20 00:37:43 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* HP Pavilion g6-1d80nr / B4U19UA */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_SKU, "B4U19UA"),
|
|
|
|
},
|
|
|
|
},
|
2022-06-19 01:01:05 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Samsung N150P */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "N150P"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "N150P"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Samsung N145P/N250P/N260P */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "N145P/N250P/N260P"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "N145P/N250P/N260P"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Samsung N250P */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "N250P"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "N250P"),
|
|
|
|
},
|
|
|
|
},
|
2022-11-14 22:44:55 +08:00
|
|
|
{
|
|
|
|
/* https://bugzilla.kernel.org/show_bug.cgi?id=202401 */
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Sony Vaio VPCEH3U1E */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "VPCEH3U1E"),
|
|
|
|
},
|
|
|
|
},
|
2022-11-14 22:44:57 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Sony Vaio VPCY11S1E */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "VPCY11S1E"),
|
|
|
|
},
|
|
|
|
},
|
2022-06-19 01:15:22 +08:00
|
|
|
|
2022-08-29 21:39:23 +08:00
|
|
|
/*
|
|
|
|
* These Toshibas have a broken acpi-video interface for brightness
|
|
|
|
* control. They also have an issue where the panel is off after
|
|
|
|
* suspend until a special firmware call is made to turn it back
|
|
|
|
* on. This is handled by the toshiba_acpi kernel module, so that
|
|
|
|
* module must be enabled for these models to work correctly.
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
/* https://bugzilla.kernel.org/show_bug.cgi?id=21012 */
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Toshiba Portégé R700 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE R700"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* Portégé: https://bugs.freedesktop.org/show_bug.cgi?id=82634 */
|
|
|
|
/* Satellite: https://bugzilla.kernel.org/show_bug.cgi?id=21012 */
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Toshiba Satellite/Portégé R830 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "R830"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Toshiba Satellite/Portégé Z830 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Z830"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2022-11-01 04:20:59 +08:00
|
|
|
/*
|
|
|
|
* Models which have nvidia-ec-wmi support, but should not use it.
|
|
|
|
* Note this indicates a likely firmware bug on these models and should
|
|
|
|
* be revisited if/when Linux gets support for dynamic mux mode.
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
/* Dell G15 5515 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5515"),
|
|
|
|
},
|
|
|
|
},
|
2023-03-02 17:33:00 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_native,
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 15 3535"),
|
|
|
|
},
|
|
|
|
},
|
2023-09-16 05:29:01 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* x86 android tablets which directly control the backlight through
|
|
|
|
* an external backlight controller, typically TI's LP8557.
|
|
|
|
* The backlight is directly controlled by the lp855x driver on these.
|
|
|
|
* This setup means that neither i915's native nor acpi_video backlight
|
|
|
|
* control works. Add a "vendor" quirk to disable both. Note these
|
|
|
|
* devices do not use vendor control in the typical meaning of
|
|
|
|
* vendor specific SMBIOS or ACPI calls being used.
|
|
|
|
*/
|
2023-09-16 05:29:02 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Lenovo Yoga Book X90F / X90L */
|
|
|
|
.matches = {
|
|
|
|
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
|
|
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/*
|
|
|
|
* Lenovo Yoga Tablet 2 830F/L or 1050F/L (The 8" and 10"
|
|
|
|
* Lenovo Yoga Tablet 2 use the same mainboard)
|
|
|
|
*/
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "VALLEYVIEW C0 PLATFORM"),
|
|
|
|
DMI_MATCH(DMI_BOARD_NAME, "BYT-T FFD8"),
|
|
|
|
/* Partial match on beginning of BIOS version */
|
|
|
|
DMI_MATCH(DMI_BIOS_VERSION, "BLADE_21"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Lenovo Yoga Tab 3 Pro YT3-X90F */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
|
|
|
|
},
|
|
|
|
},
|
2023-09-16 05:29:01 +08:00
|
|
|
{
|
|
|
|
.callback = video_detect_force_vendor,
|
|
|
|
/* Xiaomi Mi Pad 2 */
|
|
|
|
.matches = {
|
|
|
|
DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
|
|
|
|
DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"),
|
|
|
|
},
|
|
|
|
},
|
2012-06-13 15:32:04 +08:00
|
|
|
{ },
|
|
|
|
};
|
|
|
|
|
2022-10-24 22:12:10 +08:00
|
|
|
static bool google_cros_ec_present(void)
|
|
|
|
{
|
2022-10-31 18:17:45 +08:00
|
|
|
return acpi_dev_found("GOOG0004") || acpi_dev_found("GOOG000C");
|
2022-10-24 22:12:10 +08:00
|
|
|
}
|
|
|
|
|
2022-11-14 22:44:58 +08:00
|
|
|
/*
|
|
|
|
* Windows 8 and newer no longer use the ACPI video interface, so it often
|
|
|
|
* does not work. So on win8+ systems prefer native brightness control.
|
|
|
|
* Chromebooks should always prefer native backlight control.
|
|
|
|
*/
|
|
|
|
static bool prefer_native_over_acpi_video(void)
|
|
|
|
{
|
|
|
|
return acpi_osi_is_win8() || google_cros_ec_present();
|
|
|
|
}
|
|
|
|
|
2008-08-01 23:37:55 +08:00
|
|
|
/*
|
2015-06-16 22:27:48 +08:00
|
|
|
* Determine which type of backlight interface to use on this system,
|
|
|
|
* First check cmdline, then dmi quirks, then do autodetect.
|
2008-08-01 23:37:55 +08:00
|
|
|
*/
|
2023-04-04 19:02:46 +08:00
|
|
|
enum acpi_backlight_type __acpi_video_get_backlight_type(bool native, bool *auto_detect)
|
2008-08-01 23:37:55 +08:00
|
|
|
{
|
2015-06-16 22:27:48 +08:00
|
|
|
static DEFINE_MUTEX(init_mutex);
|
2022-06-04 20:06:18 +08:00
|
|
|
static bool nvidia_wmi_ec_present;
|
2023-01-24 18:57:54 +08:00
|
|
|
static bool apple_gmux_present;
|
2022-04-15 19:59:48 +08:00
|
|
|
static bool native_available;
|
2015-06-16 22:27:48 +08:00
|
|
|
static bool init_done;
|
|
|
|
static long video_caps;
|
2012-06-13 15:32:04 +08:00
|
|
|
|
2015-06-16 22:27:48 +08:00
|
|
|
/* Parse cmdline, dmi and acpi only once */
|
|
|
|
mutex_lock(&init_mutex);
|
|
|
|
if (!init_done) {
|
|
|
|
acpi_video_parse_cmdline();
|
2012-06-13 15:32:04 +08:00
|
|
|
dmi_check_system(video_detect_dmi_table);
|
2015-06-16 22:27:48 +08:00
|
|
|
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
|
2009-11-13 10:06:08 +08:00
|
|
|
ACPI_UINT32_MAX, find_video, NULL,
|
2015-06-16 22:27:48 +08:00
|
|
|
&video_caps, NULL);
|
2022-06-04 20:06:18 +08:00
|
|
|
nvidia_wmi_ec_present = nvidia_wmi_ec_supported();
|
2023-01-24 18:57:54 +08:00
|
|
|
apple_gmux_present = apple_gmux_detect(NULL, NULL);
|
2015-06-16 22:27:48 +08:00
|
|
|
init_done = true;
|
2008-08-01 23:37:55 +08:00
|
|
|
}
|
2022-04-15 19:59:48 +08:00
|
|
|
if (native)
|
|
|
|
native_available = true;
|
2015-06-16 22:27:48 +08:00
|
|
|
mutex_unlock(&init_mutex);
|
|
|
|
|
2023-04-04 19:02:46 +08:00
|
|
|
if (auto_detect)
|
|
|
|
*auto_detect = false;
|
|
|
|
|
2022-06-04 20:38:24 +08:00
|
|
|
/*
|
|
|
|
* The below heuristics / detection steps are in order of descending
|
|
|
|
* presedence. The commandline takes presedence over anything else.
|
|
|
|
*/
|
2015-06-16 22:27:48 +08:00
|
|
|
if (acpi_backlight_cmdline != acpi_backlight_undef)
|
|
|
|
return acpi_backlight_cmdline;
|
|
|
|
|
2022-06-04 20:38:24 +08:00
|
|
|
/* DMI quirks override any autodetection. */
|
2015-06-16 22:27:48 +08:00
|
|
|
if (acpi_backlight_dmi != acpi_backlight_undef)
|
|
|
|
return acpi_backlight_dmi;
|
|
|
|
|
2023-04-04 19:02:46 +08:00
|
|
|
if (auto_detect)
|
|
|
|
*auto_detect = true;
|
|
|
|
|
2022-06-04 20:06:18 +08:00
|
|
|
/* Special cases such as nvidia_wmi_ec and apple gmux. */
|
|
|
|
if (nvidia_wmi_ec_present)
|
|
|
|
return acpi_backlight_nvidia_wmi_ec;
|
|
|
|
|
2023-01-24 18:57:54 +08:00
|
|
|
if (apple_gmux_present)
|
2022-06-04 21:21:51 +08:00
|
|
|
return acpi_backlight_apple_gmux;
|
|
|
|
|
2022-11-14 22:44:58 +08:00
|
|
|
/* Use ACPI video if available, except when native should be preferred. */
|
|
|
|
if ((video_caps & ACPI_VIDEO_BACKLIGHT) &&
|
|
|
|
!(native_available && prefer_native_over_acpi_video()))
|
|
|
|
return acpi_backlight_video;
|
2022-10-31 18:17:45 +08:00
|
|
|
|
2022-11-14 22:44:58 +08:00
|
|
|
/* Use native if available */
|
2022-11-14 22:44:59 +08:00
|
|
|
if (native_available)
|
2022-11-14 22:44:58 +08:00
|
|
|
return acpi_backlight_native;
|
2015-06-16 22:27:48 +08:00
|
|
|
|
2023-06-08 17:12:58 +08:00
|
|
|
/*
|
|
|
|
* The vendor specific BIOS interfaces are only necessary for
|
|
|
|
* laptops from before ~2008.
|
|
|
|
*
|
|
|
|
* For laptops from ~2008 till ~2023 this point is never reached
|
|
|
|
* because on those (video_caps & ACPI_VIDEO_BACKLIGHT) above is true.
|
|
|
|
*
|
|
|
|
* Laptops from after ~2023 no longer support ACPI_VIDEO_BACKLIGHT,
|
|
|
|
* if this point is reached on those, this likely means that
|
|
|
|
* the GPU kms driver which sets native_available has not loaded yet.
|
|
|
|
*
|
|
|
|
* Returning acpi_backlight_vendor in this case is known to sometimes
|
|
|
|
* cause a non working vendor specific /sys/class/backlight device to
|
|
|
|
* get registered.
|
|
|
|
*
|
|
|
|
* Return acpi_backlight_none on laptops with ACPI tables written
|
|
|
|
* for Windows 8 (laptops from after ~2012) to avoid this problem.
|
|
|
|
*/
|
|
|
|
if (acpi_osi_is_win8())
|
|
|
|
return acpi_backlight_none;
|
|
|
|
|
2022-11-14 22:44:59 +08:00
|
|
|
/* No ACPI video/native (old hw), use vendor specific fw methods. */
|
2022-06-04 20:38:24 +08:00
|
|
|
return acpi_backlight_vendor;
|
2008-08-01 23:37:55 +08:00
|
|
|
}
|
2023-04-04 19:02:46 +08:00
|
|
|
EXPORT_SYMBOL(__acpi_video_get_backlight_type);
|