summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2014-04-15 12:39:01 +0800
committerLiu Ying <Ying.Liu@freescale.com>2014-04-18 11:51:30 +0800
commit030e6f92048b2729f8b3b71ab070e8a3a4d30d5d (patch)
treea587623f8f52c131b0c88a6cb032bd2bfb83f703
parent8c121cf2a33e857a473d7a32a567b5a30c5ffcc3 (diff)
ENGR00308397 video: mxsfb: unblank fb explicitly in probe()
The following two commits for backlight core driver introduce an usecount for each backlight device and on/off usage info of each framebuffer associated with it so that we may enable/disable a backlight device when necessary. commit dcb7e61054b959dc4d601a96cce5cc85ad1568ef commit b48b097319587422195adc3f8b2b3b0c067943cc The problem is that some framebuffer drivers would enable their display controllers in probe() and some backlight device drivers would enable their backlights in probe() so that the backlight device usecounts and the on/off usage info of framebuffers are out of counting at the probing stage. This causes a backlight cannot be disabled by blanking the relevant framebuffer(s) before any fb unblanking operation, though it's quite reasonable for the userland to unblank the framebuffer(s) before using it. In order to avoid the potential unnecessary lighten backlight left behind for the mxsfb driver, this patch unblanks framebuffer explicitly in probe() since the LCDIF display controller is actually enabled there. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit 61667ae1430849af17e2431bbe9290295e0ec492)
-rw-r--r--drivers/video/mxsfb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 60a760b0a6da..c9fcd8d0af0d 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -1368,10 +1368,20 @@ static int mxsfb_probe(struct platform_device *pdev)
goto fb_destroy;
}
+ console_lock();
+ ret = fb_blank(fb_info, FB_BLANK_UNBLANK);
+ console_unlock();
+ if (ret < 0) {
+ dev_err(&pdev->dev, "Failed to unblank framebuffer\n");
+ goto fb_unregister;
+ }
+
dev_info(&pdev->dev, "initialized\n");
return 0;
+fb_unregister:
+ unregister_framebuffer(fb_info);
fb_destroy:
if (host->enabled)
clk_disable_unprepare(host->clk_pix);