* [PATCH] drm/amdgpu: remove misleading amdgpu_pmops_runtime_idle() comment
@ 2024-02-29 18:11 Bjorn Helgaas
2024-02-29 19:12 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Helgaas @ 2024-02-29 18:11 UTC (permalink / raw)
To: David Airlie, Daniel Vetter
Cc: Alex Deucher, Christian König, Xinhui, amd-gfx, dri-devel,
linux-kernel, Bjorn Helgaas
From: Bjorn Helgaas <bhelgaas@google.com>
After 4020c2280233 ("drm/amdgpu: don't runtime suspend if there are
displays attached (v3)"), "ret" is unconditionally set later before being
used, so there's point in initializing it and the associated comment is no
longer meaningful.
Remove the comment and the unnecessary initialization.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index cc69005f5b46..68416e2a9130 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -2744,8 +2744,7 @@ static int amdgpu_pmops_runtime_idle(struct device *dev)
{
struct drm_device *drm_dev = dev_get_drvdata(dev);
struct amdgpu_device *adev = drm_to_adev(drm_dev);
- /* we don't want the main rpm_idle to call suspend - we want to autosuspend */
- int ret = 1;
+ int ret;
if (adev->pm.rpm_mode == AMDGPU_RUNPM_NONE) {
pm_runtime_forbid(dev);
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu: remove misleading amdgpu_pmops_runtime_idle() comment
2024-02-29 18:11 [PATCH] drm/amdgpu: remove misleading amdgpu_pmops_runtime_idle() comment Bjorn Helgaas
@ 2024-02-29 19:12 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2024-02-29 19:12 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: David Airlie, Daniel Vetter, Alex Deucher, Christian König,
Pan, Xinhui, amd-gfx, dri-devel, linux-kernel, Bjorn Helgaas
Applied. Thanks!
On Thu, Feb 29, 2024 at 1:11 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> After 4020c2280233 ("drm/amdgpu: don't runtime suspend if there are
> displays attached (v3)"), "ret" is unconditionally set later before being
> used, so there's point in initializing it and the associated comment is no
> longer meaningful.
>
> Remove the comment and the unnecessary initialization.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index cc69005f5b46..68416e2a9130 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -2744,8 +2744,7 @@ static int amdgpu_pmops_runtime_idle(struct device *dev)
> {
> struct drm_device *drm_dev = dev_get_drvdata(dev);
> struct amdgpu_device *adev = drm_to_adev(drm_dev);
> - /* we don't want the main rpm_idle to call suspend - we want to autosuspend */
> - int ret = 1;
> + int ret;
>
> if (adev->pm.rpm_mode == AMDGPU_RUNPM_NONE) {
> pm_runtime_forbid(dev);
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-29 19:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 18:11 [PATCH] drm/amdgpu: remove misleading amdgpu_pmops_runtime_idle() comment Bjorn Helgaas
2024-02-29 19:12 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®