From: Alex Deucher <alexdeucher@gmail.com>
To: amd-gfx@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 6/7] drm/amdgpu: simplify logic in atpx resume handling
Date: Thu, 10 Dec 2020 16:45:17 -0500 [thread overview]
Message-ID: <20201210214518.704305-6-alexander.deucher@amd.com> (raw)
In-Reply-To: <20201210214518.704305-1-alexander.deucher@amd.com>
Simplify the logic in the runtime resume handling for
atpx
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 4f97d493eeda..cac2724e7615 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1382,16 +1382,14 @@ static int amdgpu_pmops_runtime_resume(struct device *dev)
/* Only need to handle PCI state in the driver for ATPX
* PCI core handles it for _PR3.
*/
- if (amdgpu_is_atpx_hybrid()) {
- pci_set_master(pdev);
- } else {
+ if (!amdgpu_is_atpx_hybrid()) {
pci_set_power_state(pdev, PCI_D0);
amdgpu_device_load_pci_state(pdev);
ret = pci_enable_device(pdev);
if (ret)
return ret;
- pci_set_master(pdev);
}
+ pci_set_master(pdev);
} else if (amdgpu_device_supports_boco(drm_dev)) {
/* Only need to handle PCI state in the driver for ATPX
* PCI core handles it for _PR3.
--
2.25.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2020-12-10 21:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 21:45 [PATCH 1/7] drm/amdgpu: split BOCO and ATPX handling Alex Deucher
2020-12-10 21:45 ` [PATCH 2/7] drm/amdgpu: add check for ACPI power resources Alex Deucher
2020-12-10 21:45 ` [PATCH 3/7] drm/amdgpu: update amdgpu_device_supports_boco() Alex Deucher
2020-12-10 21:45 ` [PATCH 4/7] drm/amdgpu: support runtime pm for GPUs that support BOCO Alex Deucher
2020-12-10 21:45 ` [PATCH 5/7] drm/amdgpu: no need to call pci_ignore_hotplug for _PR3 Alex Deucher
2020-12-10 21:45 ` Alex Deucher [this message]
2020-12-10 21:45 ` [PATCH 7/7] drm/amdgpu: print what method we are using for runtime pm Alex Deucher
2020-12-11 2:20 ` Quan, Evan
2020-12-11 2:21 ` 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=20201210214518.704305-6-alexander.deucher@amd.com \
--to=alexdeucher@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox