All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
@ 2021-12-09 20:08 ` Daniel Baluta
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Baluta @ 2021-12-09 20:08 UTC (permalink / raw)
  To: broonie
  Cc: pierre-louis.bossart, lgirdwood, ranjani.sridharan, kai.vehmanen,
	alsa-devel, linux-kernel, linux-mediatek, Allen-KH Cheng,
	Daniel Baluta, Paul Olaru

From: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>

In SOF OF device, pm_runtime_put_autosuspend() is not
matching any pm_runtime_get_sync().

This is imbalanced for PM runtime.

Also, for consistency we call pm_runtime_mark_last_busy()
before enabling PM runtime.

1. Remove pm_runtime_put_autosuspend() in probe_complete
2. Reorder PM runtime calls int probe_complete

Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
Changes since v1:
- Added my own signed-off-by

 sound/soc/sof/sof-of-dev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c
index 412cbb824b84..b0089698eecb 100644
--- a/sound/soc/sof/sof-of-dev.c
+++ b/sound/soc/sof/sof-of-dev.c
@@ -74,11 +74,9 @@ static void sof_of_probe_complete(struct device *dev)
 	/* allow runtime_pm */
 	pm_runtime_set_autosuspend_delay(dev, SND_SOF_SUSPEND_DELAY_MS);
 	pm_runtime_use_autosuspend(dev);
+	pm_runtime_mark_last_busy(dev);
 	pm_runtime_set_active(dev);
 	pm_runtime_enable(dev);
-
-	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
 }
 
 static int sof_of_probe(struct platform_device *pdev)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
@ 2021-12-09 20:08 ` Daniel Baluta
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Baluta @ 2021-12-09 20:08 UTC (permalink / raw)
  To: broonie
  Cc: pierre-louis.bossart, alsa-devel, Allen-KH Cheng, kai.vehmanen,
	lgirdwood, linux-kernel, ranjani.sridharan, linux-mediatek,
	Paul Olaru, Daniel Baluta

From: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>

In SOF OF device, pm_runtime_put_autosuspend() is not
matching any pm_runtime_get_sync().

This is imbalanced for PM runtime.

Also, for consistency we call pm_runtime_mark_last_busy()
before enabling PM runtime.

1. Remove pm_runtime_put_autosuspend() in probe_complete
2. Reorder PM runtime calls int probe_complete

Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
Changes since v1:
- Added my own signed-off-by

 sound/soc/sof/sof-of-dev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c
index 412cbb824b84..b0089698eecb 100644
--- a/sound/soc/sof/sof-of-dev.c
+++ b/sound/soc/sof/sof-of-dev.c
@@ -74,11 +74,9 @@ static void sof_of_probe_complete(struct device *dev)
 	/* allow runtime_pm */
 	pm_runtime_set_autosuspend_delay(dev, SND_SOF_SUSPEND_DELAY_MS);
 	pm_runtime_use_autosuspend(dev);
+	pm_runtime_mark_last_busy(dev);
 	pm_runtime_set_active(dev);
 	pm_runtime_enable(dev);
-
-	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
 }
 
 static int sof_of_probe(struct platform_device *pdev)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
@ 2021-12-09 20:08 ` Daniel Baluta
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Baluta @ 2021-12-09 20:08 UTC (permalink / raw)
  To: broonie
  Cc: pierre-louis.bossart, lgirdwood, ranjani.sridharan, kai.vehmanen,
	alsa-devel, linux-kernel, linux-mediatek, Allen-KH Cheng,
	Daniel Baluta, Paul Olaru

From: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>

In SOF OF device, pm_runtime_put_autosuspend() is not
matching any pm_runtime_get_sync().

This is imbalanced for PM runtime.

Also, for consistency we call pm_runtime_mark_last_busy()
before enabling PM runtime.

1. Remove pm_runtime_put_autosuspend() in probe_complete
2. Reorder PM runtime calls int probe_complete

Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
Changes since v1:
- Added my own signed-off-by

 sound/soc/sof/sof-of-dev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c
index 412cbb824b84..b0089698eecb 100644
--- a/sound/soc/sof/sof-of-dev.c
+++ b/sound/soc/sof/sof-of-dev.c
@@ -74,11 +74,9 @@ static void sof_of_probe_complete(struct device *dev)
 	/* allow runtime_pm */
 	pm_runtime_set_autosuspend_delay(dev, SND_SOF_SUSPEND_DELAY_MS);
 	pm_runtime_use_autosuspend(dev);
+	pm_runtime_mark_last_busy(dev);
 	pm_runtime_set_active(dev);
 	pm_runtime_enable(dev);
-
-	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
 }
 
 static int sof_of_probe(struct platform_device *pdev)
-- 
2.27.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
  2021-12-09 20:08 ` Daniel Baluta
  (?)
@ 2021-12-14 13:25   ` Mark Brown
  -1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-12-14 13:25 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: ranjani.sridharan, linux-mediatek, Allen-KH Cheng,
	pierre-louis.bossart, kai.vehmanen, Paul Olaru, linux-kernel,
	Daniel Baluta, lgirdwood, alsa-devel

On Thu, 9 Dec 2021 22:08:30 +0200, Daniel Baluta wrote:
> From: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>
> 
> In SOF OF device, pm_runtime_put_autosuspend() is not
> matching any pm_runtime_get_sync().
> 
> This is imbalanced for PM runtime.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
      commit: 475b17b4a875ef31246c6a038ee60d5ca4982ea5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
@ 2021-12-14 13:25   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-12-14 13:25 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: ranjani.sridharan, linux-mediatek, Allen-KH Cheng,
	pierre-louis.bossart, kai.vehmanen, Paul Olaru, linux-kernel,
	Daniel Baluta, lgirdwood, alsa-devel

On Thu, 9 Dec 2021 22:08:30 +0200, Daniel Baluta wrote:
> From: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>
> 
> In SOF OF device, pm_runtime_put_autosuspend() is not
> matching any pm_runtime_get_sync().
> 
> This is imbalanced for PM runtime.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
      commit: 475b17b4a875ef31246c6a038ee60d5ca4982ea5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
@ 2021-12-14 13:25   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-12-14 13:25 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: alsa-devel, Allen-KH Cheng, kai.vehmanen, lgirdwood,
	linux-kernel, pierre-louis.bossart, ranjani.sridharan,
	linux-mediatek, Paul Olaru, Daniel Baluta

On Thu, 9 Dec 2021 22:08:30 +0200, Daniel Baluta wrote:
> From: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>
> 
> In SOF OF device, pm_runtime_put_autosuspend() is not
> matching any pm_runtime_get_sync().
> 
> This is imbalanced for PM runtime.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
      commit: 475b17b4a875ef31246c6a038ee60d5ca4982ea5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-14 13:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 20:08 [PATCH v2] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device Daniel Baluta
2021-12-09 20:08 ` Daniel Baluta
2021-12-09 20:08 ` Daniel Baluta
2021-12-14 13:25 ` Mark Brown
2021-12-14 13:25   ` Mark Brown
2021-12-14 13:25   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.