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>,
	"Mahapatra, Rajib" <Rajib.Mahapatra@amd.com>,
	"Liang, Prike" <Prike.Liang@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"S, Shirish" <Shirish.S@amd.com>
Subject: Re: [PATCH v2] drm/amdgpu: skipping SDMA hw_init and hw_fini for S0ix.
Date: Thu, 10 Feb 2022 10:47:32 -0500	[thread overview]
Message-ID: <CADnq5_N3fpN=HammdsurdACixsDEbFZ_3P0SD-UEKZ_4gQBSYg@mail.gmail.com> (raw)
In-Reply-To: <BL1PR12MB51574E5BD540B48C975D7502E22F9@BL1PR12MB5157.namprd12.prod.outlook.com>

On Thu, Feb 10, 2022 at 10:42 AM Limonciello, Mario
<Mario.Limonciello@amd.com> wrote:
>
> [Public]
>
>
>
> > -----Original Message-----
> > From: Alex Deucher <alexdeucher@gmail.com>
> > Sent: Thursday, February 10, 2022 09:28
> > To: Limonciello, Mario <Mario.Limonciello@amd.com>
> > Cc: Mahapatra, Rajib <Rajib.Mahapatra@amd.com>; Liang, Prike
> > <Prike.Liang@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>;
> > amd-gfx@lists.freedesktop.org; S, Shirish <Shirish.S@amd.com>
> > Subject: Re: [PATCH v2] drm/amdgpu: skipping SDMA hw_init and hw_fini for
> > S0ix.
> >
> > On Thu, Feb 10, 2022 at 9:04 AM Limonciello, Mario
> > <Mario.Limonciello@amd.com> wrote:
> > >
> > > [Public]
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Mahapatra, Rajib <Rajib.Mahapatra@amd.com>
> > > > Sent: Thursday, February 10, 2022 07:35
> > > > To: Liang, Prike <Prike.Liang@amd.com>; Limonciello, Mario
> > > > <Mario.Limonciello@amd.com>; Deucher, Alexander
> > > > <Alexander.Deucher@amd.com>
> > > > Cc: amd-gfx@lists.freedesktop.org; S, Shirish <Shirish.S@amd.com>;
> > > > Mahapatra, Rajib <Rajib.Mahapatra@amd.com>
> > > > Subject: [PATCH v2] drm/amdgpu: skipping SDMA hw_init and hw_fini for
> > S0ix.
> > > >
> > > > [Why]
> > > > SDMA ring buffer test failed if suspend is aborted during
> > > > S0i3 resume.
> > > >
> > > > [How]
> > > > If suspend is aborted for some reason during S0i3 resume
> > > > cycle, it follows SDMA ring test failing and errors in amdgpu
> > > > resume. For RN/CZN/Picasso, SMU saves and restores SDMA
> > > > registers during S0ix cycle. So, skipping SDMA suspend and
> > > > resume from driver solves the issue. This time, the system
> > > > is able to resume gracefully even the suspend is aborted.
> > > >
> > > > v2: add changes on sdma_v4, skipping SDMA hw_init and hw_fini.
> > >
> > > This line in the commit message should be "below" the ---
> > >
> > > Besides that the code is better.
> > >
> > > Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> >
> > Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> >
> > I presume sdma_v5.2.c needs a similar fix?
>
> VG doesn't do s0i3 right?

Right.

> No, YC should not take a similar fix.    YC had an architectural change and to
> avoid a "similar" problem takes 26db706a6d77b9e184feb11725e97e53b7a89519.

Isn't that likely just a workaround for the same issue?  This seems cleaner.

Alex

>
> >
> > Alex
> >
> >
> > >
> > > > Signed-off-by: Rajib Mahapatra <rajib.mahapatra@amd.com>
> > > > ---
> > > >  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 8 ++++++++
> > > >  1 file changed, 8 insertions(+)
> > > >
> > > > diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> > > > b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> > > > index 06a7ceda4c87..02115d63b071 100644
> > > > --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> > > > +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> > > > @@ -2058,6 +2058,10 @@ static int sdma_v4_0_suspend(void *handle)
> > > >  {
> > > >       struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> > > >
> > > > +     /* SMU saves SDMA state for us */
> > > > +     if (adev->in_s0ix)
> > > > +             return 0;
> > > > +
> > > >       return sdma_v4_0_hw_fini(adev);
> > > >  }
> > > >
> > > > @@ -2065,6 +2069,10 @@ static int sdma_v4_0_resume(void *handle)
> > > >  {
> > > >       struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> > > >
> > > > +     /* SMU restores SDMA state for us */
> > > > +     if (adev->in_s0ix)
> > > > +             return 0;
> > > > +
> > > >       return sdma_v4_0_hw_init(adev);
> > > >  }
> > > >
> > > > --
> > > > 2.25.1

  reply	other threads:[~2022-02-10 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 13:35 [PATCH v2] drm/amdgpu: skipping SDMA hw_init and hw_fini for S0ix Rajib Mahapatra
2022-02-10 14:04 ` Limonciello, Mario
2022-02-10 15:28   ` Alex Deucher
2022-02-10 15:42     ` Limonciello, Mario
2022-02-10 15:47       ` Alex Deucher [this message]
2022-02-10 16:08         ` Limonciello, Mario
2022-02-10 16:10           ` Alex Deucher
2022-02-11  6:26           ` Liang, Prike

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_N3fpN=HammdsurdACixsDEbFZ_3P0SD-UEKZ_4gQBSYg@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Prike.Liang@amd.com \
    --cc=Rajib.Mahapatra@amd.com \
    --cc=Shirish.S@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.