Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp245301rdb; Thu, 19 Oct 2023 03:22:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEP+etKMyAAzahS+jUf12E+FzJxVQOhe0dpPjLTNZrVi5pIAvbMZn0BsPJm4HeBvNo7iisH X-Received: by 2002:a17:90a:e7c7:b0:27d:428e:3102 with SMTP id kb7-20020a17090ae7c700b0027d428e3102mr1657822pjb.44.1697710943941; Thu, 19 Oct 2023 03:22:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697710943; cv=none; d=google.com; s=arc-20160816; b=OPhnDbGczEvMdkrTpuOrELwg2Ui/jJ8lDToEWGL64JYOr5RWEjw7XFfjofDV37RxIL UXthlTTfdPHfZgpNPf+zrlSb0VOFVPP7jbEMvDARsLgW5fkoQweiZDwfDCW4m7/Z/vta Wd/uFLeMdeBMSVlzpHWQayk9e0Vm0OiivvFHsUje62tSyHjDXYSI4BGKDeESB9zCNWc9 6tjVWzFwuVc0T+hhtoa/AjRqEGZKlfUVV5U1lQX1FvrHRpPvGU8+cbyOArMntagLK8gA bBI4mOY2mMa1gSq5bP4leb9ZlHLtDJmXU8dmuRm5xG40MsNoKtNwZDBiRrgSQqqFux02 grhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=cnGyqdrVN/X7X7Pb/6Zeyan6nuK9AbTDVs6f1urVbyU=; fh=JUYlNDV7nRVv5GTX6O9FQA2k84zJVA9vaIwmsOtZmYc=; b=U5tJMbP1V8R/r1D5s7Xe5c1+QDFVZXvi9UUmcSv3g1uwxp6dgon40MRMwf8ZnBftL7 bClY2ZYRxzG5CPpfftazhxFLFIReT720J7Z61P+SR57lObl8zQLgjPRJAi50OK4jLZPw i4JetpMr5E/rIft74Z1GtVfi/0YZmk2hYUdHdv2vnAYu+1kZ6RjIoRubOdFnWCreDKtN dcpCteH265U4Z6eZSAivJQYhZyYg6zlTV7GT1whhcA7UaVFCe8pafKR2gdl1GfULb1jG KLg+p71KlFiHjt57Qp4MLE/9w+zo6s/ECwu9FOvdmOqRGrqInLVApjazDfKIUqUIBfes ocCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZH7QqMN5; 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 il7-20020a17090b164700b0027b15e572c2si2051623pjb.21.2023.10.19.03.22.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 03:22:23 -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=ZH7QqMN5; 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 8DF09823F5A2; Thu, 19 Oct 2023 03:22:21 -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 S1345259AbjJSKWN (ORCPT + 99 others); Thu, 19 Oct 2023 06:22:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345249AbjJSKWL (ORCPT ); Thu, 19 Oct 2023 06:22:11 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7121121 for ; Thu, 19 Oct 2023 03:22:09 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1ca82f015e4so30841305ad.1 for ; Thu, 19 Oct 2023 03:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697710929; x=1698315729; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=cnGyqdrVN/X7X7Pb/6Zeyan6nuK9AbTDVs6f1urVbyU=; b=ZH7QqMN57vWH5mEk3jIt/msMPtb+PCytDyDZ7DdWqwNq5ELCjtbxyx+pReR01zLzGF GLy6j9mSQfK1pDm6HVkf2HdzlewapYeIVkVF92bTpQZAoDL8Cw32EDXFzG0gdvH229gT pEp/qNB8xWirNUM+YD5DFEhaO1boXI5VMjVjNJy5eFz5Z5I6lhUwiQ81StEyoIhijziM OvcX4VXCpPieBtW22liXVlAR6kgSHntkhi+zb4dg4AqFZtTPyuceVHwaYVjSxafZjYH5 KLS7Oxk9w3nA+bShKvRFIykGybcmlgmzCgjVXlB98M140UEgH/pXWCLeD2YNFIghobPW 7FLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697710929; x=1698315729; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cnGyqdrVN/X7X7Pb/6Zeyan6nuK9AbTDVs6f1urVbyU=; b=MTHBX+PY2x1XNhY2ucXU3jJ84/eVxmVFASB7tmRU0u8I5topZb1BtnJP8JqOEpEWs9 /YqDKZRYtqd+cafYxGSU3DqorUZrt3CH8C1m3oDG6sY/sX/DATqSqR0OIH1U4GiRYPUg ch60d1qjs2/n+NupWU90s5dZYDwVo2Lz1TFre9P9sl6g2km4zs46/xVC+eAQSHkGCyGN m0uswaREeyn7qQi/wPx3y8rky56HTUjQzA05mOmqcVnWp0bIMpChmuoUPYGn+omrGYOy Fk1S3KN4vozIr8xOjW7DXY0O0q3+AGsGS2g0Os1TyzePHIopArjbCNrmBzsmOddFJ9qb YPxw== X-Gm-Message-State: AOJu0Yx/zDXGfcThdw2oIJAsOIoAMRsuIVB+Hw16M+yZNpTLnSSR4ziz 2fwjN2NbgJDMEvkUeiV4YWjn+Q== X-Received: by 2002:a17:902:ef0e:b0:1ca:362b:1482 with SMTP id d14-20020a170902ef0e00b001ca362b1482mr1617202plx.67.1697710929252; Thu, 19 Oct 2023 03:22:09 -0700 (PDT) Received: from localhost ([122.172.80.14]) by smtp.gmail.com with ESMTPSA id y6-20020a170902864600b001c0c86a5415sm1551706plt.154.2023.10.19.03.22.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 03:22:08 -0700 (PDT) From: Viresh Kumar To: Nishanth Menon , "Rafael J. Wysocki" , Stephen Boyd , Viresh Kumar Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Ulf Hansson , Stephan Gerhold , Konrad Dybcio , Manivannan Sadhasivam , linux-kernel@vger.kernel.org Subject: [RFT PATCH 0/2] OPP: Simplify required-opp handling Date: Thu, 19 Oct 2023 15:51:59 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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]); Thu, 19 Oct 2023 03:22:21 -0700 (PDT) Hello, I wasn't able to test this locally (despite trying to hack it around) and need help from someone who is `virt_devs` field of `struct dev_pm_opp_config`. I asked Mani earlier to test this, which he did, but unfortunately he could only half test it as the platform didn't have `virt_devs` configured. Pushed here: git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/required-opps -------------------------8<------------------------- Configuring the required OPP was never properly implemented, we just took an exception for genpds and configured them directly, while leaving out all other required OPP types. Now that a standard call to dev_pm_opp_set_opp() takes care of configuring the opp->level too, the special handling for genpds can be avoided by simply calling dev_pm_opp_set_opp() for the required OPPs, which shall eventually configure the corresponding level for genpds. This also makes it possible for us to configure other type of required OPPs (no concrete users yet though), via the same path. This is how other frameworks take care of parent nodes, like clock, regulators, etc, where we recursively call the same helper. -- Viresh Viresh Kumar (2): OPP: Use _set_opp_level() for single genpd case OPP: Call dev_pm_opp_set_opp() for required OPPs drivers/opp/core.c | 144 ++++++++++++++++++----------------------- drivers/opp/of.c | 35 +++++++--- drivers/opp/opp.h | 8 +-- include/linux/pm_opp.h | 7 +- 4 files changed, 98 insertions(+), 96 deletions(-) -- 2.31.1.272.g89b43f80a514