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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 4, 2022 at 12:26 PM Limonciello, Mario
<Mario.Limonciello@xxxxxxx> wrote:
>
> [AMD Official Use Only]
>
>
>
> Maybe it was used more widely previously?
>
> The only place that I found it in use was amdgpu_device_evict_resources.
>
>
>
> From: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
> Sent: Tuesday, January 4, 2022 11:24
> To: Limonciello, Mario <Mario.Limonciello@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH 2/2] drm/amdgpu: don't set s3 and s0ix at the same time
>
>
>
> [AMD Official Use Only]
>
>
>
> I don't think this will work properly.  The in_s3 flag was mainly for runtime pm vs system suspend.  I'm not sure if in_s0ix is properly handled everywhere we check in_s3.
>

In that case, Acked-by: Alex Deucher <alexander.deucher@xxxxxxx>

>
>
> Alex
>
>
>
> ________________________________
>
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Mario Limonciello <mario.limonciello@xxxxxxx>
> Sent: Monday, January 3, 2022 10:23 AM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
> Cc: Limonciello, Mario <Mario.Limonciello@xxxxxxx>
> 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@xxxxxxx>
> ---
>  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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux