static int mali_driver_runtime_suspend(struct device *dev) { mali_pm_runtime_suspend(); /* MALI_SEC */ mali_platform_power_mode_change(MALI_POWER_MODE_LIGHT_SLEEP); return 0; }
static void mali_bottom_half_pm ( struct work_struct *work ) { _mali_osk_lock_wait(pm_lock, _MALI_OSK_LOCKMODE_RW); if((_mali_osk_atomic_read(&mali_pm_ref_count) == 0) && (_mali_osk_atomic_read(&mali_suspend_called) == 0)) { mali_pm_runtime_suspend(); _mali_osk_atomic_inc(&mali_suspend_called); mali_platform_power_mode_change(MALI_POWER_MODE_DEEP_SLEEP); } _mali_osk_lock_signal(pm_lock, _MALI_OSK_LOCKMODE_RW); }
static void MTK_mali_bottom_half_pm_suspend ( struct work_struct *work ) { _mali_osk_mutex_wait(mtk_pm_lock); if((_mali_osk_atomic_read(&mtk_mali_pm_ref_count) == 0) && (_mali_osk_atomic_read(&mtk_mali_suspend_called) == 0)) { if (MALI_TRUE == mali_pm_runtime_suspend()) { _mali_osk_atomic_inc(&mtk_mali_suspend_called); mali_platform_power_mode_change(MALI_POWER_MODE_DEEP_SLEEP); } } _mali_osk_mutex_signal(mtk_pm_lock); }
static int mali_driver_runtime_suspend(struct device *dev) { mali_pm_runtime_suspend(); return 0; }
static int mali_runtime_suspend(struct device *dev) { MALI_DEBUG_PRINT(3, ("mali_runtime_suspend() called\n")); mali_pm_runtime_suspend(); return 0; /* all ok */ }