From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, vkoul@kernel.org
Cc: yung-chuan.liao@linux.intel.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, steev@kali.org,
johan+linaro@kernel.org, quic_bjorande@quicinc.com
Subject: Re: [PATCH 2/5] soundwire: qcom: enable runtime pm before controller is registered
Date: Thu, 9 Feb 2023 09:21:31 -0600 [thread overview]
Message-ID: <92a2560a-74cd-aa13-fea6-7619e355b26e@linux.intel.com> (raw)
In-Reply-To: <20230209131336.18252-3-srinivas.kandagatla@linaro.org>
On 2/9/23 07:13, Srinivas Kandagatla wrote:
> Registering controller even before pm runtime is enabled will result
> in pm runtime underflow warnings. Fix this by properly moving
> the runtime pm enable before registering controller.
That seems very odd. The Intel code configures the pm_runtime stuff
*after* the call to sdw_bus_master_add(), and we've not seen any
underflow warnings? We even configure pm_runtime after starting the bus.
Likewise for peripherals the pm_runtime part is enabled after the device
is initialized.
Not following the problem and suggested solution.
> Fixes: 74e79da9fd46 ("soundwire: qcom: add runtime pm support")
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> drivers/soundwire/qcom.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index 9d8ae77bad0a..b2363839624c 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -1417,6 +1417,12 @@ static int qcom_swrm_probe(struct platform_device *pdev)
> }
> }
>
> + pm_runtime_set_autosuspend_delay(dev, 3000);
> + pm_runtime_use_autosuspend(dev);
> + pm_runtime_mark_last_busy(dev);
> + pm_runtime_set_active(dev);
> + pm_runtime_enable(dev);
> +
> ret = sdw_bus_master_add(&ctrl->bus, dev, dev->fwnode);
> if (ret) {
> dev_err(dev, "Failed to register Soundwire controller (%d)\n",
> @@ -1435,12 +1441,6 @@ static int qcom_swrm_probe(struct platform_device *pdev)
> (ctrl->version >> 24) & 0xff, (ctrl->version >> 16) & 0xff,
> ctrl->version & 0xffff);
>
> - pm_runtime_set_autosuspend_delay(dev, 3000);
> - pm_runtime_use_autosuspend(dev);
> - pm_runtime_mark_last_busy(dev);
> - pm_runtime_set_active(dev);
> - pm_runtime_enable(dev);
> -
> /* Clk stop is not supported on WSA Soundwire masters */
> if (ctrl->version <= 0x01030000) {
> ctrl->clock_stop_not_supported = true;
next prev parent reply other threads:[~2023-02-09 15:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 13:13 [PATCH 0/5] soundwire: qcom: stablity fixes Srinivas Kandagatla
2023-02-09 13:13 ` [PATCH 1/5] soundwire: qcom: update status correctly with mask Srinivas Kandagatla
2023-02-09 13:13 ` [PATCH 2/5] soundwire: qcom: enable runtime pm before controller is registered Srinivas Kandagatla
2023-02-09 15:21 ` Pierre-Louis Bossart [this message]
2023-02-09 15:49 ` Srinivas Kandagatla
2023-02-09 13:13 ` [PATCH 3/5] soundwire: qcom: wait for fifo to be empty before suspend Srinivas Kandagatla
2023-02-09 15:23 ` Pierre-Louis Bossart
2023-02-09 15:52 ` Srinivas Kandagatla
2023-02-09 16:33 ` Pierre-Louis Bossart
2023-02-09 17:12 ` Srinivas Kandagatla
2023-02-09 18:24 ` Pierre-Louis Bossart
2023-02-09 13:13 ` [PATCH 4/5] soundwire: qcom: add software workaround for bus clash interrupt assertion Srinivas Kandagatla
2023-02-09 13:13 ` [PATCH 5/5] soundwire: qcom: set clk stop need reset flag at runtime Srinivas Kandagatla
2023-02-09 15:33 ` Pierre-Louis Bossart
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=92a2560a-74cd-aa13-fea6-7619e355b26e@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=johan+linaro@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_bjorande@quicinc.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=steev@kali.org \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.