From: Kasin Lee Date: Mon, 16 Sep 2013 05:06:02 +0000 (+0800) Subject: use 300Mhz for min freqency for temporary X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4e2caca72c665cb2a886bd57cf44efee50fb518b;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_mali-driver.git use 300Mhz for min freqency for temporary --- diff --git a/mali/linux/mali_kernel_sysfs.c b/mali/linux/mali_kernel_sysfs.c index 5c6753d..75b552c 100755 --- a/mali/linux/mali_kernel_sysfs.c +++ b/mali/linux/mali_kernel_sysfs.c @@ -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 { diff --git a/mali/platform/meson8/mali_scaling.c b/mali/platform/meson8/mali_scaling.c index 6f01c8e..0bcfde3 100755 --- a/mali/platform/meson8/mali_scaling.c +++ b/mali/platform/meson8/mali_scaling.c @@ -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 { diff --git a/mali/platform/meson8/meson_main.c b/mali/platform/meson8/meson_main.c index 9ac55b7..2b91be9 100755 --- a/mali/platform/meson8/meson_main.c +++ b/mali/platform/meson8/meson_main.c @@ -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 */ };