mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] ASoC: amd: correct pm_runtime enable sequence
  2023-06-14  0:31 [PATCH] ASoC: amd: correct pm_runtime enable sequence Arun Gopal Kondaveeti
@ 2023-06-13 14:09 ` Mark Brown
  2023-06-16 12:58   ` kondaveeti, Arungopal
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2023-06-13 14:09 UTC (permalink / raw)
  To: Arun Gopal Kondaveeti
  Cc: alsa-devel, vsujithkumar.reddy, Vijendar.Mukunda,
	Basavaraj.Hiregoudar, Sunil-kumar.Dommati, syed.sabakareem,
	mastan.katragadda, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Uwe Kleine-König, Mario Limonciello, Nicolas Ferre,
	Charles Keepax, open list

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

On Wed, Jun 14, 2023 at 06:01:59AM +0530, Arun Gopal Kondaveeti wrote:

> Replace pm_runtime_allow() with pm_runtime_mark_last_busy()
> & pm_runtime_set_active() in pm_runtime enable sequence for
> dma drivers.

This says what the change does but it doesn't say why the old sequence
was a problem and the new one is better.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* [PATCH] ASoC: amd: correct pm_runtime enable sequence
@ 2023-06-14  0:31 Arun Gopal Kondaveeti
  2023-06-13 14:09 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Arun Gopal Kondaveeti @ 2023-06-14  0:31 UTC (permalink / raw)
  To: broonie, alsa-devel
  Cc: vsujithkumar.reddy, Vijendar.Mukunda, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, syed.sabakareem, mastan.katragadda,
	arungopal.kondaveeti, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, Syed Saba Kareem, Uwe Kleine-König,
	Mario Limonciello, Nicolas Ferre, Charles Keepax, open list

Replace pm_runtime_allow() with pm_runtime_mark_last_busy()
& pm_runtime_set_active() in pm_runtime enable sequence for
dma drivers.

Signed-off-by: Arun Gopal <arungopal.kondaveeti@amd.com>
---
 sound/soc/amd/ps/ps-pdm-dma.c         | 3 ++-
 sound/soc/amd/raven/acp3x-pcm-dma.c   | 3 ++-
 sound/soc/amd/renoir/acp3x-pdm-dma.c  | 3 ++-
 sound/soc/amd/vangogh/acp5x-pcm-dma.c | 4 ++--
 sound/soc/amd/yc/acp6x-pdm-dma.c      | 3 ++-
 5 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c
index bdbbb797c74d..d48f7c5af289 100644
--- a/sound/soc/amd/ps/ps-pdm-dma.c
+++ b/sound/soc/amd/ps/ps-pdm-dma.c
@@ -391,8 +391,9 @@ static int acp63_pdm_audio_probe(struct platform_device *pdev)
 	}
 	pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS);
 	pm_runtime_use_autosuspend(&pdev->dev);
+	pm_runtime_mark_last_busy(&pdev->dev);
+	pm_runtime_set_active(&pdev->dev);
 	pm_runtime_enable(&pdev->dev);
-	pm_runtime_allow(&pdev->dev);
 	return 0;
 }
 
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 7362dd15ad30..9538f3ffc5d9 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -416,8 +416,9 @@ static int acp3x_audio_probe(struct platform_device *pdev)
 
 	pm_runtime_set_autosuspend_delay(&pdev->dev, 2000);
 	pm_runtime_use_autosuspend(&pdev->dev);
+	pm_runtime_mark_last_busy(&pdev->dev);
+	pm_runtime_set_active(&pdev->dev);
 	pm_runtime_enable(&pdev->dev);
-	pm_runtime_allow(&pdev->dev);
 	return 0;
 }
 
diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c
index 4e299f96521f..c3b47e9bd239 100644
--- a/sound/soc/amd/renoir/acp3x-pdm-dma.c
+++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c
@@ -430,8 +430,9 @@ static int acp_pdm_audio_probe(struct platform_device *pdev)
 	}
 	pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS);
 	pm_runtime_use_autosuspend(&pdev->dev);
+	pm_runtime_mark_last_busy(&pdev->dev);
+	pm_runtime_set_active(&pdev->dev);
 	pm_runtime_enable(&pdev->dev);
-	pm_runtime_allow(&pdev->dev);
 	return 0;
 }
 
