{ 1, 1, 3, 108, 205}, /* for 318.7 */
{ 2, 2, 3, 150, 215}, /* for 425.0 */
{ 3, 3, 3, 170, 253}, /* for 510.0 */
- { 4, 4, 3, 230, 256}, /* for 637.5 */
+ { 4, 4, 3, 230, 255}, /* for 637.5 */
{ 0, 0, 3, 0, 0}
};
{ 1, 1, 5, 152, 205}, /* for 364 */
{ 2, 2, 5, 180, 212}, /* for 425 */
{ 3, 3, 5, 205, 236}, /* for 510 */
- { 4, 4, 5, 230, 256}, /* for 637 */
+ { 4, 4, 5, 230, 255}, /* for 637 */
{ 0, 0, 5, 0, 0}
};
u32 utilization, mali_up_limit, decided_fs_idx;
u32 ld_left, ld_right;
u32 ld_up, ld_down;
- char change_mode;
+ u32 change_mode;
*pp_change_flag = 0;
change_mode = 0;
else
decided_fs_idx++;
}
- if ((data->utilization_pp > ld_up) &&
+ if ((data->utilization_pp >= ld_up) &&
(num_cores_enabled < pmali_plat->scale_info.maxpp)) {
if ((num_cores_enabled < pmali_plat->sc_mpp) && (data->utilization_pp >= pmali_plat->bst_pp)) {
*pp_change_flag = 1;
change_mode = 1;
}
}
+#if LOG_MALI_SCALING
+ printk("[nexting..] [LD:%d]-> FS[CRNT:%d LMT:%d NEXT:%d] PP[NUM:%d LMT:%d MD:%d][F:%d]\n",
+ data->utilization_pp, currentStep, mali_up_limit, decided_fs_idx,
+ num_cores_enabled, pmali_plat->scale_info.maxpp, *pp_change_flag, change_mode);
+#endif
} else if (utilization <= ld_down) { /* go down */
if (mali_stay_count > 0) {
*next_fs_idx = decided_fs_idx;
struct class_attribute *attr, char *buf)
{
unsigned int val;
-#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8
+
val = readl((u32 *)(IO_AOBUS_BASE + 0xf0)) & 0xff;
-#else
- val = 0xffffffff;
-#endif
return sprintf(buf, "%x\n", val>>4);
}
-#endif
-#if MESON_CPU_TYPE > MESON_CPU_TYPE_MESON6TVD
+
#define PREHEAT_CMD "preheat"
#define PLL2_CMD "mpl2" /* mpl2 [11] or [0xxxxxxx] */
#define SCMPP_CMD "scmpp" /* scmpp [number of pp your want in most of time]. */
return count;
}
-#endif
-
-
static struct class_attribute mali_class_attrs[] = {
-#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON6TVD
__ATTR(domain_stat, 0644, domain_stat_read, NULL),
__ATTR(mpgpucmd, 0644, NULL, mpgpu_write),
__ATTR(scale_mode, 0644, scale_mode_read, scale_mode_write),
__ATTR(max_pp, 0644, max_pp_read, max_pp_write),
__ATTR(cur_freq, 0644, freq_read, freq_write),
__ATTR(cur_pp, 0644, current_pp_read, current_pp_write),
-#endif
};
static struct class mpgpu_class = {
.name = "mpgpu",
};
+#endif
int mpgpu_class_init(void)
{
+#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8
int ret = 0;
int i;
int attr_num = ARRAY_SIZE(mali_class_attrs);
}
}
return ret;
+#else
+ return 0;
+#endif
}
void mpgpu_class_exit(void)
{
+#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8
class_unregister(&mpgpu_class);
+#endif
}