lkml.org 
[lkml]   [2013]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 2/7] cpufreq: Add boost frequency support in core
On Wed, 26 Jun 2013 16:24:32 +0530, Viresh Kumar wrote:

> > +int cpufreq_boost_trigger_state(int state)
> > +{
> > + unsigned long flags;
> > + int ret = 0;
> > +
> > + if (boost_enabled != state) {
> > + write_lock_irqsave(&cpufreq_driver_lock, flags);
> > + boost_enabled = state;
> > + if (cpufreq_driver->enable_boost)
> > + ret = cpufreq_driver->enable_boost(state);
> > + else
> > + ret = cpufreq_boost_trigger_state_sw();

I will use only one call to cpufreq_driver->enable_boost(state) [*] with
either cpufreq_boost_enable_sw() (function with SW boost handling) or
the one provided by cpufreq driver.

Only when cpufreq driver doesn't provide [*], it will be filled with
"default" cpufreq_boost_enable_sw().

> > +
> > + if (ret) {
> > + boost_enabled = 0;
> > +
> > write_unlock_irqrestore(&cpufreq_driver_lock, flags);
> > + pr_err("%s: BOOST cannot enable (%d)\n",
> > + __func__, ret);
> > +
> > + return ret;
> > + }
> > + write_unlock_irqrestore(&cpufreq_driver_lock,
> > flags);


--
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group


\
 
 \ /
  Last update: 2013-06-27 18:21    [W:0.235 / U:7.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site