PD#125292 gpu:dont set gp pll twice
authorJiyu Yang <jiyu.yang@amlogic.com>
Tue, 17 May 2016 07:22:03 +0000 (15:22 +0800)
committerJiyu Yang <jiyu.yang@amlogic.com>
Tue, 17 May 2016 07:38:22 +0000 (15:38 +0800)
Change-Id: I4ac6a6f15b7f19f5dc4d7f9565754f53d641d58b

mali/platform/meson_bu/scaling.c
t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/scaling.c

index 54a6d66254bf4a9cd8ef3e444f34138e4f3e86d7..8f323e079734ebf029221f6c61d4dae1eb3421f9 100644 (file)
@@ -57,6 +57,12 @@ static inline void mali_clk_exected(void)
        uint32_t execStep = currentStep;
        mali_dvfs_threshold_table *dvfs_tbl = &pmali_plat->dvfs_table[currentStep];
 
+       //if (pdvfs[currentStep].freq_index == pdvfs[lastStep].freq_index) return;
+       if ((pdvfs[execStep].freq_index == pdvfs[lastStep].freq_index) ||
+               (pdvfs[execStep].clk_freq == pdvfs[lastStep].clk_freq)){
+               return;
+       }
+
        if (0 == strcmp(dvfs_tbl->clk_parent, "gp0_pll")) {
                gp_pll_request(gp_pll_user_gpu);
                if (!is_gp_pll_get) {
@@ -70,11 +76,6 @@ static inline void mali_clk_exected(void)
                gp_pll_release(gp_pll_user_gpu);
        }
 
-       //if (pdvfs[currentStep].freq_index == pdvfs[lastStep].freq_index) return;
-       if (pdvfs[execStep].freq_index == pdvfs[lastStep].freq_index) {
-               return;
-       }
-
        //mali_dev_pause();
        mali_clock_set(pdvfs[execStep].freq_index);
        //mali_dev_resume();
index c41d461ee4b7671343bc0f571a3b71987a850195..16fe365e91ca52389fdac716f2a70509c750d6b4 100644 (file)
@@ -55,6 +55,12 @@ static inline void mali_clk_exected(void)
        uint32_t execStep = currentStep;
        mali_dvfs_threshold_table *dvfs_tbl = &pmali_plat->dvfs_table[currentStep];
 
+       //if (pdvfs[currentStep].freq_index == pdvfs[lastStep].freq_index) return;
+       if ((pdvfs[execStep].freq_index == pdvfs[lastStep].freq_index) ||
+               (pdvfs[execStep].clk_freq == pdvfs[lastStep].clk_freq)){
+               return;
+       }
+
        if (0 == strcmp(dvfs_tbl->clk_parent, "gp0_pll")) {
                gp_pll_request(gp_pll_user_gpu);
                if (!is_gp_pll_get) {
@@ -68,11 +74,6 @@ static inline void mali_clk_exected(void)
                gp_pll_release(gp_pll_user_gpu);
        }
 
-       //if (pdvfs[currentStep].freq_index == pdvfs[lastStep].freq_index) return;
-       if (pdvfs[execStep].freq_index == pdvfs[lastStep].freq_index) {
-               return;
-       }
-
        //mali_dev_pause();
        mali_clock_set(pdvfs[execStep].freq_index);
        //mali_dev_resume();