public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Mikko Perttunen <mperttunen@nvidia.com>
To: Thierry Reding <thierry.reding@kernel.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Ion Agorria <ion@agorria.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>
Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] drm/tegra: gr2d/gr3d: Move pm_runtime_enable to gr*d_probe
Date: Tue, 28 Apr 2026 10:52:48 +0900	[thread overview]
Message-ID: <gUUml1BmSZiZjQ7gY5A_cg@nvidia.com> (raw)
In-Reply-To: <20260427075856.85208-2-clamor95@gmail.com>

On Monday, April 27, 2026 4:58 PM Svyatoslav Ryhel wrote:
> From: Ion Agorria <ion@agorria.com>
> 
> The gr*d_remove() has pm_runtime_disable, this indicates it should be
> paired with pm_runtime_enable in the probe instead of being inside
> gr*d_runtime_resume().
> 
> Signed-off-by: Ion Agorria <ion@agorria.com>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  drivers/gpu/drm/tegra/gr2d.c | 8 ++++----
>  drivers/gpu/drm/tegra/gr3d.c | 8 ++++----
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c
> index 21f4dd0fa6af..71f092d59d65 100644
> --- a/drivers/gpu/drm/tegra/gr2d.c
> +++ b/drivers/gpu/drm/tegra/gr2d.c
> @@ -286,6 +286,10 @@ static int gr2d_probe(struct platform_device *pdev)
>  	for (i = 0; i < ARRAY_SIZE(gr2d_addr_regs); i++)
>  		set_bit(gr2d_addr_regs[i], gr2d->addr_regs);
>  
> +	pm_runtime_enable(dev);
> +	pm_runtime_use_autosuspend(dev);
> +	pm_runtime_set_autosuspend_delay(dev, 500);
> +
>  	return 0;
>  }
>  
> @@ -367,10 +371,6 @@ static int __maybe_unused gr2d_runtime_resume(struct device *dev)
>  		goto disable_clk;
>  	}
>  
> -	pm_runtime_enable(dev);
> -	pm_runtime_use_autosuspend(dev);
> -	pm_runtime_set_autosuspend_delay(dev, 500);
> -
>  	return 0;
>  
>  disable_clk:
> diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c
> index 42e9656ab80c..33e88ca4d4c5 100644
> --- a/drivers/gpu/drm/tegra/gr3d.c
> +++ b/drivers/gpu/drm/tegra/gr3d.c
> @@ -517,6 +517,10 @@ static int gr3d_probe(struct platform_device *pdev)
>  	for (i = 0; i < ARRAY_SIZE(gr3d_addr_regs); i++)
>  		set_bit(gr3d_addr_regs[i], gr3d->addr_regs);
>  
> +	pm_runtime_enable(&pdev->dev);
> +	pm_runtime_use_autosuspend(&pdev->dev);
> +	pm_runtime_set_autosuspend_delay(&pdev->dev, 500);
> +
>  	return 0;
>  }
>  
> @@ -578,10 +582,6 @@ static int __maybe_unused gr3d_runtime_resume(struct device *dev)
>  		goto disable_clk;
>  	}
>  
> -	pm_runtime_enable(dev);
> -	pm_runtime_use_autosuspend(dev);
> -	pm_runtime_set_autosuspend_delay(dev, 500);
> -
>  	return 0;
>  
>  disable_clk:
> -- 
> 2.51.0
> 
> 

Oof, looks like I had managed to really bungle this with my earlier
patch. Thanks for fixing it!

FWIW, I've been working on adding some nightly testing for Host1x/
TegraDRM, so hopefully we'll be able to catch such things easier
in the future.

Fixes: 62fa0a985e2c ("drm/tegra: Enable runtime PM during probe")
Acked-by: Mikko Perttunen <mperttunen@nvidia.com>




  reply	other threads:[~2026-04-28  1:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27  7:58 [PATCH v1 0/1] drm/tegra: gr2d/gr3d: Move pm_runtime_enable to gr*d_probe Svyatoslav Ryhel
2026-04-27  7:58 ` [PATCH v1 1/1] " Svyatoslav Ryhel
2026-04-28  1:52   ` Mikko Perttunen [this message]
2026-04-28  4:57     ` Svyatoslav Ryhel
2026-04-30  6:23       ` Mikko Perttunen
2026-04-30  8:04         ` Svyatoslav Ryhel
2026-04-30  8:38           ` Mikko Perttunen
2026-04-30  9:09             ` Svyatoslav Ryhel

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=gUUml1BmSZiZjQ7gY5A_cg@nvidia.com \
    --to=mperttunen@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=clamor95@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ion@agorria.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=thierry.reding@kernel.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