+59
−67
Loading
Currently the amd_get_{min, max, nominal, lowest_nonlinear}_freq()
helpers computes the values of min_freq, max_freq, nominal_freq and
lowest_nominal_freq respectively afresh from
cppc_get_perf_caps(). This is not necessary as there are fields in
cpudata to cache these values.
To simplify this, add a single helper function named
amd_pstate_init_freq() which computes all these frequencies at once, and
caches it in cpudata.
Use the cached values everywhere else in the code.
Acked-by:
Huang Rui <ray.huang@amd.com>
Reviewed-by:
Li Meng <li.meng@amd.com>
Tested-by:
Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
Co-developed-by:
Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by:
Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by:
Perry Yuan <perry.yuan@amd.com>
Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>