Skip to contentSkip to conversation

da8xx-fb: enable LCDC if FB is unblanked

PATCH Florian Tobias Schandinat 1 participant 1 message Sep 23, 2012 Framebuffer layer

lore
Share & tools
lore
#0 lore raw
Quoted 9 lines · Prakash

It is expected that LCDC to continue to be disabled after resume if it is blanked before suspend. This is also true for DVFS. But it is observed that LCDC being enabled after suspend/resume cycle or DVFS.

Correcting it by having check for FB_BLANK_UNBLANK before enabling.

Applied.

Thanks,

Florian Tobias Schandinat

Quoted 38 lines

---
Applies on top of fbdev-next of Florian Tobias Schandinat's tree. Since v1:
Re-written commit message.

 drivers/video/da8xx-fb.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
drivers/video/da8xx-fb.c +7 -4
index 761c8d1..1273354 100644
@@ -962,7 +962,8 @@ static int lcd_da8xx_cpufreq_transition(struct notifier_block *nb,
 			par->lcd_fck_rate = clk_get_rate(par->lcdc_clk);
 			lcd_disable_raster();
 			lcd_calc_clk_divider(par);
-			lcd_enable_raster();
+			if (par->blank = FB_BLANK_UNBLANK)
+				lcd_enable_raster();
 		}
 	}
 
@@ -1486,10 +1487,12 @@ static int fb_resume(struct platform_device *dev)
 
 	console_lock();
 	clk_enable(par->lcdc_clk);
-	lcd_enable_raster();
+	if (par->blank = FB_BLANK_UNBLANK) {
+		lcd_enable_raster();
 
-	if (par->panel_power_ctrl)
-		par->panel_power_ctrl(1);
+		if (par->panel_power_ctrl)
+			par->panel_power_ctrl(1);
+	}
 
 	fb_set_suspend(info, 0);
 	console_unlock();