Re: [PATCH v6 3/3] OPP: Add helper function for bandwidth OPP tables
From: Saravana Kannan <hidden>
Date: 2020-01-09 03:37:32
Also in:
linux-pm, lkml
On Wed, Jan 8, 2020 at 4:58 PM Saravana Kannan [off-list ref] wrote:
On Wed, Jan 8, 2020 at 3:19 AM Viresh Kumar [off-list ref] wrote:quoted
On 06-12-19, 16:24, Saravana Kannan wrote:quoted
The frequency OPP tables have helper functions to search for entries in the table based on frequency and get the frequency values for a given (or suspend) OPP entry. Add similar helper functions for bandwidth OPP tables to search for entries in the table based on peak bandwidth and to get the peak and average bandwidth for a given (or suspend) OPP entry. Signed-off-by: Saravana Kannan <redacted> --- drivers/opp/core.c | 301 +++++++++++++++++++++++++++++++++++------ include/linux/pm_opp.h | 43 ++++++ 2 files changed, 305 insertions(+), 39 deletions(-)diff --git a/drivers/opp/core.c b/drivers/opp/core.c index c79bbfac7289..3ff33a08198e 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c@@ -127,6 +127,29 @@ unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp) } EXPORT_SYMBOL_GPL(dev_pm_opp_get_freq); +/** + * dev_pm_opp_get_bw() - Gets the bandwidth corresponding to an available opp + * @opp: opp for which peak bandwidth has to be returned fors/peak //Ack
Actually, isn't this correct as is? peak bandwidth is "returned". Average bandwidth is updated through the pointer. -Saravana