All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Quan, Evan" <Evan.Quan-5C7GfCeVMHo@public.gmane.org>
Cc: "Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 2/5] drm/amdgpu: move gpu reset out of amdgpu_device_suspend
Date: Fri, 11 Oct 2019 09:25:06 -0400	[thread overview]
Message-ID: <CADnq5_Pbi+K=62tY0sJdOARy74wpnh+Owfq3wQb0tcyXE2XtFw@mail.gmail.com> (raw)
In-Reply-To: <BN8PR12MB3329E4B5DE6B027D43B38F5AE4970-h6+T2+wrnx3WSNCBJ7MpiAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>

On Fri, Oct 11, 2019 at 12:07 AM Quan, Evan <Evan.Quan@amd.com> wrote:
>
> It seems amdgpu_pmops_runtime_suspend() needs to be updated accordingly also.

I purposely left that out.  I think that is a bug.  We don't need to
reset the GPU for runtime suspend.  We only need it for hibernation
because of the whole freeze/thaw dance.

Alex

>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher
> Sent: Thursday, October 10, 2019 11:26 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: [PATCH 2/5] drm/amdgpu: move gpu reset out of amdgpu_device_suspend
>
> Move it into the caller.  There are cases were we don't
> want it.  We need it for hibernation, but we don't need
> it for runtime pm.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ----
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 7 ++++++-
>  2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 9b9b15360194..91bdb246e405 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3173,10 +3173,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
>                 /* Shut down the device */
>                 pci_disable_device(dev->pdev);
>                 pci_set_power_state(dev->pdev, PCI_D3hot);
> -       } else {
> -               r = amdgpu_asic_reset(adev);
> -               if (r)
> -                       DRM_ERROR("amdgpu asic reset failed\n");
>         }
>
>         return 0;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index d43c46de7807..64141386e603 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -1118,8 +1118,13 @@ static int amdgpu_pmops_resume(struct device *dev)
>  static int amdgpu_pmops_freeze(struct device *dev)
>  {
>         struct drm_device *drm_dev = dev_get_drvdata(dev);
> +       struct amdgpu_device *adev = drm_dev->dev_private;
> +       int r;
>
> -       return amdgpu_device_suspend(drm_dev, false, true);
> +       r = amdgpu_device_suspend(drm_dev, false, true);
> +       if (r)
> +               return r;
> +       return amdgpu_asic_reset(adev);
>  }
>
>  static int amdgpu_pmops_thaw(struct device *dev)
> --
> 2.20.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-10-11 13:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 15:26 [PATCH 0/5] Misc runpm and baco fixes Alex Deucher
     [not found] ` <20191010152619.31011-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-10-10 15:26   ` [PATCH 1/5] drm/amdgpu: move pci_save_state into suspend path Alex Deucher
2019-10-10 15:26   ` [PATCH 2/5] drm/amdgpu: move gpu reset out of amdgpu_device_suspend Alex Deucher
     [not found]     ` <20191010152619.31011-3-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-10-11  4:07       ` Quan, Evan
     [not found]         ` <BN8PR12MB3329E4B5DE6B027D43B38F5AE4970-h6+T2+wrnx3WSNCBJ7MpiAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-10-11  4:09           ` Quan, Evan
2019-10-11 13:25           ` Alex Deucher [this message]
     [not found]             ` <CADnq5_Pbi+K=62tY0sJdOARy74wpnh+Owfq3wQb0tcyXE2XtFw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-10-12  1:42               ` Quan, Evan
     [not found]                 ` <MN2PR12MB3344923284A5FF12F631B634E4960-rweVpJHSKToDMgCC8P//OwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-10-12  1:49                   ` Alex Deucher
2019-10-10 15:26   ` [PATCH 3/5] drm/amdgpu: simplify ATPX detection Alex Deucher
2019-10-10 15:26   ` [PATCH 4/5] drm/amdgpu: remove in_baco_reset hack Alex Deucher
2019-10-10 15:26   ` [PATCH 5/5] drm/amdgpu/soc15: add support for baco reset with swSMU Alex Deucher
     [not found]     ` <20191010152619.31011-6-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-10-11  4:09       ` Quan, Evan

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_Pbi+K=62tY0sJdOARy74wpnh+Owfq3wQb0tcyXE2XtFw@mail.gmail.com' \
    --to=alexdeucher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=Evan.Quan-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.