Linux Sound subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: phucduc.bui@gmail.com
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH 4/5] ASoC: amd: vangogh: Use devm_pm_runtime_enable()
Date: Thu, 03 Dec 2026 10:08:08 +0000	[thread overview]
Message-ID: <sashiko-outbox-247526@kernel.org> (raw)
In-Reply-To: <20261203094558.26423-5-phucduc.bui@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ASoC: amd: vangogh: re-probe leaves ACP interrupts disabled
  with RPM_ACTIVE
--

commit 983886aff15c90cac7f01cfc098a5c66f698ca06
Author: bui duc phuc <phucduc.bui@gmail.com>

ASoC: amd: vangogh: Use devm_pm_runtime_enable()

This commit replaces manual pm_runtime_enable() and pm_runtime_disable()
calls in the ACP5x PCM DMA driver with devm_pm_runtime_enable(), allowing
acp5x_audio_remove() to be dropped.

> diff --git a/sound/soc/amd/vangogh/acp5x-pcm-dma.c b/sound/soc/amd/vangogh/acp5x-pcm-dma.c
> index 8b09e66610b52..c52288c4c9a86 100644
> --- a/sound/soc/amd/vangogh/acp5x-pcm-dma.c
> +++ b/sound/soc/amd/vangogh/acp5x-pcm-dma.c
> @@ -417,13 +417,8 @@ static int acp5x_audio_probe(struct platform_device *pdev)
>  	pm_runtime_use_autosuspend(&pdev->dev);
>  	pm_runtime_mark_last_busy(&pdev->dev);
>  	pm_runtime_set_active(&pdev->dev);
> -	pm_runtime_enable(&pdev->dev);
> -	return 0;
> -}
>  
> -static void acp5x_audio_remove(struct platform_device *pdev)
> -{
> -	pm_runtime_disable(&pdev->dev);
> +	return devm_pm_runtime_enable(&pdev->dev);
>  }

[Severity: Medium]
Can switching to devm_pm_runtime_enable() leave ACP_EXTERNAL_INTR_ENB
disabled while runtime PM reports RPM_ACTIVE on re-probe?

Unlike acp5x_audio_remove(), devm_pm_runtime_enable() registers
pm_runtime_disable_action(), which calls pm_runtime_dont_use_autosuspend()
before pm_runtime_disable().

On unbind or re-probe under CONFIG_DEBUG_TEST_DRIVER_REMOVE=y while the
device is RPM_ACTIVE with usage_count == 0, disabling autosuspend
synchronously runs acp5x_pcm_suspend() and writes 0 to
ACP_EXTERNAL_INTR_ENB.

If the driver re-probes while the parent pci-acp5x stays active,
acp5x_audio_probe() marks the device RPM_ACTIVE without re-enabling
ACP_EXTERNAL_INTR_ENB.  A PCM stream opened before autosuspend runs (or
with power/control=on) then skips resume and stalls with no DMA IRQs.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203094558.26423-1-phucduc.bui@gmail.com?part=4

  reply	other threads:[~2026-12-03 10:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  9:45 [PATCH 0/5] ASoC: amd: Use devm_pm_runtime_enable() phucduc.bui
2026-12-03  9:45 ` [PATCH 1/5] ASoC: amd: ps: " phucduc.bui
2026-12-03 10:00   ` sashiko-bot
2026-12-03  9:45 ` [PATCH 2/5] ASoC: amd: raven: " phucduc.bui
2026-12-03 10:04   ` sashiko-bot
2026-12-03  9:45 ` [PATCH 3/5] ASoC: amd: renoir: " phucduc.bui
2026-12-03  9:45 ` [PATCH 4/5] ASoC: amd: vangogh: " phucduc.bui
2026-12-03 10:08   ` sashiko-bot [this message]
2026-12-03  9:45 ` [PATCH 5/5] ASoC: amd: yc: " phucduc.bui

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=sashiko-outbox-247526@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=phucduc.bui@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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