msm_fb: Display: Set ebi1 clock during lcdc on and off.
Set EBI1 clock to 0 during lcdc off and to 65MHz during on.
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
diff --git a/drivers/video/msm/lcdc.c b/drivers/video/msm/lcdc.c
index b651288..cf8a5ff 100644
--- a/drivers/video/msm/lcdc.c
+++ b/drivers/video/msm/lcdc.c
@@ -29,6 +29,7 @@
#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
+#include <mach/clk.h>
#include "msm_fb.h"
@@ -75,9 +76,13 @@
ret = lcdc_pdata->lcdc_gpio_config(0);
#ifndef CONFIG_MSM_BUS_SCALING
- if (mdp_rev != MDP_REV_303) {
- if (mfd->ebi1_clk)
- clk_disable(mfd->ebi1_clk);
+ if (mfd->ebi1_clk) {
+ if (mdp_rev == MDP_REV_303) {
+ if (clk_set_min_rate(mfd->ebi1_clk, 0))
+ pr_err("%s: ebi1_lcdc_clk set rate failed\n",
+ __func__);
+ }
+ clk_disable(mfd->ebi1_clk);
}
#else
mdp_bus_scale_update_request(0);
@@ -110,12 +115,17 @@
else
pm_qos_rate = 65000;
- if (mdp_rev != MDP_REV_303) {
- if (mfd->ebi1_clk) {
+ if (mfd->ebi1_clk) {
+ if (mdp_rev == MDP_REV_303) {
+ if (clk_set_min_rate(mfd->ebi1_clk, 65000000))
+ pr_err("%s: ebi1_lcdc_clk set rate failed\n",
+ __func__);
+ } else {
clk_set_rate(mfd->ebi1_clk, pm_qos_rate * 1000);
- clk_enable(mfd->ebi1_clk);
}
+ clk_enable(mfd->ebi1_clk);
}
+
#endif
mfd = platform_get_drvdata(pdev);