Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1340920ybt; Tue, 7 Jul 2020 13:20:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC/4bz9AfkLrJ52TImUuhPIXgDpRPVCPe0j4DSDD6KRLLFIhXvQzl9nqe5bdkpe6O6CZr2 X-Received: by 2002:a17:906:1357:: with SMTP id x23mr51625847ejb.148.1594153228635; Tue, 07 Jul 2020 13:20:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594153228; cv=none; d=google.com; s=arc-20160816; b=pTrb0tmt4KxcAiPNAkr3XzvIS3MqaVPQ1CRgBuU8vFbR7oH1XUvkq2k4l8oFSZM0ji BnsWtBLptwm5Qu7lvVzwDBbU6bTrlC/KrXBaZ/PzJen6oq7L5BuI9AZTsNa7vYRfCH3k lrEGLlMODjkTIscOF7SJvxoWO10jeD5+jM8BxGOR+GXMNYhKKhAJZ5Ez4mNjkzHi0Qda KyMUwKw8M/fuXy65ygxpk2YVQLnwC3t+bJ68Rir1doFwG5RAekBJOKqjGCbVeXPqV0QZ AUHUnTEAVpvqDGFZe9u/2dVCQUwSPd/psHAapOW4t/dcdNqHxKIyODEE1tVqrhB4K3iw BstA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZILeJ5BZkm/uJN5KrFNC9NBv85e8cyhdlG5Nb7NnKfw=; b=khz1Mq0ZKs2trtLRmUzeVt+5ZNlG+qWFRFx01PWZ3eNpyMV9YeLtgdj7iUVrBh5vl6 MwCGUVqldCqFRA/gjY//XRAT6r/6ZgX4J1KSok3PSOIMiUIIf7nXeCyUEKt29zj9btiA vMjiUcM4Xcni8KXVVDaeTjJIS9FGTP9W+iFETQDgklQciu15/aXF1dTcp/CI3ssohD1+ H1/2hbMFuafA5xVuIutdoOy6WXEFr/VtCx18yKgpMJJPm56kftPW1CyEvleFLjOgNKSQ r8C9koJMetf9fWIiH2RUj3+iGVFh3t3Imjzy8bSI7u56C77KB2VNUYRLNLT+zL72Z7Re Wqag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PEF9ZsRV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ss22si16782455ejb.530.2020.07.07.13.20.04; Tue, 07 Jul 2020 13:20:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PEF9ZsRV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728733AbgGGURM (ORCPT + 99 others); Tue, 7 Jul 2020 16:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728737AbgGGURH (ORCPT ); Tue, 7 Jul 2020 16:17:07 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C8D7C08C5DC for ; Tue, 7 Jul 2020 13:17:07 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id u18so3593812pfk.10 for ; Tue, 07 Jul 2020 13:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZILeJ5BZkm/uJN5KrFNC9NBv85e8cyhdlG5Nb7NnKfw=; b=PEF9ZsRVchuRojCnoBR189XtTxSFN3+B4mXytX4tqxHyuQjt7rNIqVM/5BqhKAiMKh A2oE6hV+YU5K4Hk1Sem4UY+19X1f9l8eR7ZUDwqxDcGgGI1bWo0smuHyvggB7E52zjg8 l17phmDc8cnnnKqPaM9NuguL7F1EBwKFpbxrM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZILeJ5BZkm/uJN5KrFNC9NBv85e8cyhdlG5Nb7NnKfw=; b=NKSyZfi4lBSQyBksjc/9p38kShNMVAX7V+0nzrBWHdwfFEwit6YIaOWk5BmT3MWq5x v8fBCIJh6cScTwrJMtKGBy986QAR+jgA2AhjSi7YW/1Yk0vkOf2S4dC/rFSGBRP3c/1g 0++t7S/uKBCk83ocpyrcTEFsBqmVDKUrWqqQJfHwRBV5/yPzeeTohi/WwXf5i/3pHgfR cT5A09poAFs9XeSPkMU6/r833CtP3bNsvkU0jlPmjZ/sQACN5rxV2+c444TXgZHFyjg4 cO1TUBuqMRmQQY7T6uuwRwkVjVsWrXiCkK3q3PNH6K+SgwodFKx7RB+jgKi8CbByu8wS JY3g== X-Gm-Message-State: AOAM531UUcwQGyzAYalhcqtLIs1eJDNcATFuGlMlr1rkDZECXA/wl+TR jr3R7+G/fYNTJdBtS+8RqjycOZMIhV0= X-Received: by 2002:aa7:9575:: with SMTP id x21mr49762878pfq.140.1594153027176; Tue, 07 Jul 2020 13:17:07 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:42b0:34ff:fe3d:58e6]) by smtp.gmail.com with ESMTPSA id i23sm7166097pfq.206.2020.07.07.13.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 13:17:06 -0700 (PDT) From: Douglas Anderson To: Mark Brown , Andy Gross , Bjorn Andersson Cc: mka@chromium.org, Akash Asthana , Rajendra Nayak , swboyd@chromium.org, linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org, ctheegal@codeaurora.org, mkshah@codeaurora.org, Douglas Anderson , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org Subject: [PATCH 2/2] spi: spi-qcom-qspi: Set an autosuspend delay of 250 ms Date: Tue, 7 Jul 2020 13:16:41 -0700 Message-Id: <20200707131607.2.I3c56d655737c89bd9b766567a04b0854db1a4152@changeid> X-Mailer: git-send-email 2.27.0.383.g050319c2ae-goog In-Reply-To: <20200707201641.2030532-1-dianders@chromium.org> References: <20200707201641.2030532-1-dianders@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In commit cff80645d6d3 ("spi: spi-qcom-qspi: 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: cff80645d6d3 ("spi: spi-qcom-qspi: Add interconnect support") Signed-off-by: Douglas Anderson --- This patch could go through the SPI tree or land in the Qualcomm tree. The patch it Fixes is currently in the Qualcomm tree so if it lands in the main SPI tree there'd be a bit of a perf regression in the Qualcomm tree until things merge together in mainline. drivers/spi/spi-qcom-qspi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom-qspi.c index 322b88c22a86..6c39b23222b8 100644 --- a/drivers/spi/spi-qcom-qspi.c +++ b/drivers/spi/spi-qcom-qspi.c @@ -553,6 +553,8 @@ static int qcom_qspi_probe(struct platform_device *pdev) goto exit_probe_master_put; } + pm_runtime_use_autosuspend(dev); + pm_runtime_set_autosuspend_delay(dev, 250); pm_runtime_enable(dev); ret = spi_register_master(master); -- 2.27.0.383.g050319c2ae-goog