From: "Quan, Evan" <Evan.Quan@amd.com>
To: "Lazar, Lijo" <Lijo.Lazar@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: RE: [PATCH 3/5] drm/amdgpu: correct the audio function initial Dstate
Date: Fri, 4 Jun 2021 04:22:38 +0000 [thread overview]
Message-ID: <DM6PR12MB26199243298ABEDEEFC3496DE43B9@DM6PR12MB2619.namprd12.prod.outlook.com> (raw)
In-Reply-To: <fe0205f8-55a3-076b-954f-9902f876e906@amd.com>
[AMD Official Use Only]
> -----Original Message-----
> From: Lazar, Lijo <Lijo.Lazar@amd.com>
> Sent: Thursday, June 3, 2021 7:09 PM
> To: Quan, Evan <Evan.Quan@amd.com>; amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: Re: [PATCH 3/5] drm/amdgpu: correct the audio function initial
> Dstate
>
>
>
> On 6/3/2021 10:26 AM, Evan Quan wrote:
> > On driver loading, the ASIC is in D0 state. The bundled audio function
> > should be in the same state also.
> >
> > Change-Id: I136e196be7633e95883a7f6c33963f7583e9bad1
> > Signed-off-by: Evan Quan <evan.quan@amd.com>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > index c354ffa62483..9d497b4f8e34 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > @@ -137,6 +137,7 @@ int amdgpu_driver_load_kms(struct
> amdgpu_device *adev, unsigned long flags)
> > struct drm_device *dev;
> > struct pci_dev *parent;
> > int r, acpi_status;
> > + struct pci_dev *p = NULL;
> >
> > dev = adev_to_drm(adev);
> >
> > @@ -212,9 +213,22 @@ int amdgpu_driver_load_kms(struct
> amdgpu_device *adev, unsigned long flags)
> >
> DPM_FLAG_MAY_SKIP_RESUME);
> > pm_runtime_use_autosuspend(dev->dev);
> > pm_runtime_set_autosuspend_delay(dev->dev, 5000);
> > +
> > pm_runtime_allow(dev->dev);
> > +
> > pm_runtime_mark_last_busy(dev->dev);
> > pm_runtime_put_autosuspend(dev->dev);
> > +
> > + p = pci_get_domain_bus_and_slot(pci_domain_nr(adev-
> >pdev->bus),
> > + adev->pdev->bus->number, 1);
>
> For the sake of readability, it's better to wrap this as get_audio_dev or similar.
[Quan, Evan] Sounds good to me. Will update it in V2.
BR
Evan
>
> Thanks,
> Lijo
>
> > + if (p) {
> > + pm_runtime_get_sync(&p->dev);
> > +
> > + pm_runtime_mark_last_busy(&p->dev);
> > + pm_runtime_put_autosuspend(&p->dev);
> > +
> > + pci_dev_put(p);
> > + }
> > }
> >
> > if (amdgpu_acpi_smart_shift_update(dev,
> AMDGPU_SS_DRV_LOAD))
> >
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-06-04 4:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 4:55 [PATCH 1/5] drm/amd/pm: drop the incomplete fix for Navi14 runpm issue Evan Quan
2021-06-03 4:56 ` [PATCH 2/5] drm/amd/pm: correct the runpm handling for BACO supported ASIC Evan Quan
2021-06-03 4:56 ` [PATCH 3/5] drm/amdgpu: correct the audio function initial Dstate Evan Quan
2021-06-03 11:08 ` Lazar, Lijo
2021-06-04 4:22 ` Quan, Evan [this message]
2021-06-03 4:56 ` [PATCH 4/5] drm/amd/pm: clear the cached dpm feature status Evan Quan
2021-06-03 11:04 ` Lazar, Lijo
2021-06-04 4:23 ` Quan, Evan
2021-06-03 4:56 ` [PATCH 5/5] drm/amd/pm: correct the dpm features disablement for Navi1x Evan Quan
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=DM6PR12MB26199243298ABEDEEFC3496DE43B9@DM6PR12MB2619.namprd12.prod.outlook.com \
--to=evan.quan@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Lijo.Lazar@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.