From patchwork Wed Jul 26 16:25:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 126496 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp526737vqo; Wed, 26 Jul 2023 09:44:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvRTbXgDlw0jVIVwKMtB+s/cWAammuEFZYGAGSWFSeiFOTg3Uf6FJhEE06FrhIWziAKUiW X-Received: by 2002:a17:902:ba96:b0:1b8:9db5:2ec1 with SMTP id k22-20020a170902ba9600b001b89db52ec1mr1895388pls.67.1690389856883; Wed, 26 Jul 2023 09:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690389856; cv=none; d=google.com; s=arc-20160816; b=InSdw8GjoxRmihjC4b36RprItkS/jq3XDwpsl1wfT3JZqrJ5lvshYPy1KAjhPewno7 B8LwzSb4Nn2YTTwWQEMFpElyE5ydqLqBQPJUI63jFZhcdoiF/VKJ24l4mOsI3SIJPPzL xVS450DaoXuC8v89Gms/WownONQOJ2ZgL9P9CwZi2J1C/14tsvyFJNtGoWlgJNZrpT22 TKE/uLHW0xfdyOVMgfNGtkKF/DYRZBtykXvdflzDRKjJZ8yVxrKXmFfB4rn0h62cWQ8O zRA37eLC4aQUs3zb8d9/tzrmUS24cyacCSCYMUzV70UOvpHbmr2uyXMNmdMYzFVWw/Ov 9krw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=jB32geWf90RWSJ/puuP7HGjsb5OtEdaqcLUmO5MUEyk=; fh=KLHuMtIqFjU14h8YTIh1Q1bd/pq1uD8Tms+Spx3Dr4Q=; b=Hzoc/zmEFE9VqmBvD4etfkGaQFTgQL+l4ZVT+oJWVLyP0vcDpZXiZdHgEKAUdE6jIX jZhOZNQpFUKEm15Hi398Hg+2yp4qcdDNCAyKsewW5Wn3oylUfN8FIuF9vMi2Kx77Sj6p gW2LMTjvGrjyKUbN8N0xO3eesBeLu3qPt/hTXKodaYrojQmbqa/9jumbNoz3GU9wT0UC iUBdU+ROWjjcXrhINUJsD7VagFWXYVpExa1LFz6hLxQbVJE22VjX74EGZqb8nCQPbzCO PNyrC0hNEtp5x2QtEKJbsSMEXC1jhyoZb1nPwRrEwHprawBaWm8qHewLZSly5z+NwKD1 H5BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CCJ6Kfto; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a170902b18400b001bb3135003fsi4659477plr.161.2023.07.26.09.44.03; Wed, 26 Jul 2023 09:44:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CCJ6Kfto; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233612AbjGZQ0B (ORCPT + 99 others); Wed, 26 Jul 2023 12:26:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233429AbjGZQZy (ORCPT ); Wed, 26 Jul 2023 12:25:54 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 373A626BB for ; Wed, 26 Jul 2023 09:25:53 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4fb7373dd35so1525856e87.1 for ; Wed, 26 Jul 2023 09:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690388751; x=1690993551; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=jB32geWf90RWSJ/puuP7HGjsb5OtEdaqcLUmO5MUEyk=; b=CCJ6KftoE2u7NiLWNuwWPDtVpifdvKo4xe6UOJjFtbKyRdjqMqg5uX361BptvP8Cg9 FWV3zw0cIIRpFxp6iX+KF+3ueBF91mj4Ypgu9SEBrYP/wIy9XN4K9LE1Hieq7A+CjaHO aTvPBDCr+N3hpRXKc9imDzEsu4nItNEN7vALNAaMP/e5csYLitM7vA2POmf4Z3aizzjh lWlAqAbe9pXl2lFcCIq2d298Rv1txdpsifqMEJt+zr9WnUp6yCiBwEUgYshQmoGen0tR 75y0Le2D4+1vgR4ncrmyPa++gZ6/iOnXZZLLXRSYmQifjRO9uHJd1Gj1vuobWAcuaIIR TQVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690388751; x=1690993551; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jB32geWf90RWSJ/puuP7HGjsb5OtEdaqcLUmO5MUEyk=; b=FmqoEWIwqqKPczN71IXpVPTl/y8HEa4b3q51AkJHSevv6HRx3/fTlT920IbC9nqE3l Ddvf2QRnw1cIgdhycs+WR7aJk/ngcp20aqyZxkcY/FE5hfQafc0az8ZAYCsBZK6ujnHY 5ABAzicEWAljIklYux2s1om3RdXGs1I63ZZmP6kjrp2xr70/nvYAOHYfW2TAnFuSzP2F GfECKJatC8yt0PYHFNjiD5zQXNuhoD2QcpsM+hyRaAeZdXf7r++AaBez2rBLXxeasfT1 ju4JPK1Pngt/GlBOdftPZPfzIU4kkOelszXZLqs1/uM9mqHyto9DVwpMwK4l4PWUbqWI Rx9A== X-Gm-Message-State: ABy/qLa0py7/fHoGv0nAf+p0Ai74fk3U51sFKOId0DhsjNOOPmbHb2uK srQa00VyfmguRhcy1kuLM3Z7kQ== X-Received: by 2002:a05:6512:3da0:b0:4fb:7624:85a5 with SMTP id k32-20020a0565123da000b004fb762485a5mr13400lfv.0.1690388751480; Wed, 26 Jul 2023 09:25:51 -0700 (PDT) Received: from [192.168.1.101] (abxh240.neoplus.adsl.tpnet.pl. [83.9.1.240]) by smtp.gmail.com with ESMTPSA id a14-20020a056512374e00b004fba5c20ab1sm3336299lfs.167.2023.07.26.09.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 09:25:51 -0700 (PDT) From: Konrad Dybcio Date: Wed, 26 Jul 2023 18:25:43 +0200 Subject: [PATCH 1/4] interconnect: qcom: icc-rpm: Add AB/IB calculations coefficients MIME-Version: 1.0 Message-Id: <20230726-topic-icc_coeff-v1-1-31616960818c@linaro.org> References: <20230726-topic-icc_coeff-v1-0-31616960818c@linaro.org> In-Reply-To: <20230726-topic-icc_coeff-v1-0-31616960818c@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1690388749; l=3935; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=YJ7lGPV4JFwVTnFj0BAnHPjZR4mTBTkkPOZe7rsv1UU=; b=6U868dTCqZyKJLcr1HM/SdeFBmXzlfUz+WrxsSSA5SDQz+llT58/0LOfX9VDQdTM5kEWynFht rZKRjp/ZeLgA6fFa39ShDDD3audsrXnKbt8WtzY0Snd56OK4o4oS4rA X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772502234811062964 X-GMAIL-MSGID: 1772502234811062964 Presumably due to the hardware being so complex, some nodes (or busses) have different (usually higher) requirements for bandwidth than what the usual calculations would suggest. Looking at the available downstream files, it seems like AB values are adjusted per-bus and IB values are adjusted per-node. With that in mind, introduce percentage-based coefficient struct members and use them in the calculations. One thing to note is that downstream does (X%)*AB and IB/(Y%) which feels a bit backwards, especially given that the divisors for IB turn out to always be 25, 50, 200 making this a convenient conversion to 4x, 2x, 0.5x.. This commit uses the more sane, non-inverse approach. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.c | 10 +++++++++- drivers/interconnect/qcom/icc-rpm.h | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c index 2c16917ba1fd..2de0e1dfe225 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -298,9 +298,11 @@ static int qcom_icc_bw_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, */ static void qcom_icc_bus_aggregate(struct icc_provider *provider, u64 *agg_clk_rate) { - u64 agg_avg_rate, agg_rate; + struct qcom_icc_provider *qp = to_qcom_provider(provider); + u64 agg_avg_rate, agg_peak_rate, agg_rate; struct qcom_icc_node *qn; struct icc_node *node; + u16 percent; int i; /* @@ -315,6 +317,12 @@ static void qcom_icc_bus_aggregate(struct icc_provider *provider, u64 *agg_clk_r else agg_avg_rate = qn->sum_avg[i]; + percent = qp->ab_percent ? qp->ab_percent : 100; + agg_avg_rate = mult_frac(percent, agg_avg_rate, 100); + + percent = qn->ib_percent ? qn->ib_percent : 100; + agg_peak_rate = mult_frac(percent, qn->max_peak[i], 100); + agg_rate = max_t(u64, agg_avg_rate, qn->max_peak[i]); do_div(agg_rate, qn->buswidth); diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h index eed3451af3e6..dbb3146a81c4 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -45,6 +45,7 @@ struct rpm_clk_resource { * @regmap: regmap for QoS registers read/write access * @qos_offset: offset to QoS registers * @bus_clk_rate: bus clock rate in Hz + * @ab_percent: a percentage-based coefficient for compensating the AB calculations * @bus_clk_desc: a pointer to a rpm_clk_resource description of bus clocks * @bus_clk: a pointer to a HLOS-owned bus clock * @intf_clks: a clk_bulk_data array of interface clocks @@ -58,6 +59,7 @@ struct qcom_icc_provider { struct regmap *regmap; unsigned int qos_offset; u32 bus_clk_rate[QCOM_SMD_RPM_STATE_NUM]; + u16 ab_percent; const struct rpm_clk_resource *bus_clk_desc; struct clk *bus_clk; struct clk_bulk_data *intf_clks; @@ -93,6 +95,7 @@ struct qcom_icc_qos { * @num_links: the total number of @links * @channels: number of channels at this node (e.g. DDR channels) * @buswidth: width of the interconnect between a node and the bus (bytes) + * @ib_percent: a percentage-based coefficient for compensating the IB calculations * @sum_avg: current sum aggregate value of all avg bw requests * @max_peak: current max aggregate value of all peak bw requests * @mas_rpm_id: RPM id for devices that are bus masters @@ -106,6 +109,7 @@ struct qcom_icc_node { u16 num_links; u16 channels; u16 buswidth; + u16 ib_percent; u64 sum_avg[QCOM_SMD_RPM_STATE_NUM]; u64 max_peak[QCOM_SMD_RPM_STATE_NUM]; int mas_rpm_id; @@ -123,6 +127,7 @@ struct qcom_icc_desc { enum qcom_icc_type type; const struct regmap_config *regmap_cfg; unsigned int qos_offset; + u16 ab_percent; }; /* Valid for all bus types */ From patchwork Wed Jul 26 16:25:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 126516 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp567008vqo; Wed, 26 Jul 2023 10:55:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlFIG+Xd5/S+/Ya1UzZFCRKwHtSGSEbMiM6NqUgNWVcut5yx1V7W6D7LLdna6j6R9vBOIJ2z X-Received: by 2002:a05:6a00:1592:b0:668:806d:c2d6 with SMTP id u18-20020a056a00159200b00668806dc2d6mr3152268pfk.12.1690394143939; Wed, 26 Jul 2023 10:55:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690394143; cv=none; d=google.com; s=arc-20160816; b=jmQx8+hHrA9G/xHuak0rVJo4725Oh8IjrvZmuF5Bs9IojRRYkTRYXE3lgbJrldTX5Q hF61E26kM+9NATENxHtk50agI/zvDTNkBRkzNKfyyKrsMSkpKzut/215JF5Pw3kfvX0o lMziuW0/pJ8FPD6yWobgnbdGbLtrWmOo1BTAj295HSjl44dqWaMlZo72SwO+W2iePg16 lZcWzrsU0muGs/JZtHfibezl8eIztEg/Y6Ob8imyNjK4/elW2uClm09oPrs2/XE33waz 8a8v5qN9FFeNIBfvbjZjWF5eZUZ8uLETe/Mk2DuYGYzRT60QuwzcNCUFqN5Mxf7m+5eo tQtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=YlpQZDurU7cDEuQbGYsNutn1v1rksKhpV41bGEsl56Y=; fh=KLHuMtIqFjU14h8YTIh1Q1bd/pq1uD8Tms+Spx3Dr4Q=; b=qjkZCsXLh/GPoVh2k+QK9cMxCX95B9bkBS+fL5sxWC09NPtb6Kv6ZF2XzN6Es1Fw+H zX32oIgkngpBj54vxDz6Akxj6vx2zONRJdbWdKsJj3rt/Ir2fgB+DbmhflCtNw7omuVq Bvsb8kMXGFtJO8EF1KDOtv2rjV+Shqvd9izL8LY07o36+uhi2nTTOpyDks4jB6qpYteN xRtQvNQvIxrrzbRv3ZjqZTuEfA9XV5Ih9Ye3e6rhfRc+HJ19U2oLPnbSwMIOC6KCMQV2 eBFOe8kOT6XHzf6v7JufRFz+UAxg0len1dvB0b68LoZvtGxicxmtqUdWfpfRz9TaPSCK ufyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d0qbGGsp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fh13-20020a056a00390d00b006791029dbedsi13480107pfb.157.2023.07.26.10.55.29; Wed, 26 Jul 2023 10:55:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d0qbGGsp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233714AbjGZQ0E (ORCPT + 99 others); Wed, 26 Jul 2023 12:26:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233496AbjGZQZz (ORCPT ); Wed, 26 Jul 2023 12:25:55 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31B4126A1 for ; Wed, 26 Jul 2023 09:25:54 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4fdfefdf5abso3954875e87.1 for ; Wed, 26 Jul 2023 09:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690388752; x=1690993552; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YlpQZDurU7cDEuQbGYsNutn1v1rksKhpV41bGEsl56Y=; b=d0qbGGspyEurSFGz6ibFBd9VXfvQDBS5jWzy27V21n690MR0SekTFD3hRDP/B+vZxh eWDgpSkh5X7KWTFPzBS5KVBJde6jXk7jnZ0zce4BuQNVcfamgv3BhDlVxNuxOe6+b1n/ dhHuJRbLEUHpyUirV2YPPwwaTgsNDf8Q4LZN/wwVddlbFQj+F1wx6G3lpLPYfUeO/3K7 XmEO3EJv3fUMKUWJEwq4R+frPOLKzlOPq3nPX568dwLPEfjaT+Qd0SoLSKTpt5yFhngD 4IEzNIbAukIDNCz0WppD2Tp4Q+hcbL+grIh2MMv2lMy1vOerje0MuQx7G6bGyMiRbrLx 8igg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690388752; x=1690993552; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YlpQZDurU7cDEuQbGYsNutn1v1rksKhpV41bGEsl56Y=; b=WNO4X83rubvBSRPQEXjFm3BlQ/d/9iQkckF12JQmeZBANwGe5nyTyqavGCc63w7t1v /558D/L/TkzVXEh5jTFdsXxqBy7w5Cs7ibj2zqU+3yHFHH7o5bDNLHHlfqUNTvfFn43o 9Yah2myxxTH8Iby8IsZCx0qqd/xu8y9jMJisNCmpMAoAA+3eC9f+BGCIAi+oPRbQSuOm C+nOpB0MRqM+i/cmpgKk1ngQBbP2CTCiQk/OtsXexRg384SQOpnf7rNqlfq9uuZj5TTU mcKaU3SB9rm2n+4vo4zfmMhKT71tJz5Z2EMARhD4cQv9/+Vy1Bf/APlsf2/2GYcjPhEp N8hA== X-Gm-Message-State: ABy/qLZGVQqRIRXJkuTT5aK9kWaujybXQuJK7/Cs/JjthUyS5vEgm63P F6oEsU9qRtjpQkV1ZaozqbUfFQ== X-Received: by 2002:a19:ca4d:0:b0:4f8:7781:9875 with SMTP id h13-20020a19ca4d000000b004f877819875mr1657082lfj.60.1690388752491; Wed, 26 Jul 2023 09:25:52 -0700 (PDT) Received: from [192.168.1.101] (abxh240.neoplus.adsl.tpnet.pl. [83.9.1.240]) by smtp.gmail.com with ESMTPSA id a14-20020a056512374e00b004fba5c20ab1sm3336299lfs.167.2023.07.26.09.25.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 09:25:52 -0700 (PDT) From: Konrad Dybcio Date: Wed, 26 Jul 2023 18:25:44 +0200 Subject: [PATCH 2/4] interconnect: qcom: qcm2290: Set AB coefficients MIME-Version: 1.0 Message-Id: <20230726-topic-icc_coeff-v1-2-31616960818c@linaro.org> References: <20230726-topic-icc_coeff-v1-0-31616960818c@linaro.org> In-Reply-To: <20230726-topic-icc_coeff-v1-0-31616960818c@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1690388749; l=1342; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=w4cMQBcUUhS3DdTuB4xqxb90xCVKGorFLtRylK/3djI=; b=VzuUA4qmeTaeThHfdDDCqxCLSixVY7h/MqF0qXGcr6a6t4nUGFFSFReEkhZniL1Pn0i/q4IQQ xDwTTWh2T1gAK59yATGeYkNMjAvMhwQOXg1chChmR7oXHRtchVysNeR X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772506729845414674 X-GMAIL-MSGID: 1772506729845414674 Some buses need additional manual adjustments atop the usual calculations. Fill in the missing coefficients. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/qcm2290.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/interconnect/qcom/qcm2290.c b/drivers/interconnect/qcom/qcm2290.c index 3c3b24264a5b..457e5713ae43 100644 --- a/drivers/interconnect/qcom/qcm2290.c +++ b/drivers/interconnect/qcom/qcm2290.c @@ -1198,6 +1198,7 @@ static const struct qcom_icc_desc qcm2290_bimc = { .regmap_cfg = &qcm2290_bimc_regmap_config, /* M_REG_BASE() in vendor msm_bus_bimc_adhoc driver */ .qos_offset = 0x8000, + .ab_percent = 153, }; static struct qcom_icc_node * const qcm2290_cnoc_nodes[] = { @@ -1324,6 +1325,7 @@ static const struct qcom_icc_desc qcm2290_mmnrt_virt = { .bus_clk_desc = &mmaxi_0_clk, .regmap_cfg = &qcm2290_snoc_regmap_config, .qos_offset = 0x15000, + .ab_percent = 142, }; static struct qcom_icc_node * const qcm2290_mmrt_virt_nodes[] = { @@ -1339,6 +1341,7 @@ static const struct qcom_icc_desc qcm2290_mmrt_virt = { .bus_clk_desc = &mmaxi_1_clk, .regmap_cfg = &qcm2290_snoc_regmap_config, .qos_offset = 0x15000, + .ab_percent = 139, }; static const struct of_device_id qcm2290_noc_of_match[] = { From patchwork Wed Jul 26 16:25:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 126519 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp577795vqo; Wed, 26 Jul 2023 11:12:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlHDxQcmxTLYG851wx1G+sOQgBm33rB1aT4oFSN1ujDmMgm4t9WrbMTidAEhFlgFB5V6Jlvq X-Received: by 2002:a17:906:eb82:b0:99b:bf43:732b with SMTP id mh2-20020a170906eb8200b0099bbf43732bmr1958778ejb.23.1690395169235; Wed, 26 Jul 2023 11:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690395169; cv=none; d=google.com; s=arc-20160816; b=D2L9e9Ej3X1gbs1tAlFxGKTps3oah5atoTu9Qm0U1EUXzxQTRz00hKxm6a3YRIcYZn KH+X4PqPiVMcin9AcTxPCZ6zlZtquz57uAwAHfa7mmzniCEgPHpXtvmSPWOvF8vxH4Ir Kr20um2aKDk3bFMvzhorzgP5+9J85Ns9WpyLxD7v3wOsZtrqefXegA9RMZ8eC+VcsIeH QYO97+RjgoYgwMLz33mpFaR6ZKUIm9JXBbqOWahR1we5jKIBl46PgVmr8TmbJ0PoiajP 5x3wJG+3d+JYot+1HYnoMYSO3pJ7fVg+lCj7aBz5FA7+gn/VsKIOyqUNS2VsowGRdaCL nHcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=PGPPZn4sgCGUmcJX5BOGkg/nNi/FbYofOgGSdq2+5ZA=; fh=KLHuMtIqFjU14h8YTIh1Q1bd/pq1uD8Tms+Spx3Dr4Q=; b=uRIOtQV3KHSRntpXnLNWx00ec1HL+gSwYIdyR0jUpTe8yt601Yss2R79J+vQ9GsViU GOn4bvREpnLryNvbXIPXIcSbiIRhqMaQ2vFlTTYN6Q0a2wLEmYrqYxMeHeLj/lrD7/Cg EZLz/Qmt87GU0IefB7l/Y3VFL3fLOKZWEO8r4Z6/tWvzUabdDEXfjYZEe/F+WFIjGAIt JgytuOEKUyD78rIm48sUeUcNYJDfGTO3z9Z06CUK/8687PdYuJTsCaTGOncVoeLH9iIZ 6TURHFa2Q+VEkcrq2Y5ABkdomqLgkKkLWXKYU8ET5ntB7ahFWYSMovmIW44eOMIyAvbM Zc3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z7JdDrDp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020a1709065fc100b0099b7a166dccsi6877387ejv.308.2023.07.26.11.12.24; Wed, 26 Jul 2023 11:12:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z7JdDrDp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233745AbjGZQ0H (ORCPT + 99 others); Wed, 26 Jul 2023 12:26:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232748AbjGZQZ4 (ORCPT ); Wed, 26 Jul 2023 12:25:56 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 237CB2698 for ; Wed, 26 Jul 2023 09:25:55 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4fbaef9871cso10915812e87.0 for ; Wed, 26 Jul 2023 09:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690388753; x=1690993553; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=PGPPZn4sgCGUmcJX5BOGkg/nNi/FbYofOgGSdq2+5ZA=; b=Z7JdDrDpDcynE/cL3sUx8QxPcA6i4sdt8bCmLmHRO65ZxtoA1fLoGTjj1rWbhfnC3C 160N1/EHVbvGOr/qMSG4zocFDkzMVeqQTfQ+vil2G86FxzFW0tG+nS3lCcmdEH3zioQb VE1ohMBThkm7krh70G48UxJ/gVrX+qACKi7o+AZHn0RKUwoNK+Lo7ow6c1VnQFy2YZbs PUk+/sU7ByqZTIwRiSZ1BZfe0HKTvfmOAhP9J+4kLagQbDgtc1kWwCgwxjNeSg2/wWTa 3BiF7lAsU92xwsJaVo9bbtsquH6n2eKg+b1d4Aw69NDmb99huwLtXo7H/sk4YyJbPfX4 nMFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690388753; x=1690993553; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PGPPZn4sgCGUmcJX5BOGkg/nNi/FbYofOgGSdq2+5ZA=; b=gCJ9LAVyqFRwHiBxsrJawK8+VehsbFrwFvXeqhESiCiweTKoFx3BlKdLQslGsP1tUj mtmrCfDsqR+2kaYf4Zj40gcwH92UVBRDRBldy7JMk1Gisoq4rJTrFjCNHpKmFYHu8EAJ t794u/a22CcS4uMsLoWnfUa7/T2cZ8DrCRhKGrS7hXPImi2y1lar9b5eJ9ISw8yxkx3x kCZSzNpXCsQiH3Z2Dz9o6dqyfyadImhznJZ0dAi33qBsP+jNqrK43d4SPdqsXI3fYtiL cTfw55w6wiv8L4u76pvYrmwVaUB0hYNGLxUdQx3ZD+L5empedZXDvvw6m9ebBdLsMjqY Ni6g== X-Gm-Message-State: ABy/qLbpBwsP3zdIgYRyPcvRgHBjpXTjE1vgSaevqiRP7sPOQdJG73JI HuS7Z1/rCDg4lhwURKQNz/swIQ== X-Received: by 2002:a19:4f5e:0:b0:4fd:fef7:95ae with SMTP id a30-20020a194f5e000000b004fdfef795aemr1816753lfk.9.1690388753510; Wed, 26 Jul 2023 09:25:53 -0700 (PDT) Received: from [192.168.1.101] (abxh240.neoplus.adsl.tpnet.pl. [83.9.1.240]) by smtp.gmail.com with ESMTPSA id a14-20020a056512374e00b004fba5c20ab1sm3336299lfs.167.2023.07.26.09.25.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 09:25:53 -0700 (PDT) From: Konrad Dybcio Date: Wed, 26 Jul 2023 18:25:45 +0200 Subject: [PATCH 3/4] interconnect: qcom: sdm660: Set AB/IB coefficients MIME-Version: 1.0 Message-Id: <20230726-topic-icc_coeff-v1-3-31616960818c@linaro.org> References: <20230726-topic-icc_coeff-v1-0-31616960818c@linaro.org> In-Reply-To: <20230726-topic-icc_coeff-v1-0-31616960818c@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1690388749; l=1529; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=1GzH+Tims+63zaTkCSn7UYBh9oQwB5PWYLl4YDuX6gw=; b=m+5HpYLUmYNcucjW7LR19Qvv3UrwPKwD8DfdpA41cB+UyCgC62DtO4QDo+oCWJCtD+VR/dz5d d5tPAgapkXPB6FEyItGULvgKFj+I5cspYL3Qo1qIPo6szk5/ckNGP0M X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772507804496261507 X-GMAIL-MSGID: 1772507804496261507 Some buses and nodes need additional manual adjustments atop the usual calculations. Fill in the missing coefficients. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/sdm660.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/interconnect/qcom/sdm660.c b/drivers/interconnect/qcom/sdm660.c index 36962f7bd7bb..cb93e2f2c2f4 100644 --- a/drivers/interconnect/qcom/sdm660.c +++ b/drivers/interconnect/qcom/sdm660.c @@ -602,6 +602,7 @@ static struct qcom_icc_node mas_mdp_p0 = { .name = "mas_mdp_p0", .id = SDM660_MASTER_MDP_P0, .buswidth = 16, + .ib_percent = 200, .mas_rpm_id = 8, .slv_rpm_id = -1, .qos.ap_owned = true, @@ -621,6 +622,7 @@ static struct qcom_icc_node mas_mdp_p1 = { .name = "mas_mdp_p1", .id = SDM660_MASTER_MDP_P1, .buswidth = 16, + .ib_percent = 200, .mas_rpm_id = 61, .slv_rpm_id = -1, .qos.ap_owned = true, @@ -1540,6 +1542,7 @@ static const struct qcom_icc_desc sdm660_bimc = { .num_nodes = ARRAY_SIZE(sdm660_bimc_nodes), .bus_clk_desc = &bimc_clk, .regmap_cfg = &sdm660_bimc_regmap_config, + .ab_percent = 153, }; static struct qcom_icc_node * const sdm660_cnoc_nodes[] = { @@ -1659,6 +1662,7 @@ static const struct qcom_icc_desc sdm660_mnoc = { .intf_clocks = mm_intf_clocks, .num_intf_clocks = ARRAY_SIZE(mm_intf_clocks), .regmap_cfg = &sdm660_mnoc_regmap_config, + .ab_percent = 153, }; static struct qcom_icc_node * const sdm660_snoc_nodes[] = { From patchwork Wed Jul 26 16:25:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 126502 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp543934vqo; Wed, 26 Jul 2023 10:12:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlHMIsiH+54UwsJY2LqCoL9n5gW/6FQyR8YyGBFjrw/3HAhq/vsJ/86oQC+ZPjnWgMWRYlLX X-Received: by 2002:a05:6a21:6da7:b0:12f:dc31:a71e with SMTP id wl39-20020a056a216da700b0012fdc31a71emr3204755pzb.56.1690391525797; Wed, 26 Jul 2023 10:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690391525; cv=none; d=google.com; s=arc-20160816; b=CpCHAKC90WJoPgFWNsk51ek6MpU+gqR7JD/ybKPkY9UyuXApYv/WevCeWZTVNuT+wC BD6ZZkG4n7g7wkzW49NUUIMRsxd+uFu5ejjL6UfPhsXmf1s6KJ4gDwgCFhykveX7CS2F xvISEHgxI1PNMZC0epq/0Fp+kFL75TawYSuhQCtYac/0Gk+W6pRBxKa7i82baWRMsYj7 f7n7y20J1BQSJnlw1vn0+HMVq5AgkmGZ9k4VZ/KTZ4a0dmV5e4FDXd8ndOeN4drSk0Wh tR/Vs8QJEnvmUqe3kacvr2hQpCpyOVjbT3Gs8yHaqw5X+IxeuvxOivKFD7mIQfp7TyEs uEXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=3kHqku5aNQeOxuldOBfASzBzbj6SzACN6ErkOb1f60g=; fh=KLHuMtIqFjU14h8YTIh1Q1bd/pq1uD8Tms+Spx3Dr4Q=; b=vi95WFxhVx5H0Sx8TalrRFOaVaKnq/ROV/wSEcv7eolWW8aTRNFv5TJDLDBBI+cbUc QKNc+8ZyLQrdTz+CJITCPxstnlrat4eCq6kJsBL2LwVecdOAbBGbE2WPvYyTHXo9Wywh C8GTLczEGdPpJc8Qr/6azS6gLNy+d7nrldl8RLXM8a2e3ssIqcJ5oayK84InGispFEQy HOdBAOoqoakAhPQ2JvewIHWIZIVGOvGt5VL9/aUCyuLu7uLYsuzCcP1Z81VAfqVYm7IZ TZkj2R6oEQ7Xtyy8N7skoKqVyhjoJok0APbufY0AzCD9XF/T2028PbPlIGu+RC61CeC9 xZhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="F8wR/OPN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s196-20020a6377cd000000b0054f71faf5aasi13618124pgc.581.2023.07.26.10.11.50; Wed, 26 Jul 2023 10:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="F8wR/OPN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232582AbjGZQ0K (ORCPT + 99 others); Wed, 26 Jul 2023 12:26:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233487AbjGZQZ5 (ORCPT ); Wed, 26 Jul 2023 12:25:57 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22B19269A for ; Wed, 26 Jul 2023 09:25:56 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4f95bf5c493so10963155e87.3 for ; Wed, 26 Jul 2023 09:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690388754; x=1690993554; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3kHqku5aNQeOxuldOBfASzBzbj6SzACN6ErkOb1f60g=; b=F8wR/OPNTELiTI/jFK2rOQwmDvyvhHjc5hVtNFt079Ia2Ih6YDf5QS7Ebngx3hQl60 KUyDZzq9Qxn1ucRI5w4K9+V5FlxcsDAP7BT9QrUcMhVen9MUbyPguv7cuyZ3cjo6cAa8 IyuWv8CVjVyBQ+eRYnd7NQWWu6Slok5QYjnelLrIEhyYCgx/x/DpC0+Bchz8Vn5bK5s9 PLi42pGzq3Zz3PLimCJ7rj/72mcNllW687zNpxP8UAz0Y5KQUAKP37G+dihw00Csx0hy 0zr7zkA65rZ47n6OcFbuiXvywvk4PgLBPOyJ0LnKd+viJfBS7lcQx3McGi+SGz2zmQm3 86eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690388754; x=1690993554; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3kHqku5aNQeOxuldOBfASzBzbj6SzACN6ErkOb1f60g=; b=JQdEQ69WeHKQeCPkFuAkhVX0z929TldHJzCh3AKyIefFMjbwKqLrXJmI1Bej6qmoBf xSLvtN9PbELtaVSZUUhWdOfUJSgXslHYkN/37jhdCilua8ywVOtz8Xcow/ZCuKEjX1Rl WAzhLchkYAuNiiOJXVYdS8W2sV95jlzRLFnlcubvIjFag7YxWa53r3UbMsHjE58U6+6/ fPrFOhn+94Dom1gecop8AtdUVKieygIjAvSoj2flwhnKHlHKeJxQVeY2+40yJ3GFgpBP Mu5QCD/fzOCpWX0Svy+Ic0KE3B/+E2WBvPTvFozqdnlMiodrqAAZr+x25l6+APkibpDr dmHA== X-Gm-Message-State: ABy/qLYNjON+DflEF2wtFkUYZianOVRa10S3bh1q/vmNJbL951N4NIGD MXhemxioYprONlGdX6kAz6Ph3g== X-Received: by 2002:a05:6512:b97:b0:4fb:7b2a:78de with SMTP id b23-20020a0565120b9700b004fb7b2a78demr2629017lfv.45.1690388754550; Wed, 26 Jul 2023 09:25:54 -0700 (PDT) Received: from [192.168.1.101] (abxh240.neoplus.adsl.tpnet.pl. [83.9.1.240]) by smtp.gmail.com with ESMTPSA id a14-20020a056512374e00b004fba5c20ab1sm3336299lfs.167.2023.07.26.09.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 09:25:54 -0700 (PDT) From: Konrad Dybcio Date: Wed, 26 Jul 2023 18:25:46 +0200 Subject: [PATCH 4/4] interconnect: qcom: msm8996: Set AB/IB coefficients MIME-Version: 1.0 Message-Id: <20230726-topic-icc_coeff-v1-4-31616960818c@linaro.org> References: <20230726-topic-icc_coeff-v1-0-31616960818c@linaro.org> In-Reply-To: <20230726-topic-icc_coeff-v1-0-31616960818c@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1690388749; l=1692; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=I9w13v27Aktl2g4cGZ4p21IhyuK82Ydc8kkNnjHFsco=; b=WruiJaJP7hlv2UhaxaXdLLtdz+JP25qA4MCyDJxiNOx6zBdH09zVzQ6VBM2nr37TViPtC3vg3 Q1OwksZty/gA+5z+Sb3szlLVKP17JoNNIxi8BVokl6gtwohvt/rZ245 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772503984442045173 X-GMAIL-MSGID: 1772503984442045173 Some buses and nodes need additional manual adjustments atop the usual calculations. Fill in the missing coefficients. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/msm8996.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qcom/msm8996.c index 88683dfa468f..dec38cd42df4 100644 --- a/drivers/interconnect/qcom/msm8996.c +++ b/drivers/interconnect/qcom/msm8996.c @@ -448,6 +448,7 @@ static struct qcom_icc_node mas_mdp_p0 = { .name = "mas_mdp_p0", .id = MSM8996_MASTER_MDP_PORT0, .buswidth = 32, + .ib_percent = 400, .mas_rpm_id = 8, .slv_rpm_id = -1, .qos.ap_owned = true, @@ -463,6 +464,7 @@ static struct qcom_icc_node mas_mdp_p1 = { .name = "mas_mdp_p1", .id = MSM8996_MASTER_MDP_PORT1, .buswidth = 32, + .ib_percent = 400, .mas_rpm_id = 61, .slv_rpm_id = -1, .qos.ap_owned = true, @@ -1889,7 +1891,8 @@ static const struct qcom_icc_desc msm8996_bimc = { .nodes = bimc_nodes, .num_nodes = ARRAY_SIZE(bimc_nodes), .bus_clk_desc = &bimc_clk, - .regmap_cfg = &msm8996_bimc_regmap_config + .regmap_cfg = &msm8996_bimc_regmap_config, + .ab_percent = 154, }; static struct qcom_icc_node * const cnoc_nodes[] = { @@ -2004,7 +2007,8 @@ static const struct qcom_icc_desc msm8996_mnoc = { .bus_clk_desc = &mmaxi_0_clk, .intf_clocks = mm_intf_clocks, .num_intf_clocks = ARRAY_SIZE(mm_intf_clocks), - .regmap_cfg = &msm8996_mnoc_regmap_config + .regmap_cfg = &msm8996_mnoc_regmap_config, + .ab_percent = 154, }; static struct qcom_icc_node * const pnoc_nodes[] = {