From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 876F2C4363A for ; Fri, 30 Oct 2020 11:48:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27B6320825 for ; Fri, 30 Oct 2020 11:47:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="WAUf3+d2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726520AbgJ3Lr7 (ORCPT ); Fri, 30 Oct 2020 07:47:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726259AbgJ3Lr5 (ORCPT ); Fri, 30 Oct 2020 07:47:57 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C725C0613D4 for ; Fri, 30 Oct 2020 04:47:56 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id p22so2570343wmg.3 for ; Fri, 30 Oct 2020 04:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/VyNGryLroT7qe3Pp9ybD5lnQfay5phLuhwNvbxhxYo=; b=WAUf3+d2JVTc2U3d/Gv0nJozocu951OOswUcD4xo4Epo9ZKRp2kywPmcI5+AU5Ugsz UBdOx//W7jjKZser0nHrjrHeBnt9qZTzPXTgOViuENyjBKVk+UCwFV57rong8tik9US7 0vdI2MSbFnECyd+W32GDQdbCNM11iHJ49aIL7Pp96UzJg+rlbr9sVViA8uDktOwXOBtP t6KE1+BfjVuNIPaaqymUGIbXvZiljCwXch95AOP8EgnaOYgWxtDwowi+CBmV9S6/jWhk BHliUO4ci5VZ6iOI1sdxImSGdGpY8Pj588LX7bsBsdAQGIRtl7CfWi7FfQNO6XdkXx5q spfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/VyNGryLroT7qe3Pp9ybD5lnQfay5phLuhwNvbxhxYo=; b=FHZzltEnpvWw1fHe9C/UxV5afL3hqTSQz3Dr9bWWs/l/fA1BYBnpakGGx1NF6ziqX0 nKEKmPQVLI4LQzAyykkRoOQtyJ4B6Jg86S3o6C+n+f4ykgFy7S9hUTtHKQvfW9dMVz5O nXE0nUEsKqDD7vWqIi4DLdE/+m8NRqnBIBcJ6Z907v1SqWdTKW1E3BF43tENIAT/azT1 n+vH8zT3l+wKVUveEeYgEpBvaXQAi09DqMXtTuIV/i5iS6qfO7izG9DHaQw9B/AJ2YM2 toAvfX36M5SuEHcuwBofB+5yIkyh9G/MxgRove0WTRTwAwRgSUIvcvVj8O2foDB1KqZ7 TMIw== X-Gm-Message-State: AOAM532pVOVej29to2XV5zCw76kb9f86NOq5ZHlxsCHi8WcVc58zvcnt RP7Q60z3DorRheuE18AhkQkShA== X-Google-Smtp-Source: ABdhPJzQqqcHNKkLNiq+QHTNOQAjhnt7BUATOLJhivtj8XRz7DO7X6ixIJae+JIM1g8qdueVyZWT1g== X-Received: by 2002:a1c:2905:: with SMTP id p5mr2242342wmp.187.1604058474636; Fri, 30 Oct 2020 04:47:54 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:f693:9fff:fef4:a7ef]) by smtp.gmail.com with ESMTPSA id g8sm4434811wma.36.2020.10.30.04.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 04:47:53 -0700 (PDT) Date: Fri, 30 Oct 2020 11:47:50 +0000 From: Quentin Perret To: Lukasz Luba Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, vireshk@kernel.org, robh+dt@kernel.org, nm@ti.com, rafael@kernel.org, sboyd@kernel.org, daniel.lezcano@linaro.org, sudeep.holla@arm.com, Dietmar.Eggemann@arm.com Subject: Re: [PATCH 2/4] OPP: Add support for parsing the 'opp-sustainable' property Message-ID: <20201030114750.GA636720@google.com> References: <20201028140847.1018-1-lukasz.luba@arm.com> <20201028140847.1018-3-lukasz.luba@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201028140847.1018-3-lukasz.luba@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi Lukasz, On Wednesday 28 Oct 2020 at 14:08:45 (+0000), Lukasz Luba wrote: > +unsigned long dev_pm_opp_get_sustainable_opp_freq(struct device *dev) > +{ > + struct opp_table *opp_table; > + unsigned long freq = 0; > + > + opp_table = _find_opp_table(dev); > + if (IS_ERR(opp_table)) > + return 0; > + > + if (opp_table->sustainable_opp && opp_table->sustainable_opp->available) > + freq = dev_pm_opp_get_freq(opp_table->sustainable_opp); > + > + dev_pm_opp_put_opp_table(opp_table); > + > + return freq; > +} > +EXPORT_SYMBOL_GPL(dev_pm_opp_get_sustainable_opp_freq); I'm guessing this is what IPA will use to find out what the sustainable frequency is right? Is PM_OPP the right place for that? It feels odd IPA will get the EM from one place, which includes the performance state, and the sustained OPP from another. Should we move that to PM_EM instead? Thanks, Quentin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0977C4363A for ; Fri, 30 Oct 2020 11:48:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 793DC207DE for ; Fri, 30 Oct 2020 11:48:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fjn+s0AA"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="WAUf3+d2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 793DC207DE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7hZye/4Ht4Cyla41zIwDIxPfjyIIJQtl9nVEYfXnRa0=; b=fjn+s0AATWBwn3FwNxEur5GbK 4gJSxmLxJkTWlN6PYwQpUF2tN/ResFfhvNbjLwM81F+HOtEnhRrfxcfRfleAj9jN46ypR4+0utrMl ONLR0OPqp6P6Dv/qRK4UVgCgteWcxpc6e4WukM7Mr+nx+9VAr2VAn5UqzzAMO6colbmNnv6DFXP4p z8YgaYSVgcOR4vBzie4AUvzbuGJZzFof3NKgVGhh712j5qowxsnpes8BPm0sOwWgL0elRCUJ65uHr mhMq2tqBgCYW2Bpz7nB83jptNfO3juGgI3wyEoTm5+5Fa/jn5xSVE55cgBOcaAjTH+ugauNp8d2Qq M6eW70Mbw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYSt8-00063A-W6; Fri, 30 Oct 2020 11:48:11 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYSsv-0005yG-Pp for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 11:48:03 +0000 Received: by mail-wm1-x341.google.com with SMTP id p22so2570342wmg.3 for ; Fri, 30 Oct 2020 04:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/VyNGryLroT7qe3Pp9ybD5lnQfay5phLuhwNvbxhxYo=; b=WAUf3+d2JVTc2U3d/Gv0nJozocu951OOswUcD4xo4Epo9ZKRp2kywPmcI5+AU5Ugsz UBdOx//W7jjKZser0nHrjrHeBnt9qZTzPXTgOViuENyjBKVk+UCwFV57rong8tik9US7 0vdI2MSbFnECyd+W32GDQdbCNM11iHJ49aIL7Pp96UzJg+rlbr9sVViA8uDktOwXOBtP t6KE1+BfjVuNIPaaqymUGIbXvZiljCwXch95AOP8EgnaOYgWxtDwowi+CBmV9S6/jWhk BHliUO4ci5VZ6iOI1sdxImSGdGpY8Pj588LX7bsBsdAQGIRtl7CfWi7FfQNO6XdkXx5q spfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/VyNGryLroT7qe3Pp9ybD5lnQfay5phLuhwNvbxhxYo=; b=CcC+ltnlrF3jvsI3SyrFGX+4W+L/deaiEpIKT3sLZxRDPwO1glv+tRP/JOBsmIZ6Ew RkncDZlf8ZLqb1ZAs88vcsK/7+nw3csmy0gZcK13H94nLGCkN4INAaE+g4VbCTm9WZgg BjzjavczgtLbm2Ngdf9UNryDb1ne02CCWA3JiBHLDeHpI6B1dVWwcEKzjXzq2DYu5KYR xv9HAxTPiE7Hui+cicSyFuiEWFJtDCQpVOJORbAYDPBbvsXTRTlm2v0DM7KbP+Rg5KBG qrY5Y+qR4LW9gzNg7KpPlpd6PnoFstnDaPi359otbrDOfroMulQCtdr05KBTL2GfT3z4 jvvg== X-Gm-Message-State: AOAM532f+ZpGXfZ56Qw6vWQ+a2WTySg1AgT8Mou0GVrm7wG5PkvMHfdw 08PwOHTEEOq4nSjndvMx1vV/Mg== X-Google-Smtp-Source: ABdhPJzQqqcHNKkLNiq+QHTNOQAjhnt7BUATOLJhivtj8XRz7DO7X6ixIJae+JIM1g8qdueVyZWT1g== X-Received: by 2002:a1c:2905:: with SMTP id p5mr2242342wmp.187.1604058474636; Fri, 30 Oct 2020 04:47:54 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:f693:9fff:fef4:a7ef]) by smtp.gmail.com with ESMTPSA id g8sm4434811wma.36.2020.10.30.04.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 04:47:53 -0700 (PDT) Date: Fri, 30 Oct 2020 11:47:50 +0000 From: Quentin Perret To: Lukasz Luba Subject: Re: [PATCH 2/4] OPP: Add support for parsing the 'opp-sustainable' property Message-ID: <20201030114750.GA636720@google.com> References: <20201028140847.1018-1-lukasz.luba@arm.com> <20201028140847.1018-3-lukasz.luba@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201028140847.1018-3-lukasz.luba@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201030_074757_928623_9FA9100A X-CRM114-Status: GOOD ( 13.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nm@ti.com, devicetree@vger.kernel.org, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org, sboyd@kernel.org, vireshk@kernel.org, rafael@kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, sudeep.holla@arm.com, Dietmar.Eggemann@arm.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Lukasz, On Wednesday 28 Oct 2020 at 14:08:45 (+0000), Lukasz Luba wrote: > +unsigned long dev_pm_opp_get_sustainable_opp_freq(struct device *dev) > +{ > + struct opp_table *opp_table; > + unsigned long freq = 0; > + > + opp_table = _find_opp_table(dev); > + if (IS_ERR(opp_table)) > + return 0; > + > + if (opp_table->sustainable_opp && opp_table->sustainable_opp->available) > + freq = dev_pm_opp_get_freq(opp_table->sustainable_opp); > + > + dev_pm_opp_put_opp_table(opp_table); > + > + return freq; > +} > +EXPORT_SYMBOL_GPL(dev_pm_opp_get_sustainable_opp_freq); I'm guessing this is what IPA will use to find out what the sustainable frequency is right? Is PM_OPP the right place for that? It feels odd IPA will get the EM from one place, which includes the performance state, and the sustained OPP from another. Should we move that to PM_EM instead? Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel