Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3741731rdh; Tue, 28 Nov 2023 02:35:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIM8SKUzKDgcdILfRnYCwFNDlsShASoYdDOdNUYw5vyTgcVj07wuk7UWk9obqnIN824TEH X-Received: by 2002:a05:6a21:a5a0:b0:17a:4871:63fd with SMTP id gd32-20020a056a21a5a000b0017a487163fdmr24877848pzc.0.1701167716592; Tue, 28 Nov 2023 02:35:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701167716; cv=none; d=google.com; s=arc-20160816; b=GzBswDIppIosd1A4UPDv9iEYT96QsHNi0i2szJ9ft8iEsbwjKzehfz6AjdYRK+3kCl tHSUNE3FiecqBCMX8zDeiS40zNn5qcE5ePkYF8fuevdHwmCeZ6n+K5sF4ENlc0Vw4/P/ PCRWsct7Z3mcoAhr+dgPqk9BgTBetGWWU1I9kpBt4FWkXgJvaCXk/8GgOnJvEoXOGXzj WqL5sFEzqQqWPHVojw5/Iz1X8GM+WyYibKrg4oPHUZ6NfsBtyZzB+euicHQlnJ4rI67L FBPY05b1WH8nqhbNXOaZc3rIboArwATsNDu2PYPhs5nWUfpBUz900KrTahH9q/NJ+orH /IIg== 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=EpPTjdpeYg0w4loH5/do8EUAnKxDsHXE57/3N6Z68X8=; fh=pJeUrc44FHQLGEKCh+cUo+StaCY7ehoCLvOiez+AAZ0=; b=jQECLypnrw99+kDTW8jXg7rwpoc731iem0Jthy3ukjrcZ484o7QOiv6/Lgomwv6u4C DRVNs2EBUopM4xTJ2UUnbzTagcQ47SHvWhD4TY+aGSk8Wttr6dEZ9ZcLsHmdd2KSybe7 RJmB/huqoPbkWs47FAYZPYO+w0OwMppu5ls/7+IZDReXUJ9sqJUZYxPCJHnqVFgUunxy mITNTRInuHm0Jbba7eCT6jgAsdZH9I2UZK6FH9A5b8I0gg/XL6GC4oPmH8Yf7BMN2xgd SsiENw3pLIey761kEbwwmvnWbo8s04suzt6AVcajdSiTaL2LRFNRTxJa9dLI0B2ggQpA UlvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernkonzept.com header.s=mx1 header.b=aLdRprn3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernkonzept.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s19-20020a056a00195300b006c0fe2dfec1si11908987pfk.72.2023.11.28.02.35.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 02:35:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernkonzept.com header.s=mx1 header.b=aLdRprn3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernkonzept.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 574B5807FD61; Tue, 28 Nov 2023 02:35:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344154AbjK1Key (ORCPT + 99 others); Tue, 28 Nov 2023 05:34:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234887AbjK1Kei (ORCPT ); Tue, 28 Nov 2023 05:34:38 -0500 Received: from mx.kernkonzept.com (serv1.kernkonzept.com [IPv6:2a01:4f8:1c1c:b490::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7920F5B8A; Tue, 28 Nov 2023 02:29:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kernkonzept.com; s=mx1; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Content-Transfer-Encoding:Reply-To: Content-ID:Content-Description; bh=EpPTjdpeYg0w4loH5/do8EUAnKxDsHXE57/3N6Z68X8=; b=aLdRprn3bm9/VdAqUWI8sZMDGy 4Ueng9SKAuU2e4Wskgkno4UbZJlnpP1eXl7/6jV83jVYOdflrys0QAs5XEyLEhJAVz+3zfCG1nQ/K UsECCbRLlUpCwUYGqIKNij7GFXm/zEzzUhop4GmiIe29IczYFLyBNWr6ND5nCi5U6/EY5SEBMYaVG Ts4FZFbJTzvcmHSneNFdPCkUT/xUVlPJDP46mN09+1yQnBgpvVdEKHDorkkVgSkg3hTloxLFZUcgX Ae1wbZ+mlHK2lNlDk6tFANDHpBn6pf2/rXnN5qDETiZmVfpSq4NOfeer3tEfxtBlRYoeTXdMjxUek /R1p8+7w==; Received: from [10.22.3.24] (helo=kernkonzept.com) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) id 1r7vLD-008QQS-33; Tue, 28 Nov 2023 11:29:19 +0100 Date: Tue, 28 Nov 2023 11:29:11 +0100 From: Stephan Gerhold To: Viresh Kumar Cc: Ulf Hansson , Nishanth Menon , "Rafael J. Wysocki" , Stephen Boyd , Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Konrad Dybcio , Manivannan Sadhasivam , linux-kernel@vger.kernel.org Subject: Re: [PATCH V3 0/3] OPP: Simplify required-opp handling Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Tue, 28 Nov 2023 02:35:10 -0800 (PST) On Thu, Nov 16, 2023 at 04:13:04PM +0530, Viresh Kumar wrote: > 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. > > Pushed here: > > git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/required-opps > Sorry for the delay. I tested the "opp/linux-next" branch (which seems to contain the changes in this series already now) with the following configurations: - Single genpd used for cpufreq (MSM8909): Works - Multiple genpd used for cpufreq (MSM8916): Works - Single genpd used for cpufreq + parent genpd (MSM8916): Works, warning gone Thanks for fixing this! :-) I guess I'm too late now but FWIW: Tested-by: Stephan Gerhold > V2->V3: > - Dropped patch 1/3, merged. > - Added a new commit to avoid propagation and a WARN() for parent genpd case. > > V1->V2: > - Support opp-level 0, drop vote i.e.. > - Fix OPP pointer while calling dev_pm_opp_set_opp() recursively. > - Minor checks and fixes. > - Add Reviewed-by from Ulf. > > -- > Viresh > > Viresh Kumar (3): > OPP: Use _set_opp_level() for single genpd case > OPP: Call dev_pm_opp_set_opp() for required OPPs > OPP: Don't set OPP recursively for a parent genpd > > drivers/opp/core.c | 180 ++++++++++++++++++++++------------------- > drivers/opp/of.c | 49 ++++++++--- > drivers/opp/opp.h | 8 +- > include/linux/pm_opp.h | 7 +- > 4 files changed, 144 insertions(+), 100 deletions(-) > > -- > 2.31.1.272.g89b43f80a514 > -- Stephan Gerhold Kernkonzept GmbH at Dresden, Germany, HRB 31129, CEO Dr.-Ing. Michael Hohmuth