From 2a8c278c734376a264867efb730c09ba452ea82b Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 28 May 2009 14:34:35 -0700 Subject: [PATCH] --- yaml --- r: 145342 b: refs/heads/master c: 17663e59704bea838a9236f299104e30909a43b1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/video/s3c-fb.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 92e6e7cde146..01c492afa138 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8e8e8267f0a08c2415d5f51bc9a9fde6d5400619 +refs/heads/master: 17663e59704bea838a9236f299104e30909a43b1 diff --git a/trunk/drivers/video/s3c-fb.c b/trunk/drivers/video/s3c-fb.c index 5e9c6302433b..d3a568e6b169 100644 --- a/trunk/drivers/video/s3c-fb.c +++ b/trunk/drivers/video/s3c-fb.c @@ -947,7 +947,8 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev) int 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); @@ -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) { struct s3c_fb *sfb = platform_get_drvdata(pdev); + struct s3c_fb_platdata *pd = sfb->pdata; struct s3c_fb_win *win; int win_no; 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++) { win = sfb->windows[win_no]; if (!win)