From patchwork Wed Mar 13 09:00:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 10850799 X-Patchwork-Delegate: viresh.linux@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D22E91669 for ; Wed, 13 Mar 2019 09:00:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEFB928C1D for ; Wed, 13 Mar 2019 09:00:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2D20299E1; Wed, 13 Mar 2019 09:00:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C6A928C1D for ; Wed, 13 Mar 2019 09:00:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727332AbfCMJA1 (ORCPT ); Wed, 13 Mar 2019 05:00:27 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40444 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727348AbfCMJAX (ORCPT ); Wed, 13 Mar 2019 05:00:23 -0400 Received: by mail-lj1-f195.google.com with SMTP id w6so804408ljd.7 for ; Wed, 13 Mar 2019 02:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9gFFJDf2YnnW41mbrUGLhQnv9x8YWw9okQzyBd4EYFU=; b=jMKInlTbt1kLgeuLKDe1amgKHzJijr6f5OIpO20OyvgkfgsGFPnJBf+y9RYwcTwOWp RSMMny0yclfzx9rhkKAM0DE4N2KIqEt+MeGSe+EybjdQ7/um9Aq+qwJ/5Dj5hLXZ9eVz wCvKQ2Kdna0pdjPTg49jZt06SR5Img4H2vK36R85kcNZlz0Ea5dTHlt/d+cy9J8yWfpZ ZVKB8PHcjom6Wbt/de+T18MQw4P9JQ1WyQ7HyppLQ7ScMyO4hwzhVb2GhNkU9hTw3+K3 Sm6weatOipRzmxgWAfm5eq/x9cvj2aG474sTl0mo5zi5Gcet+AA/b4KMktKMVL/m4wDm 8JBg== 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=9gFFJDf2YnnW41mbrUGLhQnv9x8YWw9okQzyBd4EYFU=; b=ZrvhxUjqh6VRvIYMr3/SELaqUdgyOdSHnjnBeAOwX/QnqWPk8zCu8G+bI1BgBXQBXS qjya5LlCagR9Pp+zwyzf7DwJemY7acf1ZGuea+vcKd42SWPZ4f6H24G5480WTsUteUUp hv8rZiq7cD/vJmXfB3j84wK9EoTh+VGLiMdk8VzTQNAP81aV3WFugP00fjh5LuGkT9gg j4MaLEHk4aRRT9NdanKh1yyEl0YvXIXnC2fDdNY344DyNxRzaYtNsdo4vLiq0t8628Vb mycALM+3xsOPh0XBb0CsOqv8hmZh4cpG95KrTcZjJW/P34q3jTnZsrbutYem8DuXRfmR zvhQ== X-Gm-Message-State: APjAAAXlOoCTd5VikatOnfXDGLmHL6roZzTRvp2e85WRbvXBYFSyP/iw 4HQBE4hMO7oi3HMjfeEKUG87DQ== X-Google-Smtp-Source: APXvYqwIXkMGOo68z7kFcseQc3iUz+MeychrjygBb8vF2llh1M8u7cMuBjgZiH7jH8KbVIemdtrL0w== X-Received: by 2002:a2e:8986:: with SMTP id c6mr543791lji.146.1552467620690; Wed, 13 Mar 2019 02:00:20 -0700 (PDT) Received: from localhost.localdomain ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id u15sm1701986lja.73.2019.03.13.02.00.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Mar 2019 02:00:19 -0700 (PDT) From: Georgi Djakov To: vireshk@kernel.org, sboyd@kernel.org, nm@ti.com, robh+dt@kernel.org, mark.rutland@arm.com, rjw@rjwysocki.net Cc: jcrouse@codeaurora.org, vincent.guittot@linaro.org, bjorn.andersson@linaro.org, amit.kucheria@linaro.org, seansw@qti.qualcomm.com, daidavid1@codeaurora.org, evgreen@chromium.org, sibis@codeaurora.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org Subject: [PATCH 3/4] OPP: Update the bandwidth on OPP frequency changes Date: Wed, 13 Mar 2019 11:00:09 +0200 Message-Id: <20190313090010.20534-4-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190313090010.20534-1-georgi.djakov@linaro.org> References: <20190313090010.20534-1-georgi.djakov@linaro.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the OPP bandwidth values are populated, we want to switch also the interconnect bandwidth in addition to frequency and voltage. Signed-off-by: Georgi Djakov --- drivers/opp/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 4b019cecaa07..99e7c4cf6c34 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -781,6 +781,10 @@ int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq) ret = _generic_set_opp_clk_only(dev, clk, old_freq, freq); } + if (!ret && !IS_ERR_OR_NULL(opp_table->path) && opp->bandwidth) + icc_set_bw(opp_table->path, opp->bandwidth->avg, + opp->bandwidth->peak); + /* Scaling down? Configure required OPPs after frequency */ if (!ret && freq < old_freq) { ret = _set_required_opps(dev, opp_table, opp);