rk3288 gpu : dvfs level max 500MHz
authorxxm <xxm@rock-chips.com>
Thu, 3 Apr 2014 06:48:34 +0000 (14:48 +0800)
committerCody Xie <Cody.Xie@rock-chips.com>
Thu, 3 Apr 2014 06:49:18 +0000 (14:49 +0800)
drivers/gpu/arm/t6xx/kbase/src/platform/rk/mali_kbase_config_rk.c
drivers/gpu/arm/t6xx/kbase/src/platform/rk/mali_kbase_dvfs.c
drivers/gpu/arm/t6xx/kbase/src/platform/rk/mali_kbase_dvfs.h
drivers/gpu/arm/t6xx/kbase/src/platform/rk/mali_kbase_platform.c

index d3b8875e29385ca6be33416016ebccbd6eb3e907..bd7a913ebc1017270d0f66254578d0d9846c1a73 100755 (executable)
@@ -43,7 +43,7 @@ int get_cpu_clock_speed(u32 *cpu_clock);
 #define KBASE_VE_MEMORY_PER_PROCESS_LIMIT       (512 * 1024 * 1024UL)  /* 512MB */
 #define KBASE_VE_MEMORY_OS_SHARED_MAX           (2048 * 1024 * 1024UL) /* 768MB */
 #define KBASE_VE_MEMORY_OS_SHARED_PERF_GPU      KBASE_MEM_PERF_FAST/*KBASE_MEM_PERF_SLOW*/
-#define KBASE_VE_GPU_FREQ_KHZ_MAX               600000
+#define KBASE_VE_GPU_FREQ_KHZ_MAX               500000
 #define KBASE_VE_GPU_FREQ_KHZ_MIN               100000
 #ifdef CONFIG_UMP
 #define KBASE_VE_UMP_DEVICE                     UMP_DEVICE_Z_SHIFT
index e80c99a49c0edbfd94a4e7ebada8919cc1a5a9cb..b395b3ac199134759675c885a551ad5e3467d003 100755 (executable)
@@ -60,7 +60,7 @@ static mali_dvfs_info mali_dvfs_infotbl[] = {
       {1025000, 266, 60, 78, 0},
       {1075000, 350, 65, 75, 0},
       {1125000, 400, 70, 75, 0},
-      {1200000, 600, 90, 100, 0},
+      {1200000, 500, 90, 100, 0},
 };
 
 #define MALI_DVFS_STEP ARRAY_SIZE(mali_dvfs_infotbl)
