The current maximum frequency is used for saving initial data of
frequency. However, it is affected by other factor such as thermal
throttling, thus the initial value can be lower than expected.
To prevent this problem, the available maximum frequency will be
used to get initial frequency data.
Change-Id: If8d65da8896a547d66abc0c2e053585468d3c346
Reported-by: Wook Song <wook16.song@samsung.com>
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
initdata->dvfs.governor = NULL;
initdata->dvfs.min_freq = pass_get_min_freq(res);
- initdata->dvfs.max_freq = pass_get_max_freq(res);
+
+ /*
+ * Since the current maximum frequency can be affected by other
+ * factor such as thermal throttling, it can be restored lower
+ * value than we expected if we save it as initial value. Thus,
+ * in order to restore default maximum frequency we save available
+ * maximum frequency instead of current maximum frequency.
+ */
+ initdata->dvfs.max_freq = pass_get_available_max_freq(res);
+
initdata->dvfs.up_threshold = pass_get_up_threshold(res);
return 0;