diff --git a/sound/soc/amd/vangogh/acp5x-pcm-dma.c b/sound/soc/amd/vangogh/acp5x-pcm-dma.c
index 29901ee4bfe3..587dec5bb33d 100644
--- a/sound/soc/amd/vangogh/acp5x-pcm-dma.c
+++ b/sound/soc/amd/vangogh/acp5x-pcm-dma.c
@@ -409,9 +409,9 @@ static int acp5x_audio_probe(struct platform_device *pdev)
 	}
 	pm_runtime_set_autosuspend_delay(&pdev->dev, 2000);
 	pm_runtime_use_autosuspend(&pdev->dev);
+	pm_runtime_mark_last_busy(&pdev->dev);
+	pm_runtime_set_active(&pdev->dev);
 	pm_runtime_enable(&pdev->dev);
-	pm_runtime_allow(&pdev->dev);
-
 	return 0;
 }
 
diff --git a/sound/soc/amd/yc/acp6x-pdm-dma.c b/sound/soc/amd/yc/acp6x-pdm-dma.c
index d818eba48546..72c4591e451b 100644
--- a/sound/soc/amd/yc/acp6x-pdm-dma.c
+++ b/sound/soc/amd/yc/acp6x-pdm-dma.c
@@ -383,8 +383,9 @@ static int acp6x_pdm_audio_probe(struct platform_device *pdev)
 	}
 	pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS);
 	pm_runtime_use_autosuspend(&pdev->dev);
+	pm_runtime_mark_last_busy(&pdev->dev);
+	pm_runtime_set_active(&pdev->dev);
 	pm_runtime_enable(&pdev->dev);
-	pm_runtime_allow(&pdev->dev);
 	return 0;
 }
 
-- 
2.25.1


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

* Re: [PATCH] ASoC: amd: correct pm_runtime enable sequence
  2023-06-13 14:09 ` Mark Brown
@ 2023-06-16 12:58   ` kondaveeti, Arungopal
  2023-06-16 13:11     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: kondaveeti, Arungopal @ 2023-06-16 12:58 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, vsujithkumar.reddy, Vijendar.Mukunda,
	Basavaraj.Hiregoudar, Sunil-kumar.Dommati, syed.sabakareem,
	mastan.katragadda, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Uwe Kleine-König, Mario Limonciello, Nicolas Ferre,
	Charles Keepax, open list



On 6/13/2023 7:39 PM, Mark Brown wrote:
> On Wed, Jun 14, 2023 at 06:01:59AM +0530, Arun Gopal Kondaveeti wrote:
>
>> Replace pm_runtime_allow() with pm_runtime_mark_last_busy()
>> & pm_runtime_set_active() in pm_runtime enable sequence for
>> dma drivers.
> This says what the change does but it doesn't say why the old sequence
> was a problem and the new one is better.

pm_runtime_allow is not needed for child platform drivers .

Previous sequence as listed below which is incorrect.

enable sequence:

     pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS);
     pm_runtime_use_autosuspend(&pdev->dev);
     pm_runtime_enable(&pdev->dev);
     pm_runtime_allow(&pdev->dev);

disable sequence:

pm_runtime_disable(&pdev->dev)

Replaced pm runtime enable sequence.





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

* Re: [PATCH] ASoC: amd: correct pm_runtime enable sequence
  2023-06-16 12:58   ` kondaveeti, Arungopal
@ 2023-06-16 13:11     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2023-06-16 13:11 UTC (permalink / raw)
  To: kondaveeti, Arungopal
  Cc: alsa-devel, vsujithkumar.reddy, Vijendar.Mukunda,
	Basavaraj.Hiregoudar, Sunil-kumar.Dommati, syed.sabakareem,
	mastan.katragadda, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Uwe Kleine-König, Mario Limonciello, Nicolas Ferre,
	Charles Keepax, open list

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

On Fri, Jun 16, 2023 at 06:28:29PM +0530, kondaveeti, Arungopal wrote:
> On 6/13/2023 7:39 PM, Mark Brown wrote:
> > On Wed, Jun 14, 2023 at 06:01:59AM +0530, Arun Gopal Kondaveeti wrote:

> > > Replace pm_runtime_allow() with pm_runtime_mark_last_busy()
> > > & pm_runtime_set_active() in pm_runtime enable sequence for
> > > dma drivers.

> > This says what the change does but it doesn't say why the old sequence
> > was a problem and the new one is better.

> pm_runtime_allow is not needed for child platform drivers .

If it's not needed that explains the removal but not the addition of
set_active()...  This information should be in the changelog.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2023-06-16 13:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14  0:31 [PATCH] ASoC: amd: correct pm_runtime enable sequence Arun Gopal Kondaveeti
2023-06-13 14:09 ` Mark Brown
2023-06-16 12:58   ` kondaveeti, Arungopal
2023-06-16 13:11     ` Mark Brown

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®