History

Merge tag 'acpi-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki: "These add one more ACPI IRQ override quirk, improve ACPI companion lookup for backlight devices and add missing kernel command line option values for backlight detection. Specifics: - Improve ACPI companion lookup for backlight devices in the cases when there is more than one candidate ACPI device object (Hans de Goede) - Add missing support for manual selection of NVidia-WMI-EC or Apple GMUX backlight in the kernel command line to the ACPI backlight driver (Hans de Goede) - Skip ACPI IRQ override on Asus Expertbook B2402CBA (Tamim Khan)" * tag 'acpi-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: Fix selecting wrong ACPI fwnode for the iGPU on some Dell laptops ACPI: video: Allow selecting NVidia-WMI-EC or Apple GMUX backlight from the cmdline ACPI: resource: Skip IRQ override on Asus Expertbook B2402CBA

Linus Torvalds committed 3 years ago

Commit cdbbca22 parents 0d0833e df3a71a5 files · +30 −5Browse files

Unified · Split

5 files
  1. drivers/acpi/glue.c +12 −2
  2. drivers/acpi/resource.c +7 −0
  3. drivers/acpi/scan.c +5 −2
  4. drivers/acpi/video_detect.c +4 −0
  5. include/acpi/acpi_bus.h +2 −1
drivers/acpi/glue.c+12−2
@@ -75,7 +75,8 @@ static struct acpi_bus_type *acpi_get_bus_type(struct device *dev) · 74 unmodified lines
75}75}
76 76
77#define FIND_CHILD_MIN_SCORE 177#define FIND_CHILD_MIN_SCORE 1
78#define FIND_CHILD_MAX_SCORE 278#define FIND_CHILD_MID_SCORE 2
79#define FIND_CHILD_MAX_SCORE 3
79 80
80static int match_any(struct acpi_device *adev, void *not_used)81static int match_any(struct acpi_device *adev, void *not_used)
81{82{
@@ -96,8 +97,17 @@ static int find_child_checks(struct acpi_device *adev, bool check_children) · 14 unmodified lines
96 return -ENODEV;97 return -ENODEV;
97 98
98 status = acpi_evaluate_integer(adev->handle, "_STA", NULL, &sta);99 status = acpi_evaluate_integer(adev->handle, "_STA", NULL, &sta);
99 if (status == AE_NOT_FOUND)100 if (status == AE_NOT_FOUND) {
101 /*
102 * Special case: backlight device objects without _STA are
103 * preferred to other objects with the same _ADR value, because
104 * it is more likely that they are actually useful.
105 */
106 if (adev->pnp.type.backlight)
107 return FIND_CHILD_MID_SCORE;
108
100 return FIND_CHILD_MIN_SCORE;109 return FIND_CHILD_MIN_SCORE;
110 }
101 111
102 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_ENABLED))112 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_ENABLED))
103 return -ENODEV;113 return -ENODEV;
drivers/acpi/resource.c+7−0
@@ -432,6 +432,13 @@ static const struct dmi_system_id asus_laptop[] = { · 431 unmodified lines
432 DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"),432 DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"),
433 },433 },
434 },434 },
435 {
436 .ident = "Asus ExpertBook B2402CBA",
437 .matches = {
438 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
439 DMI_MATCH(DMI_BOARD_NAME, "B2402CBA"),
440 },
441 },
435 {442 {
436 .ident = "Asus ExpertBook B2502",443 .ident = "Asus ExpertBook B2502",
437 .matches = {444 .matches = {
drivers/acpi/scan.c+5−2
@@ -1370,9 +1370,12 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp, · 1369 unmodified lines
1370 * Some devices don't reliably have _HIDs & _CIDs, so add1370 * Some devices don't reliably have _HIDs & _CIDs, so add
1371 * synthetic HIDs to make sure drivers can find them.1371 * synthetic HIDs to make sure drivers can find them.
1372 */1372 */
1373 if (acpi_is_video_device(handle))1373 if (acpi_is_video_device(handle)) {
1374 acpi_add_id(pnp, ACPI_VIDEO_HID);1374 acpi_add_id(pnp, ACPI_VIDEO_HID);
1375 else if (acpi_bay_match(handle))1375 pnp->type.backlight = 1;
1376 break;
1377 }
1378 if (acpi_bay_match(handle))
1376 acpi_add_id(pnp, ACPI_BAY_HID);1379 acpi_add_id(pnp, ACPI_BAY_HID);
1377 else if (acpi_dock_match(handle))1380 else if (acpi_dock_match(handle))
1378 acpi_add_id(pnp, ACPI_DOCK_HID);1381 acpi_add_id(pnp, ACPI_DOCK_HID);
drivers/acpi/video_detect.c+4−0
@@ -50,6 +50,10 @@ static void acpi_video_parse_cmdline(void) · 49 unmodified lines
50 acpi_backlight_cmdline = acpi_backlight_video;50 acpi_backlight_cmdline = acpi_backlight_video;
51 if (!strcmp("native", acpi_video_backlight_string))51 if (!strcmp("native", acpi_video_backlight_string))
52 acpi_backlight_cmdline = acpi_backlight_native;52 acpi_backlight_cmdline = acpi_backlight_native;
53 if (!strcmp("nvidia_wmi_ec", acpi_video_backlight_string))
54 acpi_backlight_cmdline = acpi_backlight_nvidia_wmi_ec;
55 if (!strcmp("apple_gmux", acpi_video_backlight_string))
56 acpi_backlight_cmdline = acpi_backlight_apple_gmux;
53 if (!strcmp("none", acpi_video_backlight_string))57 if (!strcmp("none", acpi_video_backlight_string))
54 acpi_backlight_cmdline = acpi_backlight_none;58 acpi_backlight_cmdline = acpi_backlight_none;
55}59}
include/acpi/acpi_bus.h+2−1
@@ -230,7 +230,8 @@ struct acpi_pnp_type { · 229 unmodified lines
230 u32 hardware_id:1;230 u32 hardware_id:1;
231 u32 bus_address:1;231 u32 bus_address:1;
232 u32 platform_id:1;232 u32 platform_id:1;
233 u32 reserved:29;233 u32 backlight:1;
234 u32 reserved:28;
234};235};
235 236
236struct acpi_device_pnp {237struct acpi_device_pnp {