* [PATCH] Framebuffer: Fix 16bpp colour output in Dreamcast pvr2fb
@ 2007-07-28 14:51 Adrian McMenamin
[not found] ` <20070728171226.GA7247@localhost.localdomain>
0 siblings, 1 reply; 2+ messages in thread
From: Adrian McMenamin @ 2007-07-28 14:51 UTC (permalink / raw)
To: Antonino A. Daplas; +Cc: lethal, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 268 bytes --]
Tony,
This patch - on top of your others - fixes the colour output for 16bpp
RGB565 output in the Dreamcast - it was a simple out by one error in
the bit shift.
Still looking at the 24bpp and 32bpp issues.
Signed-off by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: DC-16bpp.diff --]
[-- Type: text/x-patch; name="DC-16bpp.diff", Size: 450 bytes --]
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
index 3ac32f3..383e87e 100644
--- a/drivers/video/pvr2fb.c
+++ b/drivers/video/pvr2fb.c
@@ -330,27 +331,28 @@ static int pvr2fb_setcolreg(unsigned int regno, unsigned int red,
case 16: /* RGB 565 */
tmp = (red & 0xf800) |
((green & 0xfc00) >> 5) |
- ((blue & 0xf800) >> 11);
+ ((blue & 0xf800) >> 10);
pvr2fb_set_pal_entry(par, regno, tmp);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Framebuffer: Fix 16bpp colour output in Dreamcast pvr2fb
[not found] ` <20070728171226.GA7247@localhost.localdomain>
@ 2007-07-28 17:59 ` Adrian McMenamin
0 siblings, 0 replies; 2+ messages in thread
From: Adrian McMenamin @ 2007-07-28 17:59 UTC (permalink / raw)
To: Ondrej Zajicek, linux-kernel, Antonino A. Daplas, lethal
On 28/07/07, Ondrej Zajicek <santiago@crfreenet.org> wrote:
> On Sat, Jul 28, 2007 at 03:51:38PM +0100, Adrian McMenamin wrote:
> > Tony,
> >
> > This patch - on top of your others - fixes the colour output for 16bpp
> > RGB565 output in the Dreamcast - it was a simple out by one error in
> > the bit shift.
>
> > @@ -330,27 +331,28 @@ static int pvr2fb_setcolreg(unsigned int regno, unsigned int red,
> > case 16: /* RGB 565 */
> > tmp = (red & 0xf800) |
> > ((green & 0xfc00) >> 5) |
> > - ((blue & 0xf800) >> 11);
> > + ((blue & 0xf800) >> 10);
>
> This mixes lsb of green with msb of blue. If you want RGB 565,
> then >> 11 is correct. If you want RGB 555, green should
> be anded with 0xf800.
>
You are, of course, quite right, which makes it all the more the
strange that it appeared to fix the problem. Back to the drawing board
then.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-28 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-28 14:51 [PATCH] Framebuffer: Fix 16bpp colour output in Dreamcast pvr2fb Adrian McMenamin
[not found] ` <20070728171226.GA7247@localhost.localdomain>
2007-07-28 17:59 ` Adrian McMenamin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®