All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Anderson <dianders@chromium.org>
To: Mark Brown <broonie@kernel.org>, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: akashast@codeaurora.org, linux-arm-msm@vger.kernel.org,
	mkshah@codeaurora.org, swboyd@chromium.org,
	georgi.djakov@linaro.org, ctheegal@codeaurora.org,
	mka@chromium.org, Douglas Anderson <dianders@chromium.org>,
	linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org
Subject: [PATCH 2/3] spi: spi-geni-qcom: Set an autosuspend delay of 250 ms
Date: Wed,  1 Jul 2020 17:45:08 -0700	[thread overview]
Message-ID: <20200701174506.2.I9b8f6bb1e7e6d8847e2ed2cf854ec55678db427f@changeid> (raw)
In-Reply-To: <20200702004509.2333554-1-dianders@chromium.org>

In commit 0e3b8a81f5df ("spi: spi-geni-qcom: Add interconnect
support") the spi_geni_runtime_suspend() and spi_geni_runtime_resume()
became a bit slower.  Measuring on my hardware I see numbers in the
hundreds of microseconds now.

Let's use autosuspend to help avoid some of the overhead.  Now if
we're doing a bunch of transfers we won't need to be constantly
chruning.

The number 250 ms for the autosuspend delay was picked a bit
arbitrarily, so if someone has measurements showing a better value we
could easily change this.

Fixes: 0e3b8a81f5df ("spi: spi-geni-qcom: Add interconnect support")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 drivers/spi/spi-geni-qcom.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index bb4cdda2dec8..f51279608fc7 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -595,6 +595,8 @@ static int spi_geni_probe(struct platform_device *pdev)
 
 	init_completion(&mas->xfer_done);
 	spin_lock_init(&mas->lock);
+	pm_runtime_use_autosuspend(&pdev->dev);
+	pm_runtime_set_autosuspend_delay(&pdev->dev, 250);
 	pm_runtime_enable(dev);
 
 	ret = geni_icc_get(&mas->se, NULL);
-- 
2.27.0.383.g050319c2ae-goog


  parent reply	other threads:[~2020-07-02  0:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02  0:45 [PATCH 0/3] spi: spi-geni-qcom: Avoid a bunch of per-transfer overhead Douglas Anderson
2020-07-02  0:45 ` [PATCH 1/3] spi: spi-geni-qcom: Avoid clock setting if not needed Douglas Anderson
2020-07-07 10:16   ` Akash Asthana
2020-07-07 12:08   ` Mark Brown
2020-07-07 12:53     ` Doug Anderson
2020-07-08 10:01       ` Mark Brown
2020-07-08 15:22         ` Doug Anderson
2020-07-08 17:02           ` Mark Brown
2020-07-08 12:48   ` Mark Brown
2020-07-02  0:45 ` Douglas Anderson [this message]
2020-07-07 10:18   ` [PATCH 2/3] spi: spi-geni-qcom: Set an autosuspend delay of 250 ms Akash Asthana
2020-07-02  0:45 ` [PATCH 3/3] spi: spi-geni-qcom: Get rid of most overhead in prepare_message() Douglas Anderson
2020-07-07 13:37   ` Akash Asthana
2020-07-08 12:49   ` Mark Brown
2020-07-07 14:17 ` [PATCH 0/3] spi: spi-geni-qcom: Avoid a bunch of per-transfer overhead Mark Brown

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=20200701174506.2.I9b8f6bb1e7e6d8847e2ed2cf854ec55678db427f@changeid \
    --to=dianders@chromium.org \
    --cc=agross@kernel.org \
    --cc=akashast@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=ctheegal@codeaurora.org \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=mkshah@codeaurora.org \
    --cc=swboyd@chromium.org \
    /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.