aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2014-04-15 00:39:01 -0400
committerLiu Ying <Ying.Liu@freescale.com>2014-04-17 23:46:40 -0400
commit19257e67b9e505366a8a1b572a0e7c0ddbe1d8d5 (patch)
treea587623f8f52c131b0c88a6cb032bd2bfb83f703 /drivers/video
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)
Diffstat (limited to 'drivers/video')
-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)
1368 goto fb_destroy; 1368 goto fb_destroy;
1369 } 1369 }
1370 1370
1371 console_lock();
1372 ret = fb_blank(fb_info, FB_BLANK_UNBLANK);
1373 console_unlock();
1374 if (ret < 0) {
1375 dev_err(&pdev->dev, "Failed to unblank framebuffer\n");
1376 goto fb_unregister;
1377 }
1378
1371 dev_info(&pdev->dev, "initialized\n"); 1379 dev_info(&pdev->dev, "initialized\n");
1372 1380
1373 return 0; 1381 return 0;
1374 1382
1383fb_unregister:
1384 unregister_framebuffer(fb_info);
1375fb_destroy: 1385fb_destroy:
1376 if (host->enabled) 1386 if (host->enabled)
1377 clk_disable_unprepare(host->clk_pix); 1387 clk_disable_unprepare(host->clk_pix);