Merge "msm: sde: shutoff memory and periphery when clock is off" into msm-4.8
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 10b0a9d..7ec7efe 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 <linux/dma-mapping.h>
#include <linux/dma-buf.h>
#include <linux/msm_ion.h>
+#include <linux/clk/msm-clk.h>
#include "sde_rotator_core.h"
#include "sde_rotator_util.h"
@@ -1963,6 +1964,12 @@
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)