提交 17663e59 编写于 作者: M Marek Szyprowski 提交者: Linus Torvalds

S3C-fb: PM fix

Correctly restore the FrameBuffer register state in the resume function.
Reviewed-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8e8e8267
...@@ -947,7 +947,8 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev) ...@@ -947,7 +947,8 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
int win; int win;
for (win = 0; win <= S3C_FB_MAX_WIN; win++) for (win = 0; win <= S3C_FB_MAX_WIN; win++)
s3c_fb_release_win(sfb, sfb->windows[win]); if (sfb->windows[win])
s3c_fb_release_win(sfb, sfb->windows[win]);
iounmap(sfb->regs); iounmap(sfb->regs);
...@@ -985,11 +986,20 @@ static int s3c_fb_suspend(struct platform_device *pdev, pm_message_t state) ...@@ -985,11 +986,20 @@ static int s3c_fb_suspend(struct platform_device *pdev, pm_message_t state)
static int s3c_fb_resume(struct platform_device *pdev) static int s3c_fb_resume(struct platform_device *pdev)
{ {
struct s3c_fb *sfb = platform_get_drvdata(pdev); struct s3c_fb *sfb = platform_get_drvdata(pdev);
struct s3c_fb_platdata *pd = sfb->pdata;
struct s3c_fb_win *win; struct s3c_fb_win *win;
int win_no; int win_no;
clk_enable(sfb->bus_clk); clk_enable(sfb->bus_clk);
/* setup registers */
writel(pd->vidcon1, sfb->regs + VIDCON1);
/* zero all windows before we do anything */
for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++)
s3c_fb_clear_win(sfb, win_no);
/* restore framebuffers */
for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) { for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) {
win = sfb->windows[win_no]; win = sfb->windows[win_no];
if (!win) if (!win)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册