Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3282338imm; Fri, 25 May 2018 03:02:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpwpup5eOU/FzzNxXNGlleIaCepqWrWjKJWXS4typyyFLdjj2gj343fkX43mgs4MGvlwVF5 X-Received: by 2002:a63:7553:: with SMTP id f19-v6mr1491395pgn.314.1527242556658; Fri, 25 May 2018 03:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527242556; cv=none; d=google.com; s=arc-20160816; b=fhD7UiF8ITK8Unglhd1SEbgHpVu5xKwreagwpow++JCjDFMQhBaZwB5qnHF95H8EGV JcoObQtyvjfYIxY9bKPTvbNWW98GR7O3P5wbLo31I3gJjWB3xiAd1/4X17ha2+4uhrBd m93zrDkswS89ZrVH9uRLDUj4f+WvpI4xzoJUQU1KM3Obk7sqZofirngtY1zjhCsyRP3w SNUmpxrTCOUApo5re27MnouMFRLo+zDiPIR0uSx9A11lUaetfbsL3LcHtJ6wlsElo/Zw iQdp/3HCOLpC6fmENImWe/NR/UhC4/K8J2d62SJlEidd2W7cqL3ShCmMMiyeD2L8YRo/ SWAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=mKfn5lfm6//Ib4c/9hNiTWJnLc5eHdHaPebwXH/84yU=; b=MZD/RWzWLtfWIqNfzc+QGFx7RkXQBlhUIJP5CVJQ7iy/aKXLO0hidhLxXuhGRMeidL AyUfr772ZEnnYBiGi8Tg+n6g+2uXGlXUzLjEdCLVh7BbIHnJTMNA/BqkcC90b1nasmjJ GMug8Q/PT2+QpZ0Tm+zda+aNZJyRvyg6PTzRRW0YT5UzsFMn0AhMGYQL21f+hK2JJ4eq l/GTZG7Slm5amrcN8rbTNIbD2FGyN4EcNiX93Og13V/07mcb9snxGl+zB1QikwbLK7Mb gqTKgkvtTqt8W8nsCbJ3fvmTEq0DllnZKfdsDwACQOb8xtJzKsleJdgz21LRMiTCngwC vFGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=MrQ+fmOI; dkim=pass header.i=@codeaurora.org header.s=default header.b=LAFfR2Cy; 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 g12-v6si24202642pfi.212.2018.05.25.03.02.19; Fri, 25 May 2018 03:02:36 -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=MrQ+fmOI; dkim=pass header.i=@codeaurora.org header.s=default header.b=LAFfR2Cy; 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 S966002AbeEYKCB (ORCPT + 99 others); Fri, 25 May 2018 06:02:01 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46684 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965872AbeEYKBz (ORCPT ); Fri, 25 May 2018 06:01:55 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 05D8B60881; Fri, 25 May 2018 10:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527242515; bh=xHjSM3CtcB92ZtzOPrEpgmEnJcksM77ZhSJCsls6Vj0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MrQ+fmOIhdsN6erhDoMZxe+lp3h6iSRd/Y/zM8JsVjEqXCeBKrwKxl+Myy7yfHVuN D/o+7S750jYsGvv/jxbkCtfGXt8lKNECiXwmyIA9aULtAKHZL1V95a9vCC6aevZqhM rZgp+/pc+JlAuT79zDk7xRGwj/j3n7vFzoL90X98= 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 blr-ubuntu-173.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rnayak@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id B0FEC60F78; Fri, 25 May 2018 10:01:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527242514; bh=xHjSM3CtcB92ZtzOPrEpgmEnJcksM77ZhSJCsls6Vj0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LAFfR2CyFP0GQz060sHmXzUerxsRlvbZo5h+nIKRE/IvCvaKik5FUB87bOXRJWwXT fbwXC+hr3RMo5IuPLD6xvsgWEzSNgLfxLin1oOcRBLIY/B2l4Zve7lNGACnYScVmCT +pbyap0zI1Ed+8auHGE/DCvmquGmQ+mhaVSxLvwQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B0FEC60F78 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=rnayak@codeaurora.org From: Rajendra Nayak To: viresh.kumar@linaro.org, sboyd@kernel.org, andy.gross@linaro.org, ulf.hansson@linaro.org Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, collinsd@codeaurora.org, Rajendra Nayak Subject: [PATCH v2 6/6] soc: qcom: rpmpd/rpmhpd: Add a max vote on all corners at init Date: Fri, 25 May 2018 15:31:21 +0530 Message-Id: <20180525100121.28214-7-rnayak@codeaurora.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180525100121.28214-1-rnayak@codeaurora.org> References: <20180525100121.28214-1-rnayak@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As we move from no clients/consumers in kernel voting on corners, to *some* voting and some not voting, we might end up in a situation where the clients which remove votes can adversly impact others who still don't have a way to vote. To avoid this situation, have a max vote on all corners at init. This should/can be removed once we have all clients moved to be able to vote/unvote for themselves. Signed-off-by: Rajendra Nayak Acked-by: Viresh Kumar --- drivers/soc/qcom/rpmhpd.c | 9 +++++++++ drivers/soc/qcom/rpmpd.c | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index a79f094ad326..933f7b2d9249 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -323,6 +323,15 @@ static int rpmhpd_probe(struct platform_device *pdev) pm_genpd_init(&rpmhpds[i]->pd, NULL, true); data->domains[i] = &rpmhpds[i]->pd; + + /* + * Until we have all consumers voting on corners + * just vote the max corner on all PDs + * This should ideally be *removed* once we have + * all (most) consumers being able to vote + */ + rpmhpd_power_on(&rpmhpds[i]->pd); + rpmhpd_set_performance(&rpmhpds[i]->pd, rpmhpds[i]->level_count - 1); } return of_genpd_add_provider_onecell(pdev->dev.of_node, data); diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index ff3d910f388c..ff5da19beef3 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -308,6 +308,15 @@ static int rpmpd_probe(struct platform_device *pdev) pm_genpd_init(&rpmpds[i]->pd, NULL, true); data->domains[i] = &rpmpds[i]->pd; + + /* + * Until we have all consumers voting on corners + * just vote the max corner on all PDs + * This should ideally be *removed* once we have + * all (most) consumers being able to vote + */ + rpmpd_set_performance(&rpmpds[i]->pd, MAX_RPMPD_STATE); + rpmpd_power_on(&rpmpds[i]->pd); } return of_genpd_add_provider_onecell(pdev->dev.of_node, data); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation