From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Renninger Subject: Re: [PATCH] input: CPU frequency booster Date: Fri, 20 Jan 2012 11:50:22 +0100 Message-ID: <201201201150.22950.trenn@suse.de> References: <1326977615-4387-1-git-send-email-amiettinen@nvidia.com> <201201192353.00761.trenn@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8117163493339656993==" Return-path: In-Reply-To: <201201192353.00761.trenn@suse.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Antti P Miettinen Cc: khilman@ti.com, len.brown@intel.com, markgross@thegnar.org, cpufreq@vger.kernel.org, linux-pm@lists.linux-foundation.org, j-pihet@ti.com --===============8117163493339656993== Content-Type: multipart/alternative; boundary="Boundary-01=_ubUGPlCcng4/lvC" Content-Transfer-Encoding: 7bit --Boundary-01=_ubUGPlCcng4/lvC Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit On Thursday, January 19, 2012 11:52:59 PM Thomas Renninger wrote: > Hi, > ... I forgot to activate the newly set limits: > +/* sysfs stuff **************************/ > + > + > +static void cfb_boost(struct work_struct *w) > +{ > + struct cpufreq_policy policy; > + int ret; > + > + cancel_delayed_work_sync(&unboost); > + ret = cpufreq_get_policy(&policy, 0); > + if (ret) > + return; > + cpufreq_verify_within_limits(&policy, boost_freq, > + policy.cpuinfo.max_freq); cpufreq_update_policy(0); > + queue_delayed_work(cfb_wq, &unboost, > + msecs_to_jiffies(boost_time)); > +} > + > +static void cfb_unboost(struct work_struct *w) > +{ > + struct cpufreq_policy policy; > + int ret; > + > + ret = cpufreq_get_policy(&policy, 0); > + if (ret) > + return; > + > + cpufreq_verify_within_limits(&policy, policy.cpuinfo.min_freq, > + policy.cpuinfo.max_freq); cpufreq_update_policy(0); Hope it works now? Thomas --Boundary-01=_ubUGPlCcng4/lvC Content-Type: text/html; charset="iso-8859-6" Content-Transfer-Encoding: 7bit

On Thursday, January 19, 2012 11:52:59 PM Thomas Renninger wrote:

> Hi,

>

...

I forgot to activate the newly set limits:


> +/* sysfs stuff **************************/

> +

> +

> +static void cfb_boost(struct work_struct *w)

> +{

> + struct cpufreq_policy policy;

> + int ret;

> +

> + cancel_delayed_work_sync(&unboost);

> + ret = cpufreq_get_policy(&policy, 0);

> + if (ret)

> + return;

> + cpufreq_verify_within_limits(&policy, boost_freq,

> + policy.cpuinfo.max_freq);

cpufreq_update_policy(0);

> + queue_delayed_work(cfb_wq, &unboost,

> + msecs_to_jiffies(boost_time));

> +}

> +

> +static void cfb_unboost(struct work_struct *w)

> +{

> + struct cpufreq_policy policy;

> + int ret;

> +

> + ret = cpufreq_get_policy(&policy, 0);

> + if (ret)

> + return;

> +

> + cpufreq_verify_within_limits(&policy, policy.cpuinfo.min_freq,

> + policy.cpuinfo.max_freq);

cpufreq_update_policy(0);


Hope it works now?


Thomas

--Boundary-01=_ubUGPlCcng4/lvC-- --===============8117163493339656993== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8117163493339656993==--