Currently, when entering s2idle, we are parsing the _S255D object to get the shallowest D-state supported by device, as acpi_stype_to_sstate() returns -1 for s2idle.
Instead, we should really be asking the SPMC device for the minimum D-state constraints for the given device, or falling back to _S3D.
To do this, a new acpi_spmc interface was added to ask for an ACPI handle's min D-state constraint, and acpi_device_pwr_for_sleep() has been refactored to attempt the SPMC path on s2idle or the _SxD path if that fails or not doing s2idle.
Relevant document: https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/07_Power_and_Performance_Mgmt/device-power-management-objects.html#s3d-s3-device-state
Sponsored by: The FreeBSD Foundation