[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ad5e0eff-e043-2e27-d152-54f3047da0a3@gmail.com>
Date: Tue, 31 Jan 2023 14:23:15 +0100
From: Matthias Brugger <matthias.bgg@...il.com>
To: Roger Lu <roger.lu@...iatek.com>,
Enric Balletbo Serra <eballetbo@...il.com>,
Kevin Hilman <khilman@...nel.org>,
Nicolas Boichat <drinkcat@...gle.com>
Cc: Fan Chen <fan.chen@...iatek.com>,
Jia-wei Chang <jia-wei.chang@...iatek.com>,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org,
Project_Global_Chrome_Upstream_Group@...iatek.com,
Shang XiaoJing <shangxiaojing@...wei.com>
Subject: Re: [PATCH v4 04/14] soc: mediatek: mtk-svs: Use
pm_runtime_resume_and_get() in svs_init01()
On 11/01/2023 08:45, Roger Lu wrote:
> From: Shang XiaoJing <shangxiaojing@...wei.com>
>
> svs_init01() calls pm_runtime_get_sync() and added fail path as
> svs_init01_finish to put usage_counter. However, pm_runtime_get_sync()
> will increment usage_counter even it failed. Fix it by replacing it with
> pm_runtime_resume_and_get() to keep usage counter balanced.
>
> Fixes: 681a02e95000 ("soc: mediatek: SVS: introduce MTK SVS engine")
> Signed-off-by: Shang XiaoJing <shangxiaojing@...wei.com>
> Signed-off-by: Roger Lu <roger.lu@...iatek.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Applied, thanks!
> ---
> drivers/soc/mediatek/mtk-svs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
> index 64d4d03ab71c..9575aa645643 100644
> --- a/drivers/soc/mediatek/mtk-svs.c
> +++ b/drivers/soc/mediatek/mtk-svs.c
> @@ -1324,7 +1324,7 @@ static int svs_init01(struct svs_platform *svsp)
> svsb->pm_runtime_enabled_count++;
> }
>
> - ret = pm_runtime_get_sync(svsb->opp_dev);
> + ret = pm_runtime_resume_and_get(svsb->opp_dev);
> if (ret < 0) {
> dev_err(svsb->dev, "mtcmos on fail: %d\n", ret);
> goto svs_init01_resume_cpuidle;
Powered by blists - more mailing lists