mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Maíra Canal" <mcanal@igalia.com>
To: Brian Norris <briannorris@chromium.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-pm@vger.kernel.org, Ulf Hansson <ulfh@kernel.org>,
	linux-kernel@vger.kernel.org,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Jyri Sarha <jyri.sarha@iki.fi>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>, Melissa Wen <mwen@igalia.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 02/13] drm: Discard pm_runtime_put_autosuspend() return values
Date: Tue, 13 Oct 2026 10:55:02 -0300	[thread overview]
Message-ID: <d99331fb-2e8c-457d-ad56-a3d52ff4fb97@igalia.com> (raw)
In-Reply-To: <20261006161337.2.If1822f9a34be06cf5939be44ac6465c543087c75@changeid>

Hi Brian,

On 06/10/26 20:13, Brian Norris wrote:
> Several DRM drivers use or propagate the pm_runtime_put_autosuspend()
> return value, which is not particularly useful.
> 
> Returning an error code from pm_runtime_put_autosuspend() merely means
> that it has not queued up a timer or work item to check whether or not
> the device can be suspended and there are many perfectly valid
> situations in which that can happen, like after writing "on" to the
> device's runtime PM "control" attribute in sysfs for one example.
> 
> For this reason, modify these drivers to simply discard the
> pm_runtime_put_autosuspend() return value, and change the return type of
> v3d_pm_runtime_put() (whose return value is never used) to void.  Also
> drop the redundant pm_runtime_mark_last_busy() calls right before
> pm_runtime_put_autosuspend().
> 
> This will facilitate a planned change of the
> pm_runtime_put_autosuspend() return type to void in the future, similar
> to commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return
> type to void").
> 
> Signed-off-by: Brian Norris <briannorris@chromium.org>

For V3D,

Reviewed-by: Maíra Canal <mcanal@igalia.com>

Best regards,
- Maíra

> ---
> This patch is independent of the rest of the series, except for the end
> (changing the return type). I expect it can be applied by individual
> maintainers, and we pick up the end once the dust is settled.
> 
>   drivers/gpu/drm/panel/panel-simple.c | 8 +-------
>   drivers/gpu/drm/tidss/tidss_drv.c    | 7 +------
>   drivers/gpu/drm/v3d/v3d_drv.h        | 4 ++--
>   3 files changed, 4 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index c95964ba25a9..193d1b2b0ba5 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -318,12 +318,7 @@ static int panel_simple_suspend(struct device *dev)
>   
>   static int panel_simple_unprepare(struct drm_panel *panel)
>   {
> -	int ret;
> -
> -	pm_runtime_mark_last_busy(panel->dev);
> -	ret = pm_runtime_put_autosuspend(panel->dev);
> -	if (ret < 0)
> -		return ret;
> +	pm_runtime_put_autosuspend(panel->dev);
>   
>   	return 0;
>   }
> @@ -389,7 +384,6 @@ static int panel_simple_get_modes(struct drm_panel *panel,
>   
>   		num += drm_edid_connector_add_modes(connector);
>   
> -		pm_runtime_mark_last_busy(panel->dev);
>   		pm_runtime_put_autosuspend(panel->dev);
>   	}
>   
> diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
> index 1c8cc18bc53c..44b0b009c29a 100644
> --- a/drivers/gpu/drm/tidss/tidss_drv.c
> +++ b/drivers/gpu/drm/tidss/tidss_drv.c
> @@ -40,12 +40,7 @@ int tidss_runtime_get(struct tidss_device *tidss)
>   
>   void tidss_runtime_put(struct tidss_device *tidss)
>   {
> -	int r;
> -
> -	pm_runtime_mark_last_busy(tidss->dev);
> -
> -	r = pm_runtime_put_autosuspend(tidss->dev);
> -	WARN_ON(r < 0);
> +	pm_runtime_put_autosuspend(tidss->dev);
>   }
>   
>   static int __maybe_unused tidss_pm_runtime_suspend(struct device *dev)
> diff --git a/drivers/gpu/drm/v3d/v3d_drv.h b/drivers/gpu/drm/v3d/v3d_drv.h
> index 29fa14be130b..eb002048ae9c 100644
> --- a/drivers/gpu/drm/v3d/v3d_drv.h
> +++ b/drivers/gpu/drm/v3d/v3d_drv.h
> @@ -669,9 +669,9 @@ static __always_inline int v3d_pm_runtime_get(struct v3d_dev *v3d)
>   	return pm_runtime_resume_and_get(v3d->drm.dev);
>   }
>   
> -static __always_inline int v3d_pm_runtime_put(struct v3d_dev *v3d)
> +static __always_inline void v3d_pm_runtime_put(struct v3d_dev *v3d)
>   {
> -	return pm_runtime_put_autosuspend(v3d->drm.dev);
> +	pm_runtime_put_autosuspend(v3d->drm.dev);
>   }
>   
>   /* v3d_sched.c */


  reply	other threads:[~2026-10-13 13:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06 23:13 [PATCH 00/13] PM: runtime: Convert pm_runtime_put_autosuspend() and friends to a void function Brian Norris
2026-10-06 23:13 ` [PATCH 01/13] hwrng: cctrng: Discard pm_runtime_put_autosuspend() return value Brian Norris
2026-10-06 23:13 ` [PATCH 02/13] drm: Discard pm_runtime_put_autosuspend() return values Brian Norris
2026-10-13 13:55   ` Maíra Canal [this message]
2026-10-06 23:13 ` [PATCH 03/13] iio: " Brian Norris
2026-10-12 20:39   ` Andy Shevchenko
2026-10-06 23:13 ` [PATCH 04/13] media: venus: " Brian Norris
2026-10-06 23:13 ` [PATCH 05/13] pinctrl: qcom: lpass-lpi: " Brian Norris
2026-10-07 11:44   ` Linus Walleij
2026-10-06 23:13 ` [PATCH 06/13] spi: ti-qspi: Discard pm_runtime_put_autosuspend() return value Brian Norris
2026-10-06 23:13 ` [PATCH 07/13] greybus: " Brian Norris
2026-10-07 14:28   ` Alex Elder
2026-10-07 15:19     ` Brian Norris
2026-10-06 23:13 ` [PATCH 08/13] ALSA: hda: " Brian Norris
2026-10-07  9:45   ` Takashi Iwai
2026-10-06 23:13 ` [PATCH 09/13] ASoC: codecs: lpass: Discard pm_runtime_put_autosuspend() return values Brian Norris
2026-10-06 23:13 ` [PATCH 10/13] ASoC: intel: atom: Discard pm_runtime_put_autosuspend() return value Brian Norris
2026-10-10  9:34   ` Cezary Rojewski
2026-10-06 23:13 ` [PATCH 11/13] ASoC: SOF: Discard pm_runtime_put_autosuspend() return values Brian Norris
2026-10-06 23:13 ` [PATCH 12/13] PM: runtime: Drop pm_runtime_put_autosuspend() return code Brian Norris
2026-10-06 23:13 ` [PATCH 13/13] PM: runtime: Drop pm_request_{idle,autosuspend}() return codes Brian Norris
2026-10-10  8:42 ` (subset) [PATCH 00/13] PM: runtime: Convert pm_runtime_put_autosuspend() and friends to a void function Bartosz Golaszewski

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=d99331fb-2e8c-457d-ad56-a3d52ff4fb97@igalia.com \
    --to=mcanal@igalia.com \
    --cc=briannorris@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=jyri.sarha@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=neil.armstrong@linaro.org \
    --cc=rafael@kernel.org \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    --cc=ulfh@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

all inboxes | Powered by JetHome®