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
Unified · Split
| @@ -75,7 +75,8 @@ static struct acpi_bus_type *acpi_get_bus_type(struct device *dev) · 74 unmodified lines | ||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | #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 | |
| 79 | 80 | |
| 80 | 81 | static 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 | 97 | return -ENODEV; |
| 97 | 98 | |
| 98 | 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 | 109 | return FIND_CHILD_MIN_SCORE; |
| 110 | + } | |
| 101 | 111 | |
| 102 | 112 | if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_ENABLED)) |
| 103 | 113 | return -ENODEV; |
| @@ -432,6 +432,13 @@ static const struct dmi_system_id asus_laptop[] = { · 431 unmodified lines | ||
| 432 | 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 | 443 | .ident = "Asus ExpertBook B2502", |
| 437 | 444 | .matches = { |
| @@ -1370,9 +1370,12 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp, · 1369 unmodified lines | ||
| 1370 | 1370 | * Some devices don't reliably have _HIDs & _CIDs, so add |
| 1371 | 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 | 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 | 1379 | acpi_add_id(pnp, ACPI_BAY_HID); |
| 1377 | 1380 | else if (acpi_dock_match(handle)) |
| 1378 | 1381 | acpi_add_id(pnp, ACPI_DOCK_HID); |
| @@ -50,6 +50,10 @@ static void acpi_video_parse_cmdline(void) · 49 unmodified lines | ||
| 50 | 50 | acpi_backlight_cmdline = acpi_backlight_video; |
| 51 | 51 | if (!strcmp("native", acpi_video_backlight_string)) |
| 52 | 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 | 57 | if (!strcmp("none", acpi_video_backlight_string)) |
| 54 | 58 | acpi_backlight_cmdline = acpi_backlight_none; |
| 55 | 59 | } |
| @@ -230,7 +230,8 @@ struct acpi_pnp_type { · 229 unmodified lines | ||
| 230 | 230 | u32 hardware_id:1; |
| 231 | 231 | u32 bus_address:1; |
| 232 | 232 | u32 platform_id:1; |
| 233 | − u32 reserved:29; | |
| 233 | + u32 backlight:1; | |
| 234 | + u32 reserved:28; | |
| 234 | 235 | }; |
| 235 | 236 | |
| 236 | 237 | struct acpi_device_pnp { |