use 300Mhz for min freqency for temporary
authorKasin Lee <kasin.li@amlogic.com>
Mon, 16 Sep 2013 05:06:02 +0000 (13:06 +0800)
committerKasin Lee <kasin.li@amlogic.com>
Mon, 16 Sep 2013 05:06:02 +0000 (13:06 +0800)
mali/linux/mali_kernel_sysfs.c
mali/platform/meson8/mali_scaling.c
mali/platform/meson8/meson_main.c

index 5c6753d292aac057bb24b40d6196464df2c74b1e..75b552cd9739b9d4d2621f4cc6a812af60f4224b 100755 (executable)
@@ -53,7 +53,6 @@
 #define POWER_BUFFER_SIZE 3
 
 static struct dentry *mali_debugfs_dir = NULL;
-static struct dentry *mali_classfs_dir = NULL;
 
 typedef enum
 {
index 6f01c8e59e8c3331f5726bb57b0299ece6788d20..0bcfde344fe57e9e3a8a0bc748ade178a0c6a55e 100755 (executable)
@@ -151,11 +151,14 @@ void mali_pp_scaling_update(struct mali_gpu_utilization_data *data)
        }
        else if (mali_pp_scale_threshold[MALI_PP_THRESHOLD_40]< data->utilization_pp)
        {
+               #if 0
                currentStep = MALI_CLOCK_425;
                schedule_work(&wq_work);
+               #endif
        }
        else if (0 < data->utilization_pp)
        {
+               #if 0
                if (num_cores_enabled == 1) {
                        if ( mali_pp_scale_threshold[MALI_PP_THRESHOLD_30]< data->utilization_pp )
                                currentStep = MALI_CLOCK_318;
@@ -165,6 +168,9 @@ void mali_pp_scaling_update(struct mali_gpu_utilization_data *data)
                } else {
                        disable_one_core();
                }
+               #else 
+               disable_one_core();
+               #endif
        }
        else
        {
@@ -179,16 +185,19 @@ void mali_pp_fs_scaling_update(struct mali_gpu_utilization_data *data)
        u32 utilization = data->utilization_gpu;
 
        if (utilization > mali_dvfs_threshold[currentStep].upthreshold) {
+               #if 0
                if (utilization < mali_utilization_high && currentStep < MALI_CLOCK_INDX_MAX) 
                        currentStep ++;
                else
+               #endif
                        currentStep = MALI_CLOCK_637;
 
-               if (data->utilization_pp > MALI_PP_THRESHOLD_90) // 90%
+               if (data->utilization_pp > MALI_PP_THRESHOLD_90) // 90%
                        enable_max_num_cores();
-               else
+               } else {
                        enable_one_core();
-       } else if (utilization < mali_dvfs_threshold[currentStep].downthreshold && currentStep > 0) {
+               }
+       } else if (utilization < mali_dvfs_threshold[currentStep].downthreshold && currentStep > 1) {
                currentStep--;
                MALI_DEBUG_PRINT(2, ("Mali clock set %d..\n",currentStep));
        } else {
index 9ac55b7516eabc041c0f548e10850555887abb6c..2b91be947167098101a74e9abb37860e338728b6 100755 (executable)
@@ -35,7 +35,7 @@ enum mali_scale_mode_t {
        MALI_SCALING_MODE_MAX
 };
 
-static int  scaling_mode = MALI_PP_SCALING;
+static int  scaling_mode = MALI_PP_FS_SCALING;
 module_param(scaling_mode, int, 0664); 
 MODULE_PARM_DESC(scaling_mode, "0 disable, 1 pp, 2 fs, 4 double");
 static int last_scaling_mode;
@@ -115,7 +115,7 @@ static struct mali_gpu_device_data mali_gpu_data =
        .fb_start = 0x84000000,
 #endif
        .fb_size = 0x06000000,
-       .utilization_interval = 1000,
+       .utilization_interval = 500,
        .utilization_callback = mali_gpu_utilization_callback,
        .pmu_switch_delay = 0xFFFF, /* do not have to be this high on FPGA, but it is good for testing to have a delay */
 };