[PATCH 2/2] drm/amdgpu: don't set s3 and s0ix at the same time

Quan, Evan Evan.Quan at amd.com
Tue Jan 4 02:50:04 UTC 2022


[AMD Official Use Only]

Series is acked-by: Evan Quan <evan.quan at amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
> Mario Limonciello
> Sent: Monday, January 3, 2022 11:23 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Limonciello, Mario <Mario.Limonciello at amd.com>
> Subject: [PATCH 2/2] drm/amdgpu: don't set s3 and s0ix at the same time
> 
> This makes it clearer which codepaths are in use specifically in
> one state or the other.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index db2a9dfd5918..413fecc89e6c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -2165,9 +2165,9 @@ static int amdgpu_pmops_suspend(struct device
> *dev)
> 
>  	if (amdgpu_acpi_is_s0ix_active(adev))
>  		adev->in_s0ix = true;
> -	adev->in_s3 = true;
> +	else
> +		adev->in_s3 = true;
>  	r = amdgpu_device_suspend(drm_dev, true);
> -	adev->in_s3 = false;
>  	if (r)
>  		return r;
>  	if (!adev->in_s0ix)
> @@ -2188,6 +2188,8 @@ static int amdgpu_pmops_resume(struct device
> *dev)
>  	r = amdgpu_device_resume(drm_dev, true);
>  	if (amdgpu_acpi_is_s0ix_active(adev))
>  		adev->in_s0ix = false;
> +	else
> +		adev->in_s3 = false;
>  	return r;
>  }
> 
> --
> 2.25.1


More information about the amd-gfx mailing list