Linux Sound subsystem development
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>
Cc: sound-open-firmware@alsa-project.org,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 74/80] ASoC: SOF: Remove redundant pm_runtime_mark_last_busy() calls
Date: Fri, 4 Jul 2025 11:26:47 +0300	[thread overview]
Message-ID: <36559b7c-d77e-4cb0-b8da-e4877bb81943@linux.intel.com> (raw)
In-Reply-To: <20250704075459.3222908-1-sakari.ailus@linux.intel.com>



On 04/07/2025 10:54, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().

Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  sound/soc/sof/control.c                        | 1 -
>  sound/soc/sof/debug.c                          | 1 -
>  sound/soc/sof/ipc3-dtrace.c                    | 1 -
>  sound/soc/sof/ipc4-loader.c                    | 1 -
>  sound/soc/sof/pcm.c                            | 1 -
>  sound/soc/sof/sof-client-ipc-flood-test.c      | 1 -
>  sound/soc/sof/sof-client-ipc-kernel-injector.c | 1 -
>  sound/soc/sof/sof-client-ipc-msg-injector.c    | 1 -
>  sound/soc/sof/sof-client-probes.c              | 3 ---
>  9 files changed, 11 deletions(-)
> 
> diff --git a/sound/soc/sof/control.c b/sound/soc/sof/control.c
> index 463d418e7200..a3fd1d523c09 100644
> --- a/sound/soc/sof/control.c
> +++ b/sound/soc/sof/control.c
> @@ -196,7 +196,6 @@ int snd_sof_bytes_ext_volatile_get(struct snd_kcontrol *kcontrol, unsigned int _
>  	if (tplg_ops && tplg_ops->control && tplg_ops->control->bytes_ext_volatile_get)
>  		ret = tplg_ops->control->bytes_ext_volatile_get(scontrol, binary_data, size);
>  
> -	pm_runtime_mark_last_busy(scomp->dev);
>  	err = pm_runtime_put_autosuspend(scomp->dev);
>  	if (err < 0)
>  		dev_err_ratelimited(scomp->dev, "%s: failed to idle %d\n", __func__, err);
> diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
> index d0ffa1d71145..b24943a65c89 100644
> --- a/sound/soc/sof/debug.c
> +++ b/sound/soc/sof/debug.c
> @@ -217,7 +217,6 @@ static int memory_info_update(struct snd_sof_dev *sdev, char *buf, size_t buff_s
>  	}
>  
>  	ret = sof_ipc_tx_message(sdev->ipc, &msg, msg.size, reply, SOF_IPC_MSG_MAX_SIZE);
> -	pm_runtime_mark_last_busy(sdev->dev);
>  	pm_runtime_put_autosuspend(sdev->dev);
>  	if (ret < 0 || reply->rhdr.error < 0) {
>  		ret = min(ret, reply->rhdr.error);
> diff --git a/sound/soc/sof/ipc3-dtrace.c b/sound/soc/sof/ipc3-dtrace.c
> index 744a91a150bc..e5c8fec173c4 100644
> --- a/sound/soc/sof/ipc3-dtrace.c
> +++ b/sound/soc/sof/ipc3-dtrace.c
> @@ -172,7 +172,6 @@ static int ipc3_trace_update_filter(struct snd_sof_dev *sdev, int num_elems,
>  		goto error;
>  	}
>  	ret = sof_ipc_tx_message_no_reply(sdev->ipc, msg, msg->hdr.size);
> -	pm_runtime_mark_last_busy(sdev->dev);
>  	pm_runtime_put_autosuspend(sdev->dev);
>  
>  error:
> diff --git a/sound/soc/sof/ipc4-loader.c b/sound/soc/sof/ipc4-loader.c
> index ee61394e73d7..b0d293f62d1c 100644
> --- a/sound/soc/sof/ipc4-loader.c
> +++ b/sound/soc/sof/ipc4-loader.c
> @@ -236,7 +236,6 @@ static int sof_ipc4_load_library(struct snd_sof_dev *sdev, unsigned long lib_id,
>  
>  	ret = ipc4_data->load_library(sdev, fw_lib, false);
>  
> -	pm_runtime_mark_last_busy(sdev->dev);
>  	err = pm_runtime_put_autosuspend(sdev->dev);
>  	if (err < 0)
>  		dev_err_ratelimited(sdev->dev, "%s: pm_runtime idle failed: %d\n",
> diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c
> index 090ea3a76892..fe43de1fe96c 100644
> --- a/sound/soc/sof/pcm.c
> +++ b/sound/soc/sof/pcm.c
> @@ -712,7 +712,6 @@ static int sof_pcm_probe(struct snd_soc_component *component)
>  			ret);
>  
>  pm_error:
> -	pm_runtime_mark_last_busy(component->dev);
>  	pm_runtime_put_autosuspend(component->dev);
>  
>  	return ret;
> diff --git a/sound/soc/sof/sof-client-ipc-flood-test.c b/sound/soc/sof/sof-client-ipc-flood-test.c
> index 11b6f7da2882..373f3a125372 100644
> --- a/sound/soc/sof/sof-client-ipc-flood-test.c
> +++ b/sound/soc/sof/sof-client-ipc-flood-test.c
> @@ -223,7 +223,6 @@ static ssize_t sof_ipc_flood_dfs_write(struct file *file, const char __user *buf
>  	ret = sof_debug_ipc_flood_test(cdev, flood_duration_test,
>  				       ipc_duration_ms, ipc_count);
>  
> -	pm_runtime_mark_last_busy(dev);
>  	err = pm_runtime_put_autosuspend(dev);
>  	if (err < 0)
>  		dev_err_ratelimited(dev, "debugfs write failed to idle %d\n", err);
> diff --git a/sound/soc/sof/sof-client-ipc-kernel-injector.c b/sound/soc/sof/sof-client-ipc-kernel-injector.c
> index 8b28c3dc920c..249bd2d6c8d2 100644
> --- a/sound/soc/sof/sof-client-ipc-kernel-injector.c
> +++ b/sound/soc/sof/sof-client-ipc-kernel-injector.c
> @@ -65,7 +65,6 @@ static ssize_t sof_kernel_msg_inject_dfs_write(struct file *file, const char __u
>  
>  	sof_client_ipc_rx_message(cdev, hdr, priv->kernel_buffer);
>  
> -	pm_runtime_mark_last_busy(dev);
>  	ret = pm_runtime_put_autosuspend(dev);
>  	if (ret < 0)
>  		dev_err_ratelimited(dev, "debugfs write failed to idle %d\n", ret);
> diff --git a/sound/soc/sof/sof-client-ipc-msg-injector.c b/sound/soc/sof/sof-client-ipc-msg-injector.c
> index ba7ca1c5027f..9c8a0fbfb8df 100644
> --- a/sound/soc/sof/sof-client-ipc-msg-injector.c
> +++ b/sound/soc/sof/sof-client-ipc-msg-injector.c
> @@ -137,7 +137,6 @@ static int sof_msg_inject_send_message(struct sof_client_dev *cdev)
>  	if (ret)
>  		dev_err(dev, "IPC message send failed: %d\n", ret);
>  
> -	pm_runtime_mark_last_busy(dev);
>  	err = pm_runtime_put_autosuspend(dev);
>  	if (err < 0)
>  		dev_err_ratelimited(dev, "debugfs write failed to idle %d\n", err);
> diff --git a/sound/soc/sof/sof-client-probes.c b/sound/soc/sof/sof-client-probes.c
> index aff9ce980429..663c0d3c314c 100644
> --- a/sound/soc/sof/sof-client-probes.c
> +++ b/sound/soc/sof/sof-client-probes.c
> @@ -238,7 +238,6 @@ static ssize_t sof_probes_dfs_points_read(struct file *file, char __user *to,
>  	kfree(desc);
>  
>  pm_error:
> -	pm_runtime_mark_last_busy(dev);
>  	err = pm_runtime_put_autosuspend(dev);
>  	if (err < 0)
>  		dev_err_ratelimited(dev, "debugfs read failed to idle %d\n", err);
> @@ -289,7 +288,6 @@ sof_probes_dfs_points_write(struct file *file, const char __user *from,
>  	if (!ret)
>  		ret = count;
>  
> -	pm_runtime_mark_last_busy(dev);
>  	err = pm_runtime_put_autosuspend(dev);
>  	if (err < 0)
>  		dev_err_ratelimited(dev, "debugfs write failed to idle %d\n", err);
> @@ -337,7 +335,6 @@ sof_probes_dfs_points_remove_write(struct file *file, const char __user *from,
>  	if (!ret)
>  		ret = count;
>  
> -	pm_runtime_mark_last_busy(dev);
>  	err = pm_runtime_put_autosuspend(dev);
>  	if (err < 0)
>  		dev_err_ratelimited(dev, "debugfs write failed to idle %d\n", err);

-- 
Péter


  reply	other threads:[~2025-07-04  8:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
2025-07-04  7:54 ` [PATCH 42/80] mfd: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
2025-07-07  8:47   ` Charles Keepax
2025-07-23  8:42   ` (subset) " Lee Jones
2025-07-04  7:54 ` [PATCH 60/80] soundwire: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 59/80] slimbus: " Sakari Ailus
2025-07-09  6:41   ` Srinivas Kandagatla
2025-07-04  7:54 ` [PATCH 70/80] ASoC: atmel: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 69/80] ALSA: hda: " Sakari Ailus
2025-07-04 11:47   ` Takashi Iwai
2025-07-04 11:52     ` Mark Brown
2025-07-04 11:58       ` Takashi Iwai
2025-07-06  8:27         ` Takashi Iwai
2025-07-04  7:54 ` [PATCH 71/80] ASoC: codecs: " Sakari Ailus
2025-07-07  9:16   ` Charles Keepax
2025-07-04  7:54 ` [PATCH 72/80] ASoC: Intel: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 73/80] ASoC: component: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 74/80] ASoC: SOF: " Sakari Ailus
2025-07-04  8:26   ` Péter Ujfalusi [this message]
2025-07-04  7:55 ` [PATCH 75/80] ALSA: intel_hdmi: " Sakari Ailus
2025-07-04 11:45   ` Takashi Iwai
2025-07-06  8:26     ` Takashi Iwai

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=36559b7c-d77e-4cb0-b8da-e4877bb81943@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.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