From: Alex Deucher <alexdeucher@gmail.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com,
pavan.ramayanam@amd.com
Subject: Re: [PATCH -next] drm/amdgpu: add missing pci_disable_device() in amdgpu_pmops_runtime_resume()
Date: Fri, 26 Aug 2022 16:41:15 -0400 [thread overview]
Message-ID: <CADnq5_NomUqdzmoYcsPuOiFP9BCCiC=Vtt3AGiXqc=SmP6SODA@mail.gmail.com> (raw)
In-Reply-To: <20220826085754.2296572-1-yangyingliang@huawei.com>
Applied. Thanks!
Alex
On Fri, Aug 26, 2022 at 4:50 AM Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> Add missing pci_disable_device() if amdgpu_device_resume() fails.
>
> Fixes: 8e4d5d43cc6c ("drm/amdgpu: Handling of amdgpu_device_resume return value for graceful teardown")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 429fcdf28836..de7144b06e93 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -2563,8 +2563,11 @@ static int amdgpu_pmops_runtime_resume(struct device *dev)
> amdgpu_device_baco_exit(drm_dev);
> }
> ret = amdgpu_device_resume(drm_dev, false);
> - if (ret)
> + if (ret) {
> + if (amdgpu_device_supports_px(drm_dev))
> + pci_disable_device(pdev);
> return ret;
> + }
>
> if (amdgpu_device_supports_px(drm_dev))
> drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;
> --
> 2.25.1
>
prev parent reply other threads:[~2022-08-26 20:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 8:57 [PATCH -next] drm/amdgpu: add missing pci_disable_device() in amdgpu_pmops_runtime_resume() Yang Yingliang
2022-08-26 20:41 ` Alex Deucher [this message]
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_NomUqdzmoYcsPuOiFP9BCCiC=Vtt3AGiXqc=SmP6SODA@mail.gmail.com' \
--to=alexdeucher@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavan.ramayanam@amd.com \
--cc=yangyingliang@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).