diff options
author | Manjunathappa, Prakash <prakash.pm@ti.com> | 2012-01-03 07:40:51 -0500 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-01-28 14:55:34 -0500 |
commit | f820917abae4a019b0357d3fe72b22c22a11b775 (patch) | |
tree | 670c4f92388a946f13e0fcfa7fe1361b70a316de /drivers/video/da8xx-fb.c | |
parent | 787f9fd23283d7103c65371f7b108ecf1020cddf (diff) |
video: da8xx-fb: reset LCDC only if functional clock changes with DVFS
LCDC functional clock may or may not be derived from CPU/MPU DPLL,
For example,
AM335x => Separate independent DPLL for LCDC
Davinci => Same DPLL as MPU
So, on platforms where LCDC functional clock is not derived from CPU/MPU
PLL it is not required to reset LCDC module as its functional clock does
not change with DVFS.
This patch adds check to do reset only if functional clock changes
between pre and post notifier callbacks with DVFS.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/da8xx-fb.c')
-rw-r--r-- | drivers/video/da8xx-fb.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 29577bf1f559..9ecc30744c6a 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c | |||
@@ -161,6 +161,7 @@ struct da8xx_fb_par { | |||
161 | int vsync_timeout; | 161 | int vsync_timeout; |
162 | #ifdef CONFIG_CPU_FREQ | 162 | #ifdef CONFIG_CPU_FREQ |
163 | struct notifier_block freq_transition; | 163 | struct notifier_block freq_transition; |
164 | unsigned int lcd_fck_rate; | ||
164 | #endif | 165 | #endif |
165 | void (*panel_power_ctrl)(int); | 166 | void (*panel_power_ctrl)(int); |
166 | }; | 167 | }; |
@@ -840,11 +841,13 @@ static int lcd_da8xx_cpufreq_transition(struct notifier_block *nb, | |||
840 | struct da8xx_fb_par *par; | 841 | struct da8xx_fb_par *par; |
841 | 842 | ||
842 | par = container_of(nb, struct da8xx_fb_par, freq_transition); | 843 | par = container_of(nb, struct da8xx_fb_par, freq_transition); |
843 | if (val == CPUFREQ_PRECHANGE) { | 844 | if (val == CPUFREQ_POSTCHANGE) { |
844 | lcd_disable_raster(); | 845 | if (par->lcd_fck_rate != clk_get_rate(par->lcdc_clk)) { |
845 | } else if (val == CPUFREQ_POSTCHANGE) { | 846 | par->lcd_fck_rate = clk_get_rate(par->lcdc_clk); |
846 | lcd_calc_clk_divider(par); | 847 | lcd_disable_raster(); |
847 | lcd_enable_raster(); | 848 | lcd_calc_clk_divider(par); |
849 | lcd_enable_raster(); | ||
850 | } | ||
848 | } | 851 | } |
849 | 852 | ||
850 | return 0; | 853 | return 0; |
@@ -1137,6 +1140,9 @@ static int __devinit fb_probe(struct platform_device *device) | |||
1137 | 1140 | ||
1138 | par = da8xx_fb_info->par; | 1141 | par = da8xx_fb_info->par; |
1139 | par->lcdc_clk = fb_clk; | 1142 | par->lcdc_clk = fb_clk; |
1143 | #ifdef CONFIG_CPU_FREQ | ||
1144 | par->lcd_fck_rate = clk_get_rate(fb_clk); | ||
1145 | #endif | ||
1140 | par->pxl_clk = lcdc_info->pxl_clk; | 1146 | par->pxl_clk = lcdc_info->pxl_clk; |
1141 | if (fb_pdata->panel_power_ctrl) { | 1147 | if (fb_pdata->panel_power_ctrl) { |
1142 | par->panel_power_ctrl = fb_pdata->panel_power_ctrl; | 1148 | par->panel_power_ctrl = fb_pdata->panel_power_ctrl; |