Thread (4 messages) 4 messages, 3 authors, 2009-02-15

Re: [PATCH 2/2] cirrusfb: use 5-6-5 RGB for 16bpp mode

flat view

From: Krzysztof Helt <hidden>
Date: 2009-02-15 18:21:34

On Sun, 15 Feb 2009 12:53:36 +0100
Geert Uytterhoeven [off-list ref] wrote:
On Sat, Feb 14, 2009 at 18:52, Krzysztof Helt [off-list ref] wrote:
quoted
From: Krzysztof Helt <redacted>

Use the 5-6-5 RGB mode instead of the 5-5-5 mode
at 16bpp depth.
It fixes colors in the 16bpp modes on Cirrus
Laguna chips.

Signed-off-by: Krzysztof Helt <redacted>
---
 drivers/video/cirrusfb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index c98efd0..bf3d9c3 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -499,12 +499,12 @@ static int cirrusfb_check_var(struct fb_var_screeninfo *var,
                       var->green.offset = -3;
                       var->blue.offset = 8;
               } else {
-                       var->red.offset = 10;
+                       var->red.offset = 11;
                       var->green.offset = 5;
                       var->blue.offset = 0;
               }
               var->red.length = 5;
-               var->green.length = 5;
+               var->green.length = 6;
               var->blue.length = 5;
               break;
@@ -1180,7 +1180,7 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
               /* pixel mask: pass-through all planes */
               WGen(cinfo, VGA_PEL_MSK, 0xff);
 #ifdef CONFIG_PCI
-               WHDR(cinfo, 0xc0);      /* Copy Xbh */
+               WHDR(cinfo, 0xc1);      /* Copy Xbh */
 #elif defined(CONFIG_ZORRO)
               /* FIXME: CONFIG_PCI and CONFIG_ZORRO may be defined both */
               WHDR(cinfo, 0xa0);      /* hidden dac reg: nothing special */
Does this need a similar or other change to cinfo for the Zorro case?
The Zorro offsets are: red = 2, green = -3, blue = 8. It seems that
Zorro uses 5-6-5 already (offset between 2 and 8).

I contacted a person who reported that Zorro Cirrus card was not detected
http://www.mail-archive.com/linux-m68k@vger.kernel.org/msg01505.html

I have to cross-compile a kernel for him.

However, I have a chance to big the Cirrus GD5446 on online auction this week.
The Cirrus 5446 is supposedly the same chip as the Picasso 4 card so I can
fix it on x86 first. My experience shows that the cirrusfb driver has still
many bugs and may not handle some of chips it claims to handle (like Laguna chips).
After the driver is fixed for the x86 GD5446 I will try to help him.

Many bugs found during my work with the Laguna chips are bugs
in the common code (like wrong line length for the 32-bit modes or
overwritten 9-bit of line pitch in the chip register). These fixes
helps (almost) all chips on all platforms.

Regards,
Krzysztof


----------------------------------------------------------------------
Zostan mistrzem parkowania w Bombaju!
Zagraj >> http://link.interia.pl/f204e 


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help