Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2467866rda; Wed, 25 Oct 2023 03:48:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFByGyshmiKWwWBV3MSeSJih/D0kda+0n2/7BkJJmdk1p1j+j4RrUryLohfDJbRamFqwuc2 X-Received: by 2002:a25:d004:0:b0:d9a:c5ac:9a60 with SMTP id h4-20020a25d004000000b00d9ac5ac9a60mr17181495ybg.1.1698230911032; Wed, 25 Oct 2023 03:48:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698230911; cv=none; d=google.com; s=arc-20160816; b=qfnA8uib4zMAp6DrVSlnlHZXQze305md6DQSjLqvc/zqvejueCrOcv3E8aJejqkJk7 rYc7ymQiMwz+aTK3KzeHF1Zqf9jMQfwBWaAx2aGTSrUD4ezNqhKW5JQobr0y6y+I4kSN eJshZvHZcyqnhqwcV+GpcoklUZDAQ5U0YsMlalG8/CnunUw2N/y3XCRg9DpufviAqU41 yXwDvBMP5ZYaduM/wachpTgLy1XunlVaq2KSRauLapGmmKpkXjnyC5Wu7D56+4T0Kn+/ W62md+/aQsGAbwphtPOSIx0qk2Zuyas1Iid3laa/B7pX1DRakkrQsLzwb0fL6xx2mmTZ 0eQA== 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=ucyvmypzRWKXaw2KCmPDs3/ttcZLG0HVnAvEwAPFzTE=; fh=5XTnUzlQXsGVkho5v3w8+4MESdUzxSMTWxIXgidQgXg=; b=jhRwZIL8bnzZfTYhYeV7DOWjHn9cBJRRwqzj3Zm8n5DN6LbJ5EOk6AbejnUDPmeCGn i47xf+P2p3TWF3doobbqK01yDKfPthbEiH4Brbmq/DKKUEoHttsq02H5kzVNKG3QOQsm ndAPAuazjBB30EcdoWGFU19E43xaMf9RFRiKg/gIvwhNwZ9b7J7Z0sZ2WYf44bjF7Jxc rO63VoNLfSNE/09lxKxMFw/GAbL582oAU+PgTwEZoEEPco6Z6+5MPoh6ahK35tfUf1Wz AlNWG31bb8IL14z5132Fy+piBbbd+R1HfWdZ8BQeBjpHJki+Z8beY3WpJaBwX4tZSV8O n0wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L7eNDkYl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id g10-20020a25ae4a000000b00da05a08a022si2743155ybe.354.2023.10.25.03.48.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 03:48:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L7eNDkYl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 58A1E8067E21; Wed, 25 Oct 2023 03:48:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232789AbjJYKsT (ORCPT + 99 others); Wed, 25 Oct 2023 06:48:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232076AbjJYKsP (ORCPT ); Wed, 25 Oct 2023 06:48:15 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD516A3 for ; Wed, 25 Oct 2023 03:48:13 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-692c02adeefso4451795b3a.3 for ; Wed, 25 Oct 2023 03:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698230893; x=1698835693; 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=ucyvmypzRWKXaw2KCmPDs3/ttcZLG0HVnAvEwAPFzTE=; b=L7eNDkYlsLkf6Fe00FrdSdoNMOO8cdii5WAj+8r7Bog4c3a93/ptCZZ0bjGjttp/nN RmFzM/NeTksb+kxfgBE7l1M86fKv7WvRWK2JQaS+FbkHuejNpu1JLvafa/dvtXKsK0oY joAEO/TpM6FPRE+OEo5yZgYbiUUZ6Dhm+ETL1Px9+foKZFYivaYfbG1M4q5BBI+3ccLJ NTqQrslcJ6HVKhgYWXTDoonkpBzfzRKVxLnJ7o6TqdXZFSkrpl8az4I6N0IZVG8KR2gv DXQVens7HmqqAIgPy239dtiMPG1e+j3dJq+zKplsG8Pr+RW5lzy6ugRbgC+DEnjlEYZl vkbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698230893; x=1698835693; 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=ucyvmypzRWKXaw2KCmPDs3/ttcZLG0HVnAvEwAPFzTE=; b=m+D9xiFVr9nM5IchunaTsTrg5AhA/nn5D8OHU6jJ1p2bgdB6FHJEFQD49dWqARtdX8 GZ0PHMzN2vLTgKnVHTNHi9iBySTvAR0nf5Qlkgy1Aqg2VHxb0IiTqxeShm2SMVkcMvCM DRkRMOwWgX14V6AXAhfUbSLzR2Jy1LpuwFmcmijZIeu+9RR/iOPXRmigGGUUrcTT7WGU 4wqkqgtwd6+6t8l8RlgwcaJolM4+q/I16EpQw7UYSMnrabRkjA0xNNS8J1uPNU0WMmtV NIJrY5yjxt9oFOjeBvNfrvRU+53vMhxJfVF9R53cC3nnujkL5MKhr2o5o6KliGaHt903 2DRA== X-Gm-Message-State: AOJu0YzJYydrbfRLPCYdh/rACBj6IZJrf8PSISMJhSJF5vKZfbUtnnBL hqqMkCu9ukEwCZ+ZL3I/QSfULw== X-Received: by 2002:a05:6a20:918b:b0:16b:abad:87c5 with SMTP id v11-20020a056a20918b00b0016babad87c5mr5789222pzd.10.1698230893058; Wed, 25 Oct 2023 03:48:13 -0700 (PDT) Received: from localhost ([122.172.80.14]) by smtp.gmail.com with ESMTPSA id 23-20020a630f57000000b0059cc2f1b7basm8387031pgp.11.2023.10.25.03.48.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 03:48:11 -0700 (PDT) Date: Wed, 25 Oct 2023 16:18:09 +0530 From: Viresh Kumar To: Ulf Hansson Cc: Viresh Kumar , Nishanth Menon , Stephen Boyd , linux-pm@vger.kernel.org, Vincent Guittot , "Rafael J. Wysocki" , Stephan Gerhold , Konrad Dybcio , Manivannan Sadhasivam , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] OPP: Use _set_opp_level() for single genpd case Message-ID: <20231025104809.qw5vk3liuffgtqk3@vireshk-i7> References: <20231025065458.z3klmhahrcqh6qyw@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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 03:48:28 -0700 (PDT) On 25-10-23, 12:40, Ulf Hansson wrote: > On Wed, 25 Oct 2023 at 08:55, Viresh Kumar wrote: > > On 19-10-23, 13:16, Ulf Hansson wrote: > > > On Thu, 19 Oct 2023 at 12:22, Viresh Kumar wrote: > > > > + if (required_table->is_genpd && opp_table->required_opp_count == 1 && > > > > + !opp_table->genpd_virt_devs) { > > > > + if (!WARN_ON(opp->level)) > > > > > > Hmm. Doesn't this introduce an unnecessary limitation? > > > > > > An opp node that has a required-opps phande, may have "opp-hz", > > > "opp-microvolt", etc. Why would we not allow the "opp-level" to be > > > used too? > > > > Coming back to this, why would we ever want a device to have "opp-level" and > > "required-opp" (set to genpd's table) ? That would mean we will call: > > > > dev_pm_domain_set_performance_state() twice to set different level values. > > Yes - and that would be weird, especially since the PM domain (genpd) > is already managing the aggregation and propagation to parent domains. > > I guess I got a bit confused by the commit message for patch2/2, where > it sounded like you were striving towards introducing recursive calls > to set OPPs. Having a closer look, I realize that isn't the case, > which I think makes sense. > > > > > And so it should be safe to force that if required-opp table is set to a genpd, > > then opp-level shouldn't be set. Maybe we should fail in that case, which isn't > > happening currently. > > Yes, it seems better to fail earlier during the OF parsing of the > required-opps or when adding an OPP dynamically. In that way, the > WARN_ON above could be removed. For now I will leave the WARN as is, will reconsider if it makes more sense to fail and return early. And send a separate patch for that. > That said, sorry for the noise and either way, feel free to add (for > $subject patch): > > Reviewed-by: Ulf Hansson Thanks. -- viresh