@@ -409,8 +409,8 @@ void kbase_platform_dvfs_set_clock(kbase_device *kbdev, int freq)
                return;
        }
        switch (freq) {
-               case 600:
-                       aclk_400_rate = 600000000;
+               case 500:
+                       aclk_400_rate = 500000000;
                        break;
                case 400:
                        aclk_400_rate = 400000000;
index 9a09d71ea77438f9eb6ae5597bf618f2064bcd77..64d9dac45611dbe66d25f11280192793f93ae374 100755 (executable)
@@ -22,7 +22,7 @@
 #define MALI_DVFS_TIME_INTERVAL 2
 
 #define MALI_DVFS_CURRENT_FREQ 0
-#define MALI_DVFS_BL_CONFIG_FREQ 600
+#define MALI_DVFS_BL_CONFIG_FREQ 500
 #define MALI_DVFS_START_FREQ 400
 
 #ifdef CONFIG_MALI_T6XX_DVFS
index 0763b22b21b961ae6cc2fc8db8d1b924a9af2fa2..157e210a7e41616ae93768096ded1c4a34612037 100755 (executable)
@@ -284,7 +284,7 @@ static ssize_t show_clock(struct device *dev, struct device_attribute *attr, cha
        ret += snprintf(buf + ret, PAGE_SIZE - ret, "Current clk mali = %dMhz", clkrate / 1000000);
 
        /* To be revised  */
-       ret += snprintf(buf + ret, PAGE_SIZE - ret, "\nPossible settings : 600, 400, 350, 266, 160, 100Mhz");
+       ret += snprintf(buf + ret, PAGE_SIZE - ret, "\nPossible settings : 500, 400, 350, 266, 160, 100Mhz");
 
        if (ret < PAGE_SIZE - 1)
                ret += snprintf(buf + ret, PAGE_SIZE - ret, "\n");
@@ -314,8 +314,8 @@ static ssize_t set_clock(struct device *dev, struct device_attribute *attr, cons
        if (!platform->mali_clk_node)
                return -ENODEV;
 
-       if (sysfs_streq("600", buf)) {
-               freq = 600;
+       if (sysfs_streq("500", buf)) {
+               freq = 500;
        } else if (sysfs_streq("400", buf)) {
                freq = 400;
        } else if (sysfs_streq("350", buf)) {
@@ -647,7 +647,7 @@ static ssize_t show_upper_lock_dvfs(struct device *dev, struct device_attribute
                ret += snprintf(buf + ret, PAGE_SIZE - ret, "Current Upper Lock Level = %dMhz", locked_level);
        else
                ret += snprintf(buf + ret, PAGE_SIZE - ret, "Unset the Upper Lock Level");
-       ret += snprintf(buf + ret, PAGE_SIZE - ret, "\nPossible settings : 400, 350,266, 160, 100, If you want to unlock : 600 or off");
+       ret += snprintf(buf + ret, PAGE_SIZE - ret, "\nPossible settings : 400, 350,266, 160, 100, If you want to unlock : 500 or off");
 
 #else
        ret += snprintf(buf + ret, PAGE_SIZE - ret, "mali DVFS is disabled. You can not set");
@@ -675,7 +675,7 @@ static ssize_t set_upper_lock_dvfs(struct device *dev, struct device_attribute *
 #ifdef CONFIG_MALI_T6XX_DVFS
        if (sysfs_streq("off", buf)) {
                mali_dvfs_freq_unlock();
-       } else if (sysfs_streq("600", buf)) {
+       } else if (sysfs_streq("500", buf)) {
                mali_dvfs_freq_unlock();
        } else if (sysfs_streq("400", buf)) {
                mali_dvfs_freq_lock(4);
@@ -689,7 +689,7 @@ static ssize_t set_upper_lock_dvfs(struct device *dev, struct device_attribute *
                mali_dvfs_freq_lock(0);
        } else {
                dev_err(dev, "set_clock: invalid value\n");
-               dev_err(dev, "Possible settings :  400, 350,266, 160, 100, If you want to unlock : 600\n");
+               dev_err(dev, "Possible settings :  400, 350,266, 160, 100, If you want to unlock : 500\n");
                return -ENOENT;
        }
 #else                          /* CONFIG_MALI_T6XX_DVFS */
@@ -718,7 +718,7 @@ static ssize_t show_under_lock_dvfs(struct device *dev, struct device_attribute
                ret += snprintf(buf + ret, PAGE_SIZE - ret, "Current Under Lock Level = %dMhz", locked_level);
        else
                ret += snprintf(buf + ret, PAGE_SIZE - ret, "Unset the Under Lock Level");
-       ret += snprintf(buf + ret, PAGE_SIZE - ret, "\nPossible settings : 600, 400, 350,266, 160, If you want to unlock : 100 or off");
+       ret += snprintf(buf + ret, PAGE_SIZE - ret, "\nPossible settings : 500, 400, 350,266, 160, If you want to unlock : 100 or off");
 
 #else
        ret += snprintf(buf + ret, PAGE_SIZE - ret, "mali DVFS is disabled. You can not set");
@@ -746,7 +746,7 @@ static ssize_t set_under_lock_dvfs(struct device *dev, struct device_attribute *
 #ifdef CONFIG_MALI_T6XX_DVFS
        if (sysfs_streq("off", buf)) {
                mali_dvfs_freq_under_unlock();
-       } else if (sysfs_streq("600", buf)) {
+       } else if (sysfs_streq("500", buf)) {
                mali_dvfs_freq_under_lock(5);
        } else if (sysfs_streq("400", buf)) {
                mali_dvfs_freq_under_lock(4);
@@ -760,7 +760,7 @@ static ssize_t set_under_lock_dvfs(struct device *dev, struct device_attribute *
                mali_dvfs_freq_under_unlock();
        } else {
                dev_err(dev, "set_clock: invalid value\n");
-               dev_err(dev, "Possible settings : 533, 450, 400, 266, 160, If you want to unlock : 100 or off\n");
+               dev_err(dev, "Possible settings : 500, 400,350,266, 160, If you want to unlock : 100 or off\n");
                return -ENOENT;
        }
 #else