From: Michal Januszewski <spock@gentoo.org>
To: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: linux-kernel@vger.kernel.org, linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH] vga16fb: fix color component length for pseudocolor modes
Date: Thu, 2 Apr 2009 14:26:13 +0200 [thread overview]
Message-ID: <20090402122613.GA16899@tria> (raw)
In-Reply-To: <20090401185856.44d89699.krzysztof.h1@poczta.fm>
vga16fb incorrectly sets the length of the color fields to 6 or 2 bits
for PSEUDOCOLOR modes, for which either 8 or 4 bits are used per pixel.
Fix this by setting the length to 8 or 4, respectively.
Signed-off-by: Michal Januszewski <spock@gentoo.org>
---
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
index 5b29389..8f1eb7f 100644
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -506,7 +506,7 @@ static int vga16fb_check_var(struct fb_var_screeninfo *var,
var->red.offset = var->green.offset = var->blue.offset =
var->transp.offset = 0;
var->red.length = var->green.length = var->blue.length =
- (par->isVGA) ? 6 : 2;
+ (par->isVGA) ? 8 : 4;
var->transp.length = 0;
var->activate = FB_ACTIVATE_NOW;
var->height = -1;
@@ -1324,7 +1324,7 @@ static int __init vga16fb_probe(struct platform_device *dev)
par->palette_blanked = 0;
par->vesa_blanked = 0;
- i = par->isVGA? 6 : 2;
+ i = par->isVGA? 8 : 4;
vga16fb_defined.red.length = i;
vga16fb_defined.green.length = i;
next prev parent reply other threads:[~2009-04-02 12:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 22:05 [PATCH] vga16fb: fix color component length for pseudocolor modes Michal Januszewski
2009-04-01 16:58 ` [Linux-fbdev-devel] " Krzysztof Helt
2009-04-02 12:26 ` Michal Januszewski [this message]
2009-04-04 11:03 ` Krzysztof Helt
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=20090402122613.GA16899@tria \
--to=spock@gentoo.org \
--cc=krzysztof.h1@poczta.fm \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.