Loading drivers/media/platform/msm/sde/rotator/sde_rotator_core.c +26 −2 Original line number Diff line number Diff line Loading @@ -3331,6 +3331,7 @@ int sde_rotator_runtime_idle(struct device *dev) int sde_rotator_pm_suspend(struct device *dev) { struct sde_rot_mgr *mgr; int i; mgr = sde_rot_mgr_from_device(dev); Loading @@ -3345,8 +3346,20 @@ int sde_rotator_pm_suspend(struct device *dev) sde_rotator_suspend_cancel_rot_work(mgr); mgr->minimum_bw_vote = 0; sde_rotator_update_perf(mgr); mgr->pm_rot_enable_clk_cnt = mgr->rot_enable_clk_cnt; if (mgr->pm_rot_enable_clk_cnt) { for (i = 0; i < mgr->pm_rot_enable_clk_cnt; i++) sde_rotator_clk_ctrl(mgr, false); sde_rotator_update_clk(mgr); } ATRACE_END("pm_active"); SDEROT_DBG("end pm active %d\n", atomic_read(&mgr->device_suspended)); SDEROT_DBG("end pm active %d clk_cnt %d\n", atomic_read(&mgr->device_suspended), mgr->pm_rot_enable_clk_cnt); SDEROT_EVTLOG(mgr->pm_rot_enable_clk_cnt, atomic_read(&mgr->device_suspended)); sde_rot_mgr_unlock(mgr); return 0; } Loading @@ -3358,6 +3371,7 @@ int sde_rotator_pm_suspend(struct device *dev) int sde_rotator_pm_resume(struct device *dev) { struct sde_rot_mgr *mgr; int i; mgr = sde_rot_mgr_from_device(dev); Loading @@ -3377,10 +3391,20 @@ int sde_rotator_pm_resume(struct device *dev) pm_runtime_enable(dev); sde_rot_mgr_lock(mgr); SDEROT_DBG("begin pm active %d\n", atomic_read(&mgr->device_suspended)); SDEROT_DBG("begin pm active %d clk_cnt %d\n", atomic_read(&mgr->device_suspended), mgr->pm_rot_enable_clk_cnt); ATRACE_BEGIN("pm_active"); SDEROT_EVTLOG(mgr->pm_rot_enable_clk_cnt, atomic_read(&mgr->device_suspended)); atomic_dec(&mgr->device_suspended); sde_rotator_update_perf(mgr); if (mgr->pm_rot_enable_clk_cnt) { sde_rotator_update_clk(mgr); for (i = 0; i < mgr->pm_rot_enable_clk_cnt; i++) sde_rotator_clk_ctrl(mgr, true); } sde_rot_mgr_unlock(mgr); return 0; } Loading drivers/media/platform/msm/sde/rotator/sde_rotator_core.h +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -393,6 +393,7 @@ struct sde_rot_bus_data_type { * @regulator_enable: true if foot switch is enabled; false otherwise * @res_ref_cnt: reference count of how many times resource is requested * @rot_enable_clk_cnt: reference count of how many times clock is requested * @pm_rot_enable_clk_cnt : tracks the clock enable count on pm suspend * @rot_clk: array of rotator and periphery clocks * @num_rot_clk: size of the rotator clock array * @rdot_limit: current read OT limit Loading Loading @@ -439,6 +440,7 @@ struct sde_rot_mgr { int res_ref_cnt; int rot_enable_clk_cnt; int pm_rot_enable_clk_cnt; struct sde_rot_clk *rot_clk; int num_rot_clk; u32 rdot_limit; Loading Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_core.c +26 −2 Original line number Diff line number Diff line Loading @@ -3331,6 +3331,7 @@ int sde_rotator_runtime_idle(struct device *dev) int sde_rotator_pm_suspend(struct device *dev) { struct sde_rot_mgr *mgr; int i; mgr = sde_rot_mgr_from_device(dev); Loading @@ -3345,8 +3346,20 @@ int sde_rotator_pm_suspend(struct device *dev) sde_rotator_suspend_cancel_rot_work(mgr); mgr->minimum_bw_vote = 0; sde_rotator_update_perf(mgr); mgr->pm_rot_enable_clk_cnt = mgr->rot_enable_clk_cnt; if (mgr->pm_rot_enable_clk_cnt) { for (i = 0; i < mgr->pm_rot_enable_clk_cnt; i++) sde_rotator_clk_ctrl(mgr, false); sde_rotator_update_clk(mgr); } ATRACE_END("pm_active"); SDEROT_DBG("end pm active %d\n", atomic_read(&mgr->device_suspended)); SDEROT_DBG("end pm active %d clk_cnt %d\n", atomic_read(&mgr->device_suspended), mgr->pm_rot_enable_clk_cnt); SDEROT_EVTLOG(mgr->pm_rot_enable_clk_cnt, atomic_read(&mgr->device_suspended)); sde_rot_mgr_unlock(mgr); return 0; } Loading @@ -3358,6 +3371,7 @@ int sde_rotator_pm_suspend(struct device *dev) int sde_rotator_pm_resume(struct device *dev) { struct sde_rot_mgr *mgr; int i; mgr = sde_rot_mgr_from_device(dev); Loading @@ -3377,10 +3391,20 @@ int sde_rotator_pm_resume(struct device *dev) pm_runtime_enable(dev); sde_rot_mgr_lock(mgr); SDEROT_DBG("begin pm active %d\n", atomic_read(&mgr->device_suspended)); SDEROT_DBG("begin pm active %d clk_cnt %d\n", atomic_read(&mgr->device_suspended), mgr->pm_rot_enable_clk_cnt); ATRACE_BEGIN("pm_active"); SDEROT_EVTLOG(mgr->pm_rot_enable_clk_cnt, atomic_read(&mgr->device_suspended)); atomic_dec(&mgr->device_suspended); sde_rotator_update_perf(mgr); if (mgr->pm_rot_enable_clk_cnt) { sde_rotator_update_clk(mgr); for (i = 0; i < mgr->pm_rot_enable_clk_cnt; i++) sde_rotator_clk_ctrl(mgr, true); } sde_rot_mgr_unlock(mgr); return 0; } Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_core.h +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -393,6 +393,7 @@ struct sde_rot_bus_data_type { * @regulator_enable: true if foot switch is enabled; false otherwise * @res_ref_cnt: reference count of how many times resource is requested * @rot_enable_clk_cnt: reference count of how many times clock is requested * @pm_rot_enable_clk_cnt : tracks the clock enable count on pm suspend * @rot_clk: array of rotator and periphery clocks * @num_rot_clk: size of the rotator clock array * @rdot_limit: current read OT limit Loading Loading @@ -439,6 +440,7 @@ struct sde_rot_mgr { int res_ref_cnt; int rot_enable_clk_cnt; int pm_rot_enable_clk_cnt; struct sde_rot_clk *rot_clk; int num_rot_clk; u32 rdot_limit; Loading