From fee01c1f971e79ac29da7f9dcc62407f4b64ebec Mon Sep 17 00:00:00 2001 From: Alan Kwong Date: Wed, 3 Aug 2016 22:29:42 -0400 Subject: [PATCH] msm: sde: shutoff memory and periphery when clock is off Because of the CBCR update, rotator driver needs to control clock state of memory core and periphery control when branch clock is off. Since rotator does not have retention requirement, both memory core and periphery control can be turned off to conserve power when core rotator clock is off. CRs-Fixed: 1044375 Change-Id: I42856f4fa638bffa30aae46753b81a8fabc7686c Signed-off-by: Alan Kwong --- drivers/media/platform/msm/sde/rotator/sde_rotator_r3.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/platform/msm/sde/rotator/sde_rotator_r3.c b/drivers/media/platform/msm/sde/rotator/sde_rotator_r3.c index c141797bcd3c..a257ff17bc7c 100644 --- a/drivers/media/platform/msm/sde/rotator/sde_rotator_r3.c +++ b/drivers/media/platform/msm/sde/rotator/sde_rotator_r3.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "sde_rotator_core.h" #include "sde_rotator_util.h" @@ -1843,6 +1844,12 @@ int sde_rotator_r3_init(struct sde_rot_mgr *mgr) if (ret) goto error_hw_rev_init; + /* set rotator CBCR to shutoff memory/periphery on clock off.*/ + clk_set_flags(mgr->rot_clk[mgr->core_clk_idx].clk, + CLKFLAG_NORETAIN_MEM); + clk_set_flags(mgr->rot_clk[mgr->core_clk_idx].clk, + CLKFLAG_NORETAIN_PERIPH); + return 0; error_hw_rev_init: if (rot->irq_num >= 0)