• Viresh Kumar's avatar
    PM / Domains: Propagate performance state updates · 18edf49c
    Viresh Kumar authored
    Currently a genpd only handles the performance state requirements from
    the devices under its control. This commit extends that to also handle
    the performance state requirement(s) put on the master genpd by its
    sub-domains. There is a separate value required for each master that
    the genpd has and so a new field is added to the struct gpd_link
    (link->performance_state), which represents the link between a genpd and
    its master. The struct gpd_link also got another field
    prev_performance_state, which is used by genpd core as a temporary
    variable during transitions.
    
    On a call to dev_pm_genpd_set_performance_state(), the genpd core first
    updates the performance state of the masters of the device's genpd and
    then updates the performance state of the genpd. The masters do the same
    and propagate performance state updates to their masters before updating
    their own. The performance state transition from genpd to its master is
    done with the help of dev_pm_opp_xlate_performance_state(), which looks
    at the OPP tables of both the domains to translate the state.
    Tested-by: default avatarRajendra Nayak <rnayak@codeaurora.org>
    Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    18edf49c
domain.c 74.9 KB