Commit 4e0dd49d authored by Jingoo Han's avatar Jingoo Han Committed by Florian Tobias Schandinat

video: s3c-fb: add runtime_get/put to suspend/resume

This patch adds runtime_get/put to suspend/resume, which should be
necessary to prevent the problem to access the fimd register
without block power on.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
parent 366ee7c2
...@@ -1557,6 +1557,8 @@ static int s3c_fb_suspend(struct device *dev) ...@@ -1557,6 +1557,8 @@ static int s3c_fb_suspend(struct device *dev)
struct s3c_fb_win *win; struct s3c_fb_win *win;
int win_no; int win_no;
pm_runtime_get_sync(sfb->dev);
for (win_no = S3C_FB_MAX_WIN - 1; win_no >= 0; win_no--) { for (win_no = S3C_FB_MAX_WIN - 1; win_no >= 0; win_no--) {
win = sfb->windows[win_no]; win = sfb->windows[win_no];
if (!win) if (!win)
...@@ -1570,6 +1572,9 @@ static int s3c_fb_suspend(struct device *dev) ...@@ -1570,6 +1572,9 @@ static int s3c_fb_suspend(struct device *dev)
clk_disable(sfb->lcd_clk); clk_disable(sfb->lcd_clk);
clk_disable(sfb->bus_clk); clk_disable(sfb->bus_clk);
pm_runtime_put_sync(sfb->dev);
return 0; return 0;
} }
...@@ -1582,6 +1587,8 @@ static int s3c_fb_resume(struct device *dev) ...@@ -1582,6 +1587,8 @@ static int s3c_fb_resume(struct device *dev)
int win_no; int win_no;
u32 reg; u32 reg;
pm_runtime_get_sync(sfb->dev);
clk_enable(sfb->bus_clk); clk_enable(sfb->bus_clk);
if (!sfb->variant.has_clksel) if (!sfb->variant.has_clksel)
...@@ -1628,6 +1635,8 @@ static int s3c_fb_resume(struct device *dev) ...@@ -1628,6 +1635,8 @@ static int s3c_fb_resume(struct device *dev)
s3c_fb_set_par(win->fbinfo); s3c_fb_set_par(win->fbinfo);
} }
pm_runtime_put_sync(sfb->dev);
return 0; return 0;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment