ASoC: amd: correct pm_runtime enable sequence
Subsystems (3)
PATCH 1/1 ASoC: amd: correct pm_runtime enable sequence
Replace pm_runtime_allow() with pm_runtime_mark_last_busy() & pm_runtime_set_active() in pm_runtime enable sequence for dma drivers.
--- 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(-)
sound/soc/amd/ps/ps-pdm-dma.c +2 -1
@@ -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 ; }
sound/soc/amd/raven/acp3x-pcm-dma.c +2 -1
@@ -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 ; }
sound/soc/amd/renoir/acp3x-pdm-dma.c +2 -1
@@ -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 ; }
sound/soc/amd/vangogh/acp5x-pcm-dma.c +2 -2
@@ -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 ; }
sound/soc/amd/yc/acp6x-pdm-dma.c +2 -1
@@ -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 ; }
Signature · 1 line
2.25.1
Mark Brown
maintainerQuoted 3 lines · Arun Gopal Kondaveeti
Replace
pm_runtime_allow()withpm_runtime_mark_last_busy()&pm_runtime_set_active()inpm_runtimeenable 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.
Quoted 7 lines · Mark Brown
Quoted 3 lines · Arun Gopal Kondaveeti
Replace
pm_runtime_allow()withpm_runtime_mark_last_busy()&pm_runtime_set_active()inpm_runtimeenable 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.
Mark Brown
maintainerQuoted 11 lines · Arungopal
Quoted 8 lines · Mark Brown
Quoted 3 lines · Arun Gopal Kondaveeti
Replace
pm_runtime_allow()withpm_runtime_mark_last_busy()&pm_runtime_set_active()inpm_runtimeenable 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_allowis 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.