Revert "MALI: midgard: RK: not to power off all the pm cores"
authorchenzhen <chenzhen@rock-chips.com>
Tue, 1 Nov 2016 08:33:09 +0000 (16:33 +0800)
committerchenzhen <chenzhen@rock-chips.com>
Mon, 14 Nov 2016 03:21:59 +0000 (11:21 +0800)
This reverts commit 47a9fbf6c4de1dddaf82ed9159307f8ba039f85c.

Change-Id: I4cfc36a5dab7e6cb4a766995d456301c54728498
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_driver.c

index 03ba23d54365113ac26bc85ea17c5701fe31ea4a..046ebcb7b50849a592e3c075604df9e85c23d3ee 100644 (file)
@@ -21,9 +21,6 @@
  * Base kernel Power Management hardware control
  */
 
  * Base kernel Power Management hardware control
  */
 
-// #define ENABLE_DEBUG_LOG
-#include "../../platform/rk/custom_log.h"
-
 #include <mali_kbase.h>
 #include <mali_kbase_config_defaults.h>
 #include <mali_midg_regmap.h>
 #include <mali_kbase.h>
 #include <mali_kbase_config_defaults.h>
 #include <mali_midg_regmap.h>
@@ -74,26 +71,6 @@ enum kbasep_pm_action {
        ACTION_PWRACTIVE = (SHADER_PWRACTIVE_LO - SHADER_PRESENT_LO)
 };
 
        ACTION_PWRACTIVE = (SHADER_PWRACTIVE_LO - SHADER_PRESENT_LO)
 };
 
-/*---------------------------------------------------------------------------*/
-
-static bool is_action_of_powering_off_l2(enum kbase_pm_core_type core_type,
-                                        enum kbasep_pm_action active)
-{
-       return (KBASE_PM_CORE_L2 == core_type) && (ACTION_PWROFF  == active);
-}
-
-static bool is_action_of_powering_off_shader(enum kbase_pm_core_type core_type,
-                                            enum kbasep_pm_action active)
-{
-       return (KBASE_PM_CORE_SHADER == core_type) && (ACTION_PWROFF  == active);
-}
-
-static bool is_action_of_powering_off_tiler(enum kbase_pm_core_type core_type,
-                                           enum kbasep_pm_action active)
-{
-       return (KBASE_PM_CORE_TILER == core_type) && (ACTION_PWROFF  == active);
-}
-
 static u64 kbase_pm_get_state(
                struct kbase_device *kbdev,
                enum kbase_pm_core_type core_type,
 static u64 kbase_pm_get_state(
                struct kbase_device *kbdev,
                enum kbase_pm_core_type core_type,
@@ -176,25 +153,6 @@ static void kbase_pm_invoke(struct kbase_device *kbdev,
 
        lockdep_assert_held(&kbdev->pm.power_change_lock);
 
 
        lockdep_assert_held(&kbdev->pm.power_change_lock);
 
-       /*-------------------------------------------------------*/
-
-       if ( is_action_of_powering_off_l2(core_type, action) ) {
-               D("not to power off l2 actually.");
-               return;
-       }
-       if ( is_action_of_powering_off_shader(core_type, action) ) {
-               D("not to power off shader actually. cores_lo : 0x%x, hi : 0x%x.",
-                 lo,
-                 hi);
-               return;
-       }
-       if ( is_action_of_powering_off_tiler(core_type, action) ) {
-               D("not to power off tiler actually.");
-               return;
-       }
-
-       /*-------------------------------------------------------*/
-
        reg = core_type_to_reg(core_type, action);
 
        KBASE_DEBUG_ASSERT(reg);
        reg = core_type_to_reg(core_type, action);
 
        KBASE_DEBUG_ASSERT(reg);