Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2270019rwd; Fri, 26 May 2023 04:26:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6iQcHmAMQ6W3J9TZL2ztklbFkciG5gL9cdHg80JIft2qFjx3X1XKyqHbelYOwKYZ2hsMhR X-Received: by 2002:a17:90a:b28d:b0:253:9478:5da6 with SMTP id c13-20020a17090ab28d00b0025394785da6mr2048358pjr.15.1685100366382; Fri, 26 May 2023 04:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685100366; cv=none; d=google.com; s=arc-20160816; b=LCmqVGhTuTKZtbpl04yRlVx5avEwKoD62t0UhRFmRoirKRDEnwGl27hmb5G/c12t/N E30C+n+WjBiltycctw8nDOf7OVVgYcyqL8VCC0io0/WZAfUxcrSKNIZgH6JYSafoY9K/ GmxFpjdos1aOo0CAklcllJxBSBGVWGt5fGjIs8fnYO/Z56u/f+xBpgQm+mj75qBqfzvF 2wvDHtT+0TsLiJuEV8Z4BYHP+rZO92qTrRkaFHtTRnE7Kpf7LSbHSkQDUYFcntuS46Sz rrWYZs0ZRoeA+icy8loDf5qIOBGIjXEQkRjjgtg5S3TvLEdkdiMJKCZBb1Rw+t5Dhie2 xeug== 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:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=+LLFdqd+rVHftP7KktFiZcZEDAD0B2e7kG5B77pkw5s=; b=rJBV9/hl9ldyJYwgtXp+kLqAowLNOFqjibUS03dTPEd+xfDymh16FqoqdkM9fSn/3A Qfc23ImX2QT4MjeOeLUOyUTgeVoW/Qwc2U+xAku9Uj5lJUdIt+7VMN/xMGoyA9tg0c6D qXG9PpdIASFdIRE0w2LmNXTa1W7CtvVePiYzuYZ3O5csN4kRbbZtousuJ2cevXpUzZnC uY00+s14WOiNjv4e5nHkzEqNohBkjW9yORcbhDzAbAgh4KAPUXltmD27UsU6P9WRD0Te SGbQxlvFG29sSNUZvZvjhzotW4Vi3CStwUvZYqQ1pKFXzFw9gbsKBv35kJIwR3ULLywq P9AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o9herHqQ; 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 kk1-20020a17090b4a0100b0024df598ed11si6500433pjb.188.2023.05.26.04.25.53; Fri, 26 May 2023 04:26:06 -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=o9herHqQ; 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 S230177AbjEZK7Z (ORCPT + 99 others); Fri, 26 May 2023 06:59:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236264AbjEZK7W (ORCPT ); Fri, 26 May 2023 06:59:22 -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 4075312F for ; Fri, 26 May 2023 03:59:20 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4f4b0a0b557so611037e87.1 for ; Fri, 26 May 2023 03:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685098758; x=1687690758; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=+LLFdqd+rVHftP7KktFiZcZEDAD0B2e7kG5B77pkw5s=; b=o9herHqQ/9FWu/DSD5/J3kEJkhEXcm0eH2LMgnJYUcmqsXsntWzhX3Lr3/qVfVHuJK zw3TpJyi6e461XCUuMMASnEUaXZd5mM5W2t0tQWVLJ537zTiC3bC/KzjsVK71eV9Eebw VV4bJISV7k0GrVy3p8zenxczvhkrUlAB/YhuD07V7qy0tnGrcuxQHwr/EcEa+Fhmvr6H WK/MvtJli0flVUC1B2KeKzKrdr1UVUZaOigci/g3EuUxnj3+siy+/l4H1nFly3KLf96V QZ10kKRwty+ccAhsWvUHimMfrltqPn1X5huhIK7p29tDTmHIrl6TPggYeFyVEku9kASx RmrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685098758; x=1687690758; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+LLFdqd+rVHftP7KktFiZcZEDAD0B2e7kG5B77pkw5s=; b=k9aBc2CCMBvpHX9mX/sw/ouim1dDhl9BDhmVXUDx/kyV0sPP5nypzgrDp+9ZpAgLsw 8Z4gCNqDUAwyqvr0R7hEdfcBRSMI6oorMt8MaLzDGmwrKQvgSrpVXoTanDunNB7aD7AU 4g5AKxrJHvft3Kg6Y/eUaXn45E/yzGtTqBnRuq3LPxLAhKqFzYubmJUu0/kiWbffP+mT 3oAlOOoVE4ejR8eOBMVfr8GzE1QZOJUVaqPS7ibB7taZdnk0TBccDJ36Dh5VdsBJykmn Kp5nM4fO8xxxHAzjL2/8TbjBy0B9P1G9T4osWrKUbUlcQGzo1o3dX9zl5pouKqRINdAF qFdQ== X-Gm-Message-State: AC+VfDzCGIhHaEtv4e9+vFvRWDzhQ1++KvB/DUVFjXxH+JTe3xuiojOE Ggcq9B8xS2NpDo1h1c9/zx/xww== X-Received: by 2002:ac2:596e:0:b0:4f4:b3eb:80f8 with SMTP id h14-20020ac2596e000000b004f4b3eb80f8mr462729lfp.3.1685098758514; Fri, 26 May 2023 03:59:18 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id u14-20020ac248ae000000b004f387e3b376sm572437lfg.150.2023.05.26.03.59.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 May 2023 03:59:18 -0700 (PDT) Message-ID: Date: Fri, 26 May 2023 12:59:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 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> From: Konrad Dybcio Subject: Re: [PATCH] opp: Provide a function for just setting bandwidth In-Reply-To: <20230526105320.pfnu3oxl2cm37ot7@vireshk-i7> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.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,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 On 26.05.2023 12:53, Viresh Kumar wrote: > On 26-05-23, 11:17, Konrad Dybcio wrote: >> Currently it's not possible to set just the bandwidth if the OPP >> describes other properties (required-opps, opp-hz etc.). >> >> Introduce dev_pm_opp_set_bw() to solve this problem. > > The OPP core (intentionally) doesn't provide any such interface for > freq, volt, bw, level, etc. > > Setting just one of the properties for a device is potentially harmful and the > OPP must be set as a whole and so this isn't allowed. There is > dev_pm_opp_set_freq(), but it uses freq to just find the OPP and sets entire OPP > only. > > Why should be break this for bw ? > 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. Konrad