Skip to content

Commit

Permalink
Merge branches 'acpi-prm' and 'acpi-video'
Browse files Browse the repository at this point in the history
Merge an ACPI PRM (platform runtime) support fix and an ACPI backlight
quirk for 6.2-rc5:

 - Check whether EFI runtime is available when registering the ACPI PRM
   address space handler and when running it (Ard Biesheuvel).

 - Add backlight=native DMI quirk for Acer Aspire 4810T to the ACPI
   video driver (Hans de Goede).

* acpi-prm:
  ACPI: PRM: Check whether EFI runtime is available

* acpi-video:
  ACPI: video: Add backlight=native DMI quirk for Acer Aspire 4810T
  • Loading branch information
Rafael J. Wysocki committed Jan 20, 2023
3 parents 81aae5c + 182da6f + 8ba5fc4 commit 3bdd346
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/acpi/prmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ static acpi_status acpi_platformrt_space_handler(u32 function,
efi_status_t status;
struct prm_context_buffer context;

if (!efi_enabled(EFI_RUNTIME_SERVICES)) {
pr_err_ratelimited("PRM: EFI runtime services no longer available\n");
return AE_NO_HANDLER;
}

/*
* The returned acpi_status will always be AE_OK. Error values will be
* saved in the first byte of the PRM message buffer to be used by ASL.
Expand Down Expand Up @@ -325,6 +330,11 @@ void __init init_prmt(void)

pr_info("PRM: found %u modules\n", mc);

if (!efi_enabled(EFI_RUNTIME_SERVICES)) {
pr_err("PRM: EFI runtime services unavailable\n");
return;
}

status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,
ACPI_ADR_SPACE_PLATFORM_RT,
&acpi_platformrt_space_handler,
Expand Down
8 changes: 8 additions & 0 deletions drivers/acpi/video_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"),
},
},
{
.callback = video_detect_force_native,
/* Acer Aspire 4810T */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4810T"),
},
},
{
.callback = video_detect_force_native,
/* Acer Aspire 5738z */
Expand Down

0 comments on commit 3bdd346

Please sign in to comment.