diff options
author | Robby Cai <R63905@freescale.com> | 2013-11-06 16:21:08 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 08:11:56 -0500 |
commit | d0be304b51338c950aabc51daa499a80be1f2713 (patch) | |
tree | 691854e8559b56673f4b94ecb16d6aec2f9e479e /drivers/video | |
parent | 3a9b3a5e8184de603ba6adbd5527caf97073cbf3 (diff) |
ENGR00286462 mx6sl fb: fix runtime pm not work at probe time
For mxsfb, the lcdif controller is enabled (with clock enabled as well)
at probe time, but pm_runtime_enable() is called after its enablement,
thus runtime pm function only works at next enablement. The root cause
is that pm_runtime_get_sync() function need to be called after
pm_runtime_enable(). This patch fixes the problem by moving the
position of pm_runtime_enable() ahead.
For epdc fb, runtime pm may not work at probe time if DEFAULT_PANEL_HW_INIT
is turned on (off by default). Fix it for safety.
Signed-off-by: Robby Cai <R63905@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/mxc/mxc_epdc_fb.c | 4 | ||||
-rw-r--r-- | drivers/video/mxsfb.c | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/video/mxc/mxc_epdc_fb.c b/drivers/video/mxc/mxc_epdc_fb.c index a57c95914fb6..e536e781db9e 100644 --- a/drivers/video/mxc/mxc_epdc_fb.c +++ b/drivers/video/mxc/mxc_epdc_fb.c @@ -5013,6 +5013,8 @@ int mxc_epdc_fb_probe(struct platform_device *pdev) g_fb_data = fb_data; + pm_runtime_enable(fb_data->dev); + #ifdef DEFAULT_PANEL_HW_INIT ret = mxc_epdc_fb_init_hw((struct fb_info *)fb_data); if (ret) { @@ -5020,8 +5022,6 @@ int mxc_epdc_fb_probe(struct platform_device *pdev) } #endif - pm_runtime_enable(fb_data->dev); - goto out; out_lutmap: diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index c4d0b6cc8b18..a9b9ef2f5682 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -1204,9 +1204,11 @@ static int mxsfb_probe(struct platform_device *pdev) INIT_LIST_HEAD(&fb_info->modelist); + pm_runtime_enable(&host->pdev->dev); + ret = mxsfb_init_fbinfo(host); if (ret != 0) - goto fb_release; + goto fb_pm_runtime_disable; platform_set_drvdata(pdev, fb_info); @@ -1222,8 +1224,6 @@ static int mxsfb_probe(struct platform_device *pdev) goto fb_destroy; } - pm_runtime_enable(&host->pdev->dev); - dev_info(&pdev->dev, "initialized\n"); return 0; @@ -1232,6 +1232,8 @@ fb_destroy: if (host->enabled) clk_disable_unprepare(host->clk_pix); fb_destroy_modelist(&fb_info->modelist); +fb_pm_runtime_disable: + pm_runtime_disable(&host->pdev->dev); fb_release: framebuffer_release(fb_info); @@ -1246,6 +1248,7 @@ static int mxsfb_remove(struct platform_device *pdev) if (host->enabled) mxsfb_disable_controller(fb_info); + pm_runtime_disable(&host->pdev->dev); unregister_framebuffer(fb_info); mxsfb_free_videomem(host); |