lkml.org 
[lkml]   [2014]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH V5 1/2] cpufreq: add support for intermediate (stable) frequencies
    From
    Viresh,

    On Mon, Jun 2, 2014 at 10:19 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
    > Douglas Anderson, recently pointed out an interesting problem due to which
    > udelay() was expiring earlier than it should.
    >
    > While transitioning between frequencies few platforms may temporarily switch to
    > a stable frequency, waiting for the main PLL to stabilize.
    >
    > For example: When we transition between very low frequencies on exynos, like
    > between 200MHz and 300MHz, we may temporarily switch to a PLL running at 800MHz.
    > No CPUFREQ notification is sent for that. That means there's a period of time
    > when we're running at 800MHz but loops_per_jiffy is calibrated at between 200MHz
    > and 300MHz. And so udelay behaves badly.
    >
    > To get this fixed in a generic way, lets introduce another set of callbacks
    > get_intermediate() and target_intermediate(), only for drivers with
    > target_index() and CPUFREQ_ASYNC_NOTIFICATION unset.
    >
    > get_intermediate() should return a stable intermediate frequency platform wants
    > to switch to, and target_intermediate() should set CPU to to that frequency,
    > before jumping to the frequency corresponding to 'index'. Core will take care of
    > sending notifications and driver doesn't have to handle them in
    > target_intermediate() or target_index().
    >
    > NOTE: ->target_index() should restore to policy->restore_freq in case of
    > failures as core would send notifications for that.
    >
    > Tested-by: Stephen Warren <swarren@nvidia.com>
    > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
    > ---
    > Documentation/cpu-freq/cpu-drivers.txt | 29 ++++++++++++++-
    > drivers/cpufreq/cpufreq.c | 67 ++++++++++++++++++++++++++++++----
    > include/linux/cpufreq.h | 25 +++++++++++++
    > 3 files changed, 112 insertions(+), 9 deletions(-)

    LGTM. Thanks for doing this! :)

    Reviewed-by: Doug Anderson <dianders@chromium.org>


    \
     
     \ /
      Last update: 2014-06-05 22:21    [W:3.301 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site