From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCD3AC77B7A for ; Mon, 29 May 2023 09:35:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229960AbjE2JfL (ORCPT ); Mon, 29 May 2023 05:35:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229626AbjE2JfL (ORCPT ); Mon, 29 May 2023 05:35:11 -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 580CEAF for ; Mon, 29 May 2023 02:35:09 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4f4f8b94c06so1422968e87.1 for ; Mon, 29 May 2023 02:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685352907; x=1687944907; 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=EOKCBUL648q97kLRF9tfMFKtwd6LoXtmMXWYb2u6bRk=; b=JVg1Trzmwy2eoA06j0namth1kL0WPHXxv80mECAM3b/CUsdb0Dkf98mBF6g4MIxmvp jKPKcAs3VTZxDquiltTYH7h4+ncDB4yGEl7NI/SguvFTuvZjuGtr0R6dwfl/f7eenT0m +TWLkDfK6XeMPQiwlVVcKznqCtyxfswe/ULyd/tx5LXV9/oNKi/EJ2rhNgG1MAfcuOQg 1Ag0cyV35/djicQDH1wnnO/GRmUPc5YZH7xNbMMHyFBOAfOD0IfpoAJbmpgEEoLwmjow 3NVRULnGDZiCJVQtDDiPiYL9mkaWN5DYt2QXCFCt0k+HgM0BoQVb55P1Tiu52Ib6hFwi kBsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685352907; x=1687944907; 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=EOKCBUL648q97kLRF9tfMFKtwd6LoXtmMXWYb2u6bRk=; b=XUXZ4GrP+BGgM2n6MeZhb0WSJhUKQ9m79wnpZTyOmj/vO3M/NeEBih0FUT2PIvy1P+ e4rtEBNswmUxHXeGSr9zgP8AT9LBmB0KETyXhs8Rd0SGuHfvoPxPbpZRf/ozWcvTfwRU SXsb6V91T/DPxKWVJjr6VJe17NPqPqYzEKu4BsUDjc09j6QEU0rX2E4DTyA2DxsKyN8b RLy3MqU2II21yAbK/ZV+vGiMjO3KEqUHy14C8X/Odnqt0VAOyFKkKAOKanI+RVYC/8HN S+l8Rw3uWoSFE2sRePcbtMPPulXjqpP4zQ6UE19jxc2Dvu5hpZGddsxXbvkljcppBnXv UGZA== X-Gm-Message-State: AC+VfDwqJdmfhEM0SusVcEoyR5gMgUIqRkCmZvgclK5lp+/aIRQTbCOK 3NVnkpB20VyrXfBRpbcPMowV/g== X-Google-Smtp-Source: ACHHUZ5k6Jz2kHv+nXZor5o1b9WEfEPLB6caKN8Zn2RiFU78OHEwZDH0Q0ZhTu0o+mhwNv/254YUFA== X-Received: by 2002:a05:6512:64:b0:4f0:c18:5114 with SMTP id i4-20020a056512006400b004f00c185114mr3436816lfo.26.1685352907550; Mon, 29 May 2023 02:35:07 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id g21-20020a19ee15000000b004f13bc97b00sm1880535lfb.119.2023.05.29.02.35.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 May 2023 02:35:07 -0700 (PDT) Message-ID: Date: Mon, 29 May 2023 11:35:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH] opp: Provide a function for just setting bandwidth Content-Language: en-US To: Viresh Kumar Cc: Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" , Marijn Suijten , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230526-topic-opp_bw-v1-1-e881091363af@linaro.org> <20230526105320.pfnu3oxl2cm37ot7@vireshk-i7> <20230529045854.gh36k5my4i35jspc@vireshk-i7> From: Konrad Dybcio In-Reply-To: <20230529045854.gh36k5my4i35jspc@vireshk-i7> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On 29.05.2023 06:58, Viresh Kumar wrote: > On 26-05-23, 12:59, Konrad Dybcio wrote: >> There are some users which have tight power sequencing requirements, >> like the Qualcomm Adreno GPU. >> >> Dropping the entire OPP kills clocks, bw and required-opps at once, >> but on certain Adrenos we need something like: >> >> >> disable memory clock (clk) >> disable all other clocks, including the opp-managed core clock (clk_bulk) >> kill one, fully manually controlled genpd (manual runtime pm) >> remove bus vote (func proposed in this patch) >> kill another genpd (manual runtime pm) >> kill the opp-managed genpd (automatic pm calls) >> >> Changing the order kills the chip until you reboot the whole board and >> setting freq=0 using dev_pm_opp_set_rate doesn't drop the bw vote. > > I am a bit confused now. > > What's the exact problem with dev_pm_opp_set_rate(dev, 0) ? It does set the > bandwidth too, from what I can see. I think I didn't state my intentions correctly.. The proposed function would set *just* the bandwidth through OPP, so it'd be essentially equal to loop over num_paths { icc_get(...) icc_set(...) icc_put(...) } but since OPP already picked up these interconnect paths, it makes little sense to mess with them through raw APIs. Konrad >