From: Evan Quan <evan.quan@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Alexander.Deucher@amd.com, Evan Quan <evan.quan@amd.com>
Subject: [PATCH 3/5] drm/amdgpu: correct the audio function initial Dstate
Date: Thu, 3 Jun 2021 12:56:01 +0800 [thread overview]
Message-ID: <20210603045603.977998-3-evan.quan@amd.com> (raw)
In-Reply-To: <20210603045603.977998-1-evan.quan@amd.com>
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);
+ 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))
--
2.29.0
_______________________________________________
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-03 4:56 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 ` Evan Quan [this message]
2021-06-03 11:08 ` [PATCH 3/5] drm/amdgpu: correct the audio function initial Dstate Lazar, Lijo
2021-06-04 4:22 ` Quan, Evan
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=20210603045603.977998-3-evan.quan@amd.com \
--to=evan.quan@amd.com \
--cc=Alexander.Deucher@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.