lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80e86035-f6e5-3059-6cf9-7f6cd93fa2ee@amd.com>
Date:   Fri, 23 Jun 2023 08:40:15 -0500
From:   "Limonciello, Mario" <mario.limonciello@....com>
To:     Arun Gopal Kondaveeti <arungopal.kondaveeti@....com>,
        broonie@...nel.org, alsa-devel@...a-project.org
Cc:     Vijendar.Mukunda@....com, Basavaraj.Hiregoudar@....com,
        sunil-kumar.dommati@....com, venkataprasad.potturu@....com,
        syed.sabakareem@....com, Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
        Charles Keepax <ckeepax@...nsource.cirrus.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ASoC: amd: update pm_runtime enable sequence


On 6/23/2023 4:41 PM, Arun Gopal Kondaveeti wrote:
> pm_runtime_allow() is not needed for ACP child platform devices.
> Replace pm_runtime_allow() with pm_runtime_mark_last_busy()
> & pm_runtime_set_active() in pm_runtime enable sequence for
> ACP child platform drivers.

Can you explain what prompted this?

Does this fix a particular bug, or is it just to correct
things?  If it fixes a particular bug; I think it should be
split up across 5 patches (one for each APU) and then
appropriate Fixes tags applied for each on the code they're
fixing.

>
> Signed-off-by: Arun Gopal <arungopal.kondaveeti@....com>
> ---
>
> Changes since v1:
>      -- Updated commit message
>
> ---
>   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;
>   }
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