linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] s3c-fb: only init window colour key controls for windows with blending
Date: Tue, 18 May 2010 10:54:02 +0000	[thread overview]
Message-ID: <1274180045-14645-3-git-send-email-ben-linux@fluff.org> (raw)
In-Reply-To: <1274180045-14645-1-git-send-email-ben-linux@fluff.org>

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>
---
 drivers/video/s3c-fb.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 9682ecc..2403ed3 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -844,9 +844,6 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win)
 	void __iomem *regs = sfb->regs;
 
 	writel(0, regs + WINCON(win));
-	writel(0xffffff, regs + WxKEYCONy(win, 0));
-	writel(0xffffff, regs + WxKEYCONy(win, 1));
-
 	writel(0, regs + VIDOSD_A(win));
 	writel(0, regs + VIDOSD_B(win));
 	writel(0, regs + VIDOSD_C(win));
@@ -919,6 +916,12 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
 	for (win = 0; win < S3C_FB_MAX_WIN; win++)
 		s3c_fb_clear_win(sfb, win);
 
+	/* initialise colour key controls */
+	for (win = 0; win < (S3C_FB_MAX_WIN - 1); win++) {
+		writel(0xffffff, sfb->regs + WxKEYCONy(win, 0));
+		writel(0xffffff, sfb->regs + WxKEYCONy(win, 1));
+	}
+
 	/* we have the register setup, start allocating framebuffers */
 
 	for (win = 0; win < S3C_FB_MAX_WIN; win++) {
@@ -1019,6 +1022,11 @@ static int s3c_fb_resume(struct platform_device *pdev)
 	for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++)
 		s3c_fb_clear_win(sfb, win_no);
 
+	for (win_no = 0; win_no < S3C_FB_MAX_WIN - 1; win_no++) {
+		writel(0xffffff, sfb->regs + WxKEYCONy(win_no, 1));
+		writel(0xffffff, sfb->regs + WxKEYCONy(win_no, 1));
+	}
+
 	/* restore framebuffers */
 	for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) {
 		win = sfb->windows[win_no];
-- 
1.6.3.3


  parent reply	other threads:[~2010-05-18 10:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18 10:54 s3c-fb updates Ben Dooks
2010-05-18 10:54 ` [PATCH 1/5] s3c-fb: Change to depending on CONFIG_S3C_FB_DEV Ben Dooks
2010-05-18 10:54 ` Ben Dooks [this message]
2010-05-18 10:54 ` [PATCH 3/5] s3c-fb: Initial move to unifying the header files Ben Dooks
2010-05-18 10:54 ` [PATCH 4/5] s3c-fb: udpate to support s3c2416/s3c2443 style hardware Ben Dooks
2010-05-18 10:54 ` [PATCH 5/5] s3c-fb: Integrate palette setup code into main driver Ben Dooks
2010-05-18 14:35 ` s3c-fb updates Kyungmin Park
2010-05-19  0:45   ` Ben Dooks
2010-05-19  1:53     ` InKi Dae
2010-05-19  1:57       ` Ben Dooks
2010-05-19  6:25     ` Yauhen Kharuzhy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1274180045-14645-3-git-send-email-ben-linux@fluff.org \
    --to=ben-linux@fluff.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).