linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jon@ringle.org
To: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jon Ringle <jringle@gridpoint.com>
Subject: [PATCH] video: da8xx-fb: Fix casting of info->pseudo_palette
Date: Wed, 05 Mar 2014 08:19:59 +0000	[thread overview]
Message-ID: <1394007599-31429-1-git-send-email-jon@ringle.org> (raw)
In-Reply-To: <1393836183-26555-1-git-send-email-jringle@gridpoint.com>

From: Jon Ringle <jringle@gridpoint.com>

(Resending without corporate disclaimer in email footer)

The casting to (u16 *) on info->pseudo_palette is wrong and causes the
display to show a blue (garbage) vertical line on every other pixel column

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 drivers/video/da8xx-fb.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index d042624..83c43b2 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -678,15 +678,7 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
 			(green << info->var.green.offset) |
 			(blue << info->var.blue.offset);
 
-		switch (info->var.bits_per_pixel) {
-		case 16:
-			((u16 *) (info->pseudo_palette))[regno] = v;
-			break;
-		case 24:
-		case 32:
-			((u32 *) (info->pseudo_palette))[regno] = v;
-			break;
-		}
+		((u32 *) (info->pseudo_palette))[regno] = v;
 		if (palette[0] != 0x4000) {
 			update_hw = 1;
 			palette[0] = 0x4000;
-- 
1.8.5.4


  reply	other threads:[~2014-03-05  8:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03  8:43 [PATCH] video: da8xx-fb: Fix casting of info->pseudo_palette Jon Ringle
2014-03-05  8:19 ` jon [this message]
2014-03-26 16:56   ` Jon Ringle

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=1394007599-31429-1-git-send-email-jon@ringle.org \
    --to=jon@ringle.org \
    --cc=jringle@gridpoint.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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).