Skip to content

Commit f0c6225

Browse files
superm1rafaeljw
authored andcommitted
ACPI: PM: Add support for upcoming AMD uPEP HID AMDI007
AMD systems with uPEP HID AMDI007 should be using revision 2 and the AMD method. Fixes: 8fbd6c1 ("ACPI: PM: Adjust behavior for field problems on AMD systems") Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent ff11764 commit f0c6225

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/acpi/x86/s2idle.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,19 +378,25 @@ static int lps0_device_attach(struct acpi_device *adev,
378378
* AMDI0006:
379379
* - should use rev_id 0x0
380380
* - function mask = 0x3: Should use Microsoft method
381+
* AMDI0007:
382+
* - Should use rev_id 0x2
383+
* - Should only use AMD method
381384
*/
382385
const char *hid = acpi_device_hid(adev);
383-
rev_id = 0;
386+
rev_id = strcmp(hid, "AMDI0007") ? 0 : 2;
384387
lps0_dsm_func_mask = validate_dsm(adev->handle,
385388
ACPI_LPS0_DSM_UUID_AMD, rev_id, &lps0_dsm_guid);
386389
lps0_dsm_func_mask_microsoft = validate_dsm(adev->handle,
387-
ACPI_LPS0_DSM_UUID_MICROSOFT, rev_id,
390+
ACPI_LPS0_DSM_UUID_MICROSOFT, 0,
388391
&lps0_dsm_guid_microsoft);
389392
if (lps0_dsm_func_mask > 0x3 && (!strcmp(hid, "AMD0004") ||
390393
!strcmp(hid, "AMDI0005"))) {
391394
lps0_dsm_func_mask = (lps0_dsm_func_mask << 1) | 0x1;
392395
acpi_handle_debug(adev->handle, "_DSM UUID %s: Adjusted function mask: 0x%x\n",
393396
ACPI_LPS0_DSM_UUID_AMD, lps0_dsm_func_mask);
397+
} else if (lps0_dsm_func_mask_microsoft > 0 && !strcmp(hid, "AMDI0007")) {
398+
lps0_dsm_func_mask_microsoft = -EINVAL;
399+
acpi_handle_debug(adev->handle, "_DSM Using AMD method\n");
394400
}
395401
} else {
396402
rev_id = 1;

0 commit comments

Comments
 (0)