<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" dir="auto">
Any problem with PMFW sequence in the way Linux handles s2idle when it's not enabled in ACPI?</div>
<div id="ms-outlook-mobile-signature" dir="auto">
<div><br>
</div>
Thanks,<br>
Lijo</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Limonciello, Mario <Mario.Limonciello@amd.com><br>
<b>Sent:</b> Monday, January 17, 2022 10:45:44 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Lazar, Lijo <Lijo.Lazar@amd.com><br>
<b>Cc:</b> Bjoren Dasse <bjoern.daase@gmail.com><br>
<b>Subject:</b> RE: [PATCH v2] drm/amd: Warn users about potential s0ix problems</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[Public]<br>
<br>
This has been sitting a week or so.<br>
Bump on review for this patch.<br>
<br>
> -----Original Message-----<br>
> From: Limonciello, Mario <Mario.Limonciello@amd.com><br>
> Sent: Tuesday, January 11, 2022 14:00<br>
> To: amd-gfx@lists.freedesktop.org<br>
> Cc: Limonciello, Mario <Mario.Limonciello@amd.com>; Bjoren Dasse<br>
> <bjoern.daase@gmail.com><br>
> Subject: [PATCH v2] drm/amd: Warn users about potential s0ix problems<br>
> <br>
> On some OEM setups users can configure the BIOS for S3 or S2idle.<br>
> When configured to S3 users can still choose 's2idle' in the kernel by<br>
> using `/sys/power/mem_sleep`. Before commit 6dc8265f9803<br>
> ("drm/amdgpu:<br>
> always reset the asic in suspend (v2)"), the GPU would crash. Now when<br>
> configured this way, the system should resume but will use more power.<br>
> <br>
> As such, adjust the `amdpu_acpi_is_s0ix function` to warn users about<br>
> potential power consumption issues during their first attempt at<br>
> suspending.<br>
> <br>
> Reported-by: Bjoren Dasse <bjoern.daase@gmail.com><br>
> Link: <a href="https://gitlab.freedesktop.org/drm/amd/-/issues/1824">https://gitlab.freedesktop.org/drm/amd/-/issues/1824</a><br>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com><br>
> ---<br>
> v1->v2:<br>
> * Only show messages in s2idle cases<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 16 ++++++++++------<br>
> 1 file changed, 10 insertions(+), 6 deletions(-)<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c<br>
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c<br>
> index 4811b0faafd9..1295de6d6c30 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c<br>
> @@ -1040,11 +1040,15 @@ void amdgpu_acpi_detect(void)<br>
> */<br>
> bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)<br>
> {<br>
> -#if IS_ENABLED(CONFIG_AMD_PMC) && IS_ENABLED(CONFIG_SUSPEND)<br>
> - if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {<br>
> - if (adev->flags & AMD_IS_APU)<br>
> - return pm_suspend_target_state ==<br>
> PM_SUSPEND_TO_IDLE;<br>
> - }<br>
> + if (!(adev->flags & AMD_IS_APU) ||<br>
> + pm_suspend_target_state != PM_SUSPEND_TO_IDLE)<br>
> + return false;<br>
> + if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))<br>
> + dev_warn_once(adev->dev,<br>
> + "BIOS is not configured for suspend-to-idle, power<br>
> consumption will be higher\n");<br>
> +#if !IS_ENABLED(CONFIG_AMD_PMC)<br>
> + dev_warn_once(adev->dev,<br>
> + "amd-pmc is not enabled in the kernel, power<br>
> consumption will be higher\n");<br>
> #endif<br>
> - return false;<br>
> + return true;<br>
> }<br>
> --<br>
> 2.25.1<br>
</div>
</span></font></div>
</body>
</html>