Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4489106imm; Sat, 25 Aug 2018 19:09:40 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYsEvUGbQkQuCYMmpNoFY3Xsw2aMgAn3NDKMYHhGzVJ4r142jttUBaQ9BPma101JM/Bo+eT X-Received: by 2002:a63:9e0a:: with SMTP id s10-v6mr7474614pgd.326.1535249379941; Sat, 25 Aug 2018 19:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535249379; cv=none; d=google.com; s=arc-20160816; b=SUxAANa6QWD4opCcbsi7ukpgTydA+2nbJTPzINpvk3bEZcJTyIUkpRtBaa4Km8ndsq TCwuo2wGN/QO6GxWRiBof81gMw0z8qz3Bxl3akrzZyDRo9W0V1m2h10oDaJuiHBQIcli YLf7sGppVtKZc+JmGUBH1T0WYyzXM+KBR/99vwIfjpKQA1TbjpGgb3UUReNra31g+NVA Q04aVGhB8pRzAIxUAo02J+L3NcTbTTUs10gq+4erXkugHtNuVVWlcZ+bmDyDsnEkcKpB Q9xj9eqPTceBJOwOvj1y7s2fgAt5aXN380xm9c4UUSCBe6zYxx2GQIUDspd8Su6l1TJ0 5FEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=sLHIFYk5nYkPHiUIxxYVjxpoIhNHWLNV5JWqIxbizG8=; b=nP2wPoitp2Lgi0NKi0PY3P5ArToms7xNzuaQLThChuIjkuhR/NJ1Pui1ND31oJEL/6 2qe/6xLjMtS9fmf09yxv/iVMTrxnhzlSqjvA6DLj9lqsVfx9tZAW+D5H5LGvV0TdQ2bZ IE55cUiQdrpYaqXus0bi+T9AVgJu63vzoS2mIJSG9uiqZRfm1WaiT8OMtndVmqIdAWDj yawAx8u46I5M35J5878WWagdd4+JUBaD70BHsw2qTA+QCFvF8DMiHJAis4K1nny/XRPk 2Qh/bxV+W3M7RGEkGnBN38QdDTrgXJtO0PrRgKFjYh2sPy5XjVb3XNRm0SFwXLSQfcHU 3Kqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=oUwqnAqk; dkim=pass header.i=@codeaurora.org header.s=default header.b=CKoueKAs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8-v6si11186911pfo.128.2018.08.25.19.08.57; Sat, 25 Aug 2018 19:09:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=oUwqnAqk; dkim=pass header.i=@codeaurora.org header.s=default header.b=CKoueKAs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbeHZFrM (ORCPT + 99 others); Sun, 26 Aug 2018 01:47:12 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59042 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726373AbeHZFrL (ORCPT ); Sun, 26 Aug 2018 01:47:11 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 282ED604BE; Sun, 26 Aug 2018 02:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535249180; bh=53zILNaWd+DGlzukKlknhzimPIPgRCasmlcROaGcgMc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oUwqnAqk99QDt2B2r3VuMqM8FInK2QLOUQNghl9ohaQnKVoIeiTn6bz4PFnpyfoiT 42nmS3FHjS67y8twf3RbtKOfcL5MdTO8vMr7AU61+dTKhaKTdISyCsbb0dGTndqZ0T lVJVlfcoIQPyLszLUk7sJylG2m2t9QuTGPnJn4kg= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ilina@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 424DB604BE; Sun, 26 Aug 2018 02:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535249179; bh=53zILNaWd+DGlzukKlknhzimPIPgRCasmlcROaGcgMc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CKoueKAst4LON1wBSEDn/L+ck+I/VgKRKIjFdNtWgqdV9zZG7SBcqRGAWiQSoRg8I aIP6xqntl3P9vaJ7Nwe8tSMtYznne3pCUy23dqU1e8ndIj8UeO2fpz4r1wL5NGGLtj ZTeh1MOBwBAzJgAFMGIp1dnNvtfc5DSxaGuvryc4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 424DB604BE Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilina@codeaurora.org Date: Sat, 25 Aug 2018 20:06:18 -0600 From: Lina Iyer To: "Raju P.L.S.S.S.N" Cc: andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, rnayak@codeaurora.org, bjorn.andersson@linaro.org, linux-kernel@vger.kernel.org, sboyd@kernel.org, evgreen@chromium.org, dianders@chromium.org, mka@chromium.org Subject: Re: [PATCH] drivers: qcom: rpmh: avoid sending sleep/wake sets immediately Message-ID: <20180826020618.GP5081@codeaurora.org> References: <1535139252-20066-1-git-send-email-rplsssn@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1535139252-20066-1-git-send-email-rplsssn@codeaurora.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 25 2018 at 13:34 -0600, Raju P.L.S.S.S.N wrote: >Fix the redundant call being made to send the sleep and wake requests >immediately to the controller. > >As per the patch[1], the sleep and wake request votes are cached in rpmh >controller and sent during rpmh_flush(). These requests needs to be sent >only during entry of deeper system low power modes or suspend. > >[1]https://patchwork.kernel.org/patch/10477533/ > >Signed-off-by: Raju P.L.S.S.S.N Reviewed-by: Lina Iyer >--- > drivers/soc/qcom/rpmh.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c >index f81488b..390e779 100644 >--- a/drivers/soc/qcom/rpmh.c >+++ b/drivers/soc/qcom/rpmh.c >@@ -237,9 +237,8 @@ static int __rpmh_write(const struct device *dev, enum rpmh_state state, > WARN_ON(irqs_disabled()); > ret = rpmh_rsc_send_data(ctrlr_to_drv(ctrlr), &rpm_msg->msg); > } else { >- ret = rpmh_rsc_write_ctrl_data(ctrlr_to_drv(ctrlr), >- &rpm_msg->msg); > /* Clean up our call by spoofing tx_done */ >+ ret = 0; > rpmh_tx_done(&rpm_msg->msg, ret); > } > >-- >QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation. >