All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: "Limonciello, Mario" <Mario.Limonciello@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/amdgpu: don't set s3 and s0ix at the same time
Date: Tue, 4 Jan 2022 13:47:14 -0500	[thread overview]
Message-ID: <CADnq5_NwLxnA7p-1S2CLar5PKYptwdVJqde5VjYz=dhLywPrPQ@mail.gmail.com> (raw)
In-Reply-To: <BL1PR12MB515790C579D9A38B018AE43AE24A9@BL1PR12MB5157.namprd12.prod.outlook.com>

On Tue, Jan 4, 2022 at 12:26 PM Limonciello, Mario
<Mario.Limonciello@amd.com> 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@amd.com>
> Sent: Tuesday, January 4, 2022 11:24
> To: Limonciello, Mario <Mario.Limonciello@amd.com>; amd-gfx@lists.freedesktop.org
> 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@amd.com>

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

  reply	other threads:[~2022-01-04 18:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03 15:23 [PATCH 1/2] drm/amdgpu: explicitly check for s0ix when evicting resources Mario Limonciello
2022-01-03 15:23 ` [PATCH 2/2] drm/amdgpu: don't set s3 and s0ix at the same time Mario Limonciello
2022-01-04  2:50   ` Quan, Evan
2022-01-04 17:24   ` Deucher, Alexander
2022-01-04 17:26     ` Limonciello, Mario
2022-01-04 18:47       ` Alex Deucher [this message]
2022-01-04 17:14 ` [PATCH 1/2] drm/amdgpu: explicitly check for s0ix when evicting resources Deucher, Alexander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADnq5_NwLxnA7p-1S2CLar5PKYptwdVJqde5VjYz=dhLywPrPQ@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.