Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp12545345rwl; Tue, 3 Jan 2023 16:33:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXt2VNych/2xlqpCbaVpTMYlXz/3ZqAM3BceoxFBar+j+gPJn6u41ekqyuGIqPIE9hNkQg91 X-Received: by 2002:aa7:8809:0:b0:580:cc63:dcdc with SMTP id c9-20020aa78809000000b00580cc63dcdcmr37663908pfo.7.1672792382653; Tue, 03 Jan 2023 16:33:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672792382; cv=none; d=google.com; s=arc-20160816; b=lHDmL1Ntmac8CWi+0n6bildgsETGyG1TwvdQNWt/6bj+RgLKi/sdyEsJuM+6B9c2eH GNKAXR2gP7D/RU+POsUsDVXZ9VW3UoH0iLPSAVoIT7JWSAml0tgRqTB23dMog051/S5h 015yHZUQISQG4spSvF/+7K/w7Y/w8JG4/UxWTqs6UKTkLUhM4WefwxMy9Q0r8FyenY9t B4DUcrOpStFEjvbeirikKeeqxppsccu3lo1nZk/rFzY74FjejgQypp0zU4p1xA1bdAVu uDBmkI1SsHR7wl59BldWq4f6R3AiZyvDlnDBqFnxKc2p4TADiBD6g86WduqikhC889eN Fmbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=lHvYK3MFqjttdQWMiOHkYctTXu2WUFxG+8qUCFSB91A=; b=NeZ/aKTk62EsvBVBRmH9lH1rnHjfzy7TNocz1OwcXXyMr/knGPRwtycAgKW1/w8dTD NJO/x4VaXrA+w644s9zITf3S66XJzEOCc9zlHeSFzTk5f0nV6ygskgAKQv6p9V218+UI zP8QF23wTa4lTV2RIPpO8Hv13p9Kw272hHJ9pQKDXjtKCobuqnvAwtkPCJQtgvrzkhQe LeQYox3ltQaFnVUJ0pzBP1tuh/qqlObK/ftk1elJo0DykV+AJNaotq4kV9N8iTiYi0aI L37GzP7/xLmEeRPYGc9S0b/1UGC5gPziHmVMeR1mvqb8MzyKsS4LB8gWJJFVnXLwl5JF Qv2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FWXlyH0D; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a056a00174300b005787fd98b5fsi33081711pfc.274.2023.01.03.16.32.55; Tue, 03 Jan 2023 16:33:02 -0800 (PST) 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=FWXlyH0D; 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 S238798AbjADAZq (ORCPT + 57 others); Tue, 3 Jan 2023 19:25:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238471AbjADAZa (ORCPT ); Tue, 3 Jan 2023 19:25:30 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34A2D17588 for ; Tue, 3 Jan 2023 16:25:21 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id cf42so48177134lfb.1 for ; Tue, 03 Jan 2023 16:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lHvYK3MFqjttdQWMiOHkYctTXu2WUFxG+8qUCFSB91A=; b=FWXlyH0DAQ3qjP4Q2pgF0o5aG6p4f7qR3FOS2CBLCo1QzxsiBPk7duiTskSFrNN1Kb RgpUWyJLf4huPnauN9j6DAk1jZr4qSTitFN47DiHK7pAHjDN8rM0KEQ1JIRYhs1UHqfQ ieXQ8J1Y9gDKxl3n8vY8zrLhJ4LVy3iDdU9Ive6Wv4TWIe7cQNgpO1NsE3jS6Fri0bMr FlvRjORSjmBgWs9LVilG47sy3nKVh+ix1RH/CnC8xiuxOZpmVwelEz0JI3s/O8eAYiqo TmUoz+vTTgDQ/Jmpq8DUpJ8nxkiSpm8cLLGTsudLURsQr8OcVOmKvATN7FWPaYogOJa9 9ESw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lHvYK3MFqjttdQWMiOHkYctTXu2WUFxG+8qUCFSB91A=; b=BNe63wZdJwlqAyn03LtMw3kZs1j3+Lk6WiMvCd62p+eNg/PFL1ut5vjz9hwV84IAl7 7ceaszA4UE8/9emtr8RN8Fu+XFFQa5X6wP1wxGKO/fWxkweU3tXQmyP+YNBtzfRYjc5/ 9kkWjGSRMN6o5jbK9as1xeyuXpI0TjRrkcwF1uG/OGuZyBB2xcg2wnjy5MIvA3Fi7CSo mVA3+II56lL4SVDBZTC5oAvlpJCOibUaMaswLRRc53Nyn6oSO/oOf60VhgW8hyqGKHJV poGSJaDgWNn0UuCjAohFg53o9KKPtxRlFAoN8H+O7xGd0RH8KufV/Ka6qeZMjAxU+KMF sYIA== X-Gm-Message-State: AFqh2kqLoA61uAlM8BCzsKbcbZP2gAKhr1bONTDXBhdrgAIHJGh6tyoH Dr5wy1fO3Ph0Roado+v79eR8XQ== X-Received: by 2002:a05:6512:3d9f:b0:4a4:68b7:f878 with SMTP id k31-20020a0565123d9f00b004a468b7f878mr19118870lfv.28.1672791919499; Tue, 03 Jan 2023 16:25:19 -0800 (PST) Received: from [192.168.1.101] (abxi45.neoplus.adsl.tpnet.pl. [83.9.2.45]) by smtp.gmail.com with ESMTPSA id f2-20020a056512228200b004ca0ea7af24sm4969112lfu.174.2023.01.03.16.25.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Jan 2023 16:25:19 -0800 (PST) Message-ID: <14e06574-f95e-8960-0243-8c95a1c294e9@linaro.org> Date: Wed, 4 Jan 2023 01:25:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH 1/4] interconnect: qcom: rpm: Don't set QoS params before non-zero bw is requested Content-Language: en-US To: Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Georgi Djakov , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230103173059.265856-1-konrad.dybcio@linaro.org> <735088f7-2888-04b1-7751-a3ad7e13a857@linaro.org> From: Konrad Dybcio In-Reply-To: <735088f7-2888-04b1-7751-a3ad7e13a857@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 On 4.01.2023 00:07, Bryan O'Donoghue wrote: > On 03/01/2023 17:30, Konrad Dybcio wrote: >> Until now, the icc-rpm driver unconditionally set QoS params, even on >> empty requests. This is superfluous and the downstream counterpart does >> not do it. Follow it by doing the same. >> >> Signed-off-by: Konrad Dybcio >> --- >>   drivers/interconnect/qcom/icc-rpm.c | 6 ++++++ >>   1 file changed, 6 insertions(+) >> >> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c >> index 43b9ce0dcb6a..06e0fee547ab 100644 >> --- a/drivers/interconnect/qcom/icc-rpm.c >> +++ b/drivers/interconnect/qcom/icc-rpm.c >> @@ -193,6 +193,12 @@ static int qcom_icc_qos_set(struct icc_node *node, u64 sum_bw) >>       struct qcom_icc_provider *qp = to_qcom_provider(node->provider); >>       struct qcom_icc_node *qn = node->data; >>   +    /* Defer setting QoS until the first non-zero bandwidth request. */ >> +    if (!(node->avg_bw || node->peak_bw)) { >> +        dev_dbg(node->provider->dev, "NOT Setting QoS for %s\n", qn->name); >> +        return 0; >> +    } >> + >>       dev_dbg(node->provider->dev, "Setting QoS for %s\n", qn->name); >>         switch (qp->type) { > > Doesn't downstream clear the registers on a zero allocation request ? > > https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/blob/LA.BR.1.2.9-00810-8x09.0/drivers/platform/msm/msm_bus/msm_bus_bimc.c#L1302 > > https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/blob/LA.BR.1.2.9-00810-8x09.0/drivers/platform/msm/msm_bus/msm_bus_bimc.c#L1318 > > https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/blob/LA.BR.1.2.9-00810-8x09.0/drivers/platform/msm/msm_bus/msm_bus_bimc.c#L1367 > > msm_bus_bimc_set_qos_bw() > { >     /* Only calculate if there's a requested bandwidth and window */ >     if (qbw->bw && qbw->ws) { >     }else >         /* Clear bandwidth registers */ >         set_qos_bw_regs(base, mas_index, 0, 0, 0, 0, 0); > } Yes, looks like that's the case, but also it's only for BIMC, not for NOC: https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/blob/LA.BR.1.2.9-00810-8x09.0/drivers/platform/msm/msm_bus/msm_bus_noc.c#L246 Moreover, it only concerns QoS parameters that are not supported on mainline (Grant Period, Grant Count, Threshold Lo/Me/Hi) [1], so that pretty much addresses your worries, I think.. And FWIW that's definitely not the case anymore for QNOC (and BIMC for that matter) on msm-5.4: https://github.com/sonyxperiadev/kernel/blob/aosp/LA.UM.9.14.r1/drivers/interconnect/qcom/icc-rpm.c#L217 Konrad [1] Note: msm8939 seems to be a somewhat heavy user of these properties, maybe it would be worth looking into implementing them? > > --- > bod