* @file arm_core_scaling.c
* Example core scaling policy.
*/
-
- #include "mali_scaling.h"
-
+ #include <linux/workqueue.h>
#include <linux/mali/mali_utgard.h>
#include "mali_kernel_common.h"
- #include <linux/workqueue.h>
+ #include "mali_scaling.h"
+
#include "mali_clock.h"
static int num_cores_total;
FCLK_DEV4 | 0, /* 637.5 Mhz */
};
- mali_dvfs_threshold_table mali_dvfs_threshold[]={
- { 0 , 43 * 256 / 100 },
- { 40 * 256 / 100, 53 * 256 / 100 },
- { 50 * 256 / 100, 92 * 256 / 100 },
- { 87 * 256 / 100, 256 }
+ static mali_dvfs_threshold_table mali_dvfs_threshold[]={
+ { 0 , (43 * 256) / 100.0 + 0.5},
+ { (40 * 256) / 100.0 + 0.5, (53 * 256) / 100.0 + 0.5},
+ { (50 * 256) / 100.0 + 0.5, (92 * 256) / 100.0 + 0.5},
+ { (87 * 256) / 100.0 + 0.5, 256 }
+ };
+
+ enum mali_pp_scale_threshold_t {
+ MALI_PP_THRESHOLD_40,
+ MALI_PP_THRESHOLD_50,
+ MALI_PP_THRESHOLD_90,
+ MALI_PP_THRESHOLD_MAX,
};
+ static u32 mali_pp_scale_threshold [] = {
+ (40 * 256) / 100.0 + 0.5,
+ (50 * 256) / 100.0 + 0.5,
+ (90 * 256) / 100.0 + 0.5,
+ };
+
+ static int mali_utilization_low = (256 * 30) / 100.0 + 0.5;
+ static int mali_utilization_mid = (256 * 60) / 100.0 + 0.5;
+ static int mali_utilization_high = (256 * 80) / 100.0 + 0.5;
-
static void do_scaling(struct work_struct *work)
{
int err = mali_perf_set_num_pp_cores(num_cores_enabled);
*
* @param data Utilization data.
*/
- void mali_scaling_update(struct mali_gpu_utilization_data *data);
+
+ extern void mali_pp_fs_scaling_update(struct mali_gpu_utilization_data *data);
+ extern void mali_pp_scaling_update(struct mali_gpu_utilization_data *data);
+ extern void mali_fs_scaling_update(struct mali_gpu_utilization_data *data);
+ extern void reset_mali_scaling_stat(void);
#endif /* __ARM_CORE_SCALING_H__ */