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
7575 }
7676
7777 #define FIND_CHILD_MIN_SCORE 1
78−#define FIND_CHILD_MAX_SCORE 2
78+#define FIND_CHILD_MID_SCORE 2
79+#define FIND_CHILD_MAX_SCORE 3
7980
8081 static int match_any(struct acpi_device *adev, void *not_used)
8182 {
@@ -96,8 +97,17 @@ static int find_child_checks(struct acpi_device *adev, bool check_children) · 14 unmodified lines
9697 return -ENODEV;
9798
9899 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+
100109 return FIND_CHILD_MIN_SCORE;
110+ }
101111
102112 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_ENABLED))
103113 return -ENODEV;
drivers/acpi/resource.c+7−0
@@ -432,6 +432,13 @@ static const struct dmi_system_id asus_laptop[] = { · 431 unmodified lines
432432 DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"),
433433 },
434434 },
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+ },
435442 {
436443 .ident = "Asus ExpertBook B2502",
437444 .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
13701370 * Some devices don't reliably have _HIDs & _CIDs, so add
13711371 * synthetic HIDs to make sure drivers can find them.
13721372 */
1373− if (acpi_is_video_device(handle))
1373+ if (acpi_is_video_device(handle)) {
13741374 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))
13761379 acpi_add_id(pnp, ACPI_BAY_HID);
13771380 else if (acpi_dock_match(handle))
13781381 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
5050 acpi_backlight_cmdline = acpi_backlight_video;
5151 if (!strcmp("native", acpi_video_backlight_string))
5252 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;
5357 if (!strcmp("none", acpi_video_backlight_string))
5458 acpi_backlight_cmdline = acpi_backlight_none;
5559 }
include/acpi/acpi_bus.h+2−1
@@ -230,7 +230,8 @@ struct acpi_pnp_type { · 229 unmodified lines
230230 u32 hardware_id:1;
231231 u32 bus_address:1;
232232 u32 platform_id:1;
233− u32 reserved:29;
233+ u32 backlight:1;
234+ u32 reserved:28;
234235 };
235236
236237 struct acpi_device_pnp {