Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2639967rda; Wed, 25 Oct 2023 08:20:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGx/VBHEizZlCvhnqaR1lvxpc3vf2cRue5iuPwDAREBYMbuvydhjVbKCQUgXgVzrtcSmYu X-Received: by 2002:a05:6870:1399:b0:1eb:192b:e75a with SMTP id 25-20020a056870139900b001eb192be75amr13918274oas.22.1698247222451; Wed, 25 Oct 2023 08:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698247222; cv=none; d=google.com; s=arc-20160816; b=IhaNq5Syi3O2IychZBzZuHhrZKBE7f2ug7k4NAG7uLjJDoYjLH+cCd4WCew1OmyIpg ruTnjUFyNf2TENmiXZe+yh+tgf07IyWTkieaxbqs9Ee0bYfcpy1KhRSCb3R9mpmdc7pU PkrtImSCGHZmhM6/BCEXGawqyUqrBhTvTciFBxORY4wlATH533L11PQoNBalTzjjYRuj ha+FsAQcGzyQ8FZOmKSqJSvm3zohIN6OpFtxn+17PG+TzxVFUw1OeFetmqKKcRdIGC0Q WwwHIpjb5knKyyin6Xr0Mu2G50krZd/vXemKlXlPwbVV8FvRewA7e4KoAP+a0gGzK5nH Wf9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Y3lv5Qm5KZ1wBNQrJphcoB2ScgP49VyKoXNn5pKg2JQ=; fh=1LJ9p7l0FPRDZPGCtImYdZsVUN9O+j9gxl1SPYMeQ6c=; b=FhRKRg7D87Ef66T0iyjUNtlhtc7Lu1t08gIGp2cZcf/hzl7NNVHfJDm5Q4IiZYdhl9 9ojNVVnaxIXZp9DbjVZnJRYvSl5zURHbm7vlpEMGKzN+BKTe+8oYbQyD0yvv18rSO197 pkfNcjrdEqVUDS0hVDJBh9JkkGWzMvoS2aHMSJTW2+OEp8HOYaRFm2To6G8s2hBUE0+m sE7RWBUBmczaZ9WXBDBMV6hmYLCCOLtEKjP0aGdDQR7crhEYb3IZH7i4f1PEmgaRn6XE FtUj7Eb0zwhTcoo5D1t7+W25r3aoeuUIe7wBsYgpPmjcBJrFWqqP5haNv+WGR9jv3caq 9Vbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YDMEaIIk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id h3-20020a0dc503000000b005a83dbf2775si10423949ywd.444.2023.10.25.08.20.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 08:20:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YDMEaIIk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 0541E801C9F4; Wed, 25 Oct 2023 08:20:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344214AbjJYPUI (ORCPT + 99 others); Wed, 25 Oct 2023 11:20:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234999AbjJYPUH (ORCPT ); Wed, 25 Oct 2023 11:20:07 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 310EA129 for ; Wed, 25 Oct 2023 08:20:04 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-692c02adeefso4732260b3a.3 for ; Wed, 25 Oct 2023 08:20:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698247203; x=1698852003; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Y3lv5Qm5KZ1wBNQrJphcoB2ScgP49VyKoXNn5pKg2JQ=; b=YDMEaIIk8pVpzw3S4+Ydtt2PxmoFjfCRnEa0fHU8KDFDrYiQPQ8rgdbg/R4hhq10JZ HYXWj7G0WgUqIUapJwqNAjrLkZh8l3VbbAOjKgG0cOlaKS85U3QLeQI/A477r49JBAVi jbMRvavqSDBXF8EfVXvBQW31orlcPnOzB7gkIgHi7pT7SmRe116w5Gfw61v9DYMnV2nZ rhz6oanQ2cPCvEsgQQBjY1CjDoLvwgCiI9Ked03ZKIDKfxLq4ZodjYyOg9llSvNfZROl HUbPgUKUgjUrAwmVuyo+p/Oq1fI0KgYsgfhmExUcxByS/rxL7obXlPhAm/ByJvQhB+fT UuKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698247203; x=1698852003; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Y3lv5Qm5KZ1wBNQrJphcoB2ScgP49VyKoXNn5pKg2JQ=; b=ckOANLrLaXEvNztwRu30kDjLuKY9mghKpayIRmHoJMvvF98OMf4DWYcu45zS+5R3vT ortd/2Kno/au6n+DTe6vneOu7LDJ2zM51DCGEpAYVIqNN6ikoGtw4AMyKws/J/+cBNg+ ealFx98b2aAVu0w/qVKbtXHXajBtmBCVd40dOigkkz1/qXGKr7qHOsAHcn9WPNjrdJsO ykYGS5HIHAyMhb6TbS13TMizsGya7nOV58jjBvqTHS0mvBGMz/xcrkviRD9L/ztJG2R2 B+5wxzYnc9vvxkfy2h+MiREdcNr6ZLfDaZJBmS51i3tTPdda+94weVpHP3AcvC6tcz3E II0A== X-Gm-Message-State: AOJu0YyHGOZyBRAXvdG1Q+qgMnwVENoauMQZXwS8hRzUfH65b9VtGkWf 4fTuEehxEJorRcYHLUC8+9NKO04VrjrK8X9kAq8= X-Received: by 2002:a05:6a00:158a:b0:6bd:2c0a:e82 with SMTP id u10-20020a056a00158a00b006bd2c0a0e82mr15248100pfk.7.1698247203587; Wed, 25 Oct 2023 08:20:03 -0700 (PDT) Received: from localhost ([122.172.80.14]) by smtp.gmail.com with ESMTPSA id m188-20020a6258c5000000b006bdd1ce6915sm9919976pfb.193.2023.10.25.08.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 08:20:03 -0700 (PDT) Date: Wed, 25 Oct 2023 20:50:00 +0530 From: Viresh Kumar To: Stephan Gerhold Cc: Stephan Gerhold , Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Vincent Guittot , Ulf Hansson , Konrad Dybcio , Manivannan Sadhasivam , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] OPP: Call dev_pm_opp_set_opp() for required OPPs Message-ID: <20231025152000.vt42gvti2e4rewwc@vireshk-i7> References: <6de4fcb5bb943a131d0cdf0a858bd35af02a2f88.1697710527.git.viresh.kumar@linaro.org> <20231025073634.4et5epfog25o2pxf@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 25 Oct 2023 08:20:20 -0700 (PDT) On 25-10-23, 14:17, Stephan Gerhold wrote: > Thanks, this seems to work fine. Thanks a lot. > I found another small problem: In my OPP setup for MSM8916, some of the > required-opps point to an OPP with "opp-level = <0>" (see [1], the > <&rpmpd_opp_none> in the cpu-opp-table). This is because the vote for > the "CX" domain is for the CPU PLL clock source, which is only used for > the higher CPU frequencies (>= 998.4 MHz). With the previous code you > made it possible for me to vote for opp-level = <0> in commit > a5663c9b1e31 ("opp: Allow opp-level to be set to 0", discussion in [2]). > I think now it's broken because the _set_opp_level() added by Uffe > checks for if (!opp->level) as a sign that there is no opp-level defined > at all. Yes, we broke that. I think a simple fix is to initialize the level with an impossible value, like -1 and then 0 becomes valid. > Based on my longer discussion with Uffe recently [3] it's not entirely > clear yet if I will still have the reference to &rpmpd_opp_none in the > future. Alternatively, we discussed describing this differently, e.g. as > a parent power domain (which would bypass most of the OPP code), or > moving it directly to an OPP table of CPU PLL device node (which would > only describe the actual "active" required-opps). > > I'm not sure if anyone else has a reasonable use case for pointing to a > required-opp with opp-level = <0>, so we could potentially also postpone > solving this to later. I would like to fix this respectively. Thanks for bringing this up. -- viresh