PD #93541: Remove warning for unused function, disable mpgpu in m6tvd
authorKasin Lee <kasin.li@amlogic.com>
Fri, 5 Sep 2014 07:22:13 +0000 (15:22 +0800)
committerKasin Lee <kasin.li@amlogic.com>
Fri, 5 Sep 2014 07:35:06 +0000 (15:35 +0800)
Change-Id: Ie0771c9feed0bddec995493f1b3eefae8eab5d4f

mali/platform/meson_m450/platform_m8.c
mali/platform/meson_m450/platform_m8b.c
mali/platform/meson_m450/scaling.c
mali/platform/mpgpu.c

index f787f4e3b8922c44b76cdd5f35721f4ac29ed0cf..27be4cfa4c9296404fd24f7c48d17450e5ee96ed 100755 (executable)
@@ -64,7 +64,7 @@ static mali_dvfs_threshold_table mali_dvfs_table[]={
                { 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}
 };
 
index 181eb821f1e366c7d2ff8763bbe986bc4701d7d0..0e1b40d47446e2ea6d45ba3b48e8c81ef4d7cf02 100755 (executable)
@@ -64,7 +64,7 @@ static mali_dvfs_threshold_table mali_dvfs_table[]={
                { 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}
 };
 
index 4d64df4b37748a65ae472c7b4fa430735957f314..1c51b6e658aa370dbf4cd0a618f8237e3890a6e5 100755 (executable)
@@ -223,7 +223,7 @@ static void mali_decide_next_status(struct mali_gpu_utilization_data *data, int*
        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;
@@ -243,7 +243,7 @@ static void mali_decide_next_status(struct mali_gpu_utilization_data *data, int*
                        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;
@@ -253,6 +253,11 @@ static void mali_decide_next_status(struct mali_gpu_utilization_data *data, int*
                                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;
index 3f009a222934262490c06566d52925542c9c74c7..6420bbb5e5f6a4a830d13931c59d8f45bed45482 100755 (executable)
@@ -34,15 +34,11 @@ static ssize_t domain_stat_read(struct class *class,
                        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]. */
@@ -305,11 +301,7 @@ static ssize_t current_pp_write(struct class *class,
        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),
@@ -319,15 +311,16 @@ static struct class_attribute mali_class_attrs[] = {
        __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);
@@ -344,10 +337,15 @@ int mpgpu_class_init(void)
                }
        }
        return ret;
+#else
+        return 0;
+#endif
 }
 
 void  mpgpu_class_exit(void)
 {
+#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8
        class_unregister(&mpgpu_class);
+#endif
 }