aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/s3c-fb.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-08-10 21:02:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 11:59:10 -0400
commit949470375393e82dc9158d36d675180c8c250388 (patch)
tree8e0e7b78292aa08784dda53826817fc54b9c6b65 /drivers/video/s3c-fb.c
parentdc8498c00f6a41a28f01111a3d2ed9f179356a71 (diff)
s3c-fb: only init window colour key controls for windows with blending
The driver clears all windows, but also sets the windows' colour key controls at the same time. However, the last window does not have these registers as it is always blended into the previous window. Move the colour key initialisation into the probe, and run it for only nr_win-1 windows. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: KyungMin Park <kyungmin.park.samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/s3c-fb.c')
-rw-r--r--drivers/video/s3c-fb.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 9c46f954c614..f9d0170b2413 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -845,9 +845,6 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win)
845 void __iomem *regs = sfb->regs; 845 void __iomem *regs = sfb->regs;
846 846
847 writel(0, regs + WINCON(win)); 847 writel(0, regs + WINCON(win));
848 writel(0xffffff, regs + WxKEYCONy(win, 0));
849 writel(0xffffff, regs + WxKEYCONy(win, 1));
850
851 writel(0, regs + VIDOSD_A(win)); 848 writel(0, regs + VIDOSD_A(win));
852 writel(0, regs + VIDOSD_B(win)); 849 writel(0, regs + VIDOSD_B(win));
853 writel(0, regs + VIDOSD_C(win)); 850 writel(0, regs + VIDOSD_C(win));
@@ -920,6 +917,12 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
920 for (win = 0; win < S3C_FB_MAX_WIN; win++) 917 for (win = 0; win < S3C_FB_MAX_WIN; win++)
921 s3c_fb_clear_win(sfb, win); 918 s3c_fb_clear_win(sfb, win);
922 919
920 /* initialise colour key controls */
921 for (win = 0; win < (S3C_FB_MAX_WIN - 1); win++) {
922 writel(0xffffff, sfb->regs + WxKEYCONy(win, 0));
923 writel(0xffffff, sfb->regs + WxKEYCONy(win, 1));
924 }
925
923 /* we have the register setup, start allocating framebuffers */ 926 /* we have the register setup, start allocating framebuffers */
924 927
925 for (win = 0; win < S3C_FB_MAX_WIN; win++) { 928 for (win = 0; win < S3C_FB_MAX_WIN; win++) {
@@ -1020,6 +1023,11 @@ static int s3c_fb_resume(struct platform_device *pdev)
1020 for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) 1023 for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++)
1021 s3c_fb_clear_win(sfb, win_no); 1024 s3c_fb_clear_win(sfb, win_no);
1022 1025
1026 for (win_no = 0; win_no < S3C_FB_MAX_WIN - 1; win_no++) {
1027 writel(0xffffff, sfb->regs + WxKEYCONy(win_no, 1));
1028 writel(0xffffff, sfb->regs + WxKEYCONy(win_no, 1));
1029 }
1030
1023 /* restore framebuffers */ 1031 /* restore framebuffers */
1024 for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) { 1032 for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) {
1025 win = sfb->windows[win_no]; 1033 win = sfb->windows[win_no];