Page MenuHomeFreeBSD

acpi_spmc: Call new MS turn on display DSM
Needs ReviewPublic

Authored by obiwac on Tue, Mar 24, 7:54 AM.

Details

Reviewers
olce
Summary

Microsoft added a new function index (turn on display, 9) to their DSM set. This revision calls this, which fixes S0ix on certain machines, such as the Lenovo Yoga Slim 7i Aura, who's ECs use this method as a trigger to restore power to certain devices.

See commit 229ecbaac6b3 ("ACPI: x86: s2idle: Invoke Microsoft _DSM Function 9 (Turn On Display)") on Linux.

And the following: https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-firmware-notifications#turn-on-display-notification-function-9

Sponsored by: The FreeBSD Foundation

Test Plan

Need someone with this function index to try this out and make sure acpi_spmc_run_dsm() is being called with DSM_MODERN_TURN_ON_DISPLAY. You can look at your decompiled DSDT (acpidump -d) under UUID 11e00d56-ce64-47ce-837b-1f898f9aa461, revision ID 0, and in the enumerate functions function (index 0) if that value contains 1 << 9, or you can send me your dump (obiwac@freebsd.org) and I can tell you.

Otherwise we can land this anyway as this won't affect any devices which don't have this DSM.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71687
Build 68570: arc lint + arc unit

Event Timeline

sys/dev/acpica/acpi_spmc.c
275

since we're modifying this global variable, we probably want to enforce that this driver is loaded only once (a system can only ever have one SPMC). Is there an established way to do this in FreeBSD, or should i just set a variable in attach and return ENXIO in probe if it is set?

obiwac edited the summary of this revision. (Show Details)