All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SiMotion VoyagerGX framebuffer: blue stripped background
@ 2005-12-09 18:10 Sergei Shtylylov
  2005-12-09 20:29 ` Sergei Shtylylov
  2005-12-11 16:53 ` Ralf Baechle
  0 siblings, 2 replies; 3+ messages in thread
From: Sergei Shtylylov @ 2005-12-09 18:10 UTC (permalink / raw)
  To: Linux MIPS; +Cc: Manish Lachwani, Konstantin Baidarov

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

Hello.

    This driver was using an incorrect typecast when setting pseudopalette,
hence were the blue strips on the black char background. As this driver
happens to be maintaned by Linux/MIPS, here's the patch (I've also noticed a
typo in the head comment, hence comes another hunk)...

WBR, Sergei

Signed-off-by: Konstantin Baydarov <kbaidarov@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>




[-- Attachment #2: VoyagerGX-blue-strips.patch --]
[-- Type: text/plain, Size: 740 bytes --]

diff --git a/drivers/video/smivgxfb.c b/drivers/video/smivgxfb.c
index d5755c5..c521069 100644
--- a/drivers/video/smivgxfb.c
+++ b/drivers/video/smivgxfb.c
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Silicon Motion VoyaagerGX framebuffer driver
+ *  Silicon Motion VoyagerGX framebuffer driver
  *
  * 	ported to 2.6 by Embedded Alley Solutions, Inc
  * 	Copyright (C) 2005 Embedded Alley Solutions, Inc
@@ -162,7 +162,7 @@ smi_setcolreg(unsigned regno, unsigned r
 	if (regno > 255)
 		return 1;
 
-	((u16 *)(info->pseudo_palette))[regno] =
+	((u32 *)(info->pseudo_palette))[regno] =
 		    ((red & 0xf800) >> 0) |
 		    ((green & 0xfc00) >> 5) |
 		    ((blue & 0xf800) >> 11);




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] SiMotion VoyagerGX framebuffer: blue stripped background
  2005-12-09 18:10 [PATCH] SiMotion VoyagerGX framebuffer: blue stripped background Sergei Shtylylov
@ 2005-12-09 20:29 ` Sergei Shtylylov
  2005-12-11 16:53 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylylov @ 2005-12-09 20:29 UTC (permalink / raw)
  To: Linux MIPS; +Cc: Manish Lachwani, Konstantin Baidarov

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]

Hello.

Sergei Shtylylov wrote:

>    This driver was using an incorrect typecast when setting pseudopalette,
> hence were the blue strips on the black char background. As this driver
> happens to be maintaned by Linux/MIPS, here's the patch (I've also 
> noticed a
> typo in the head comment, hence comes another hunk)...

     Have noticed that regno check in smi_setcolreg() is too relaxed as
pseudo-palette has only 16 entries. So, had to update the patch.

WBR, Sergei

Signed-off-by: Konstantin Baydarov <kbaidarov@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>


[-- Attachment #2: VoyagerGX-blue-strips.patch --]
[-- Type: text/plain, Size: 1131 bytes --]

diff --git a/drivers/video/smivgxfb.c b/drivers/video/smivgxfb.c
index d5755c5..944ff4a 100644
--- a/drivers/video/smivgxfb.c
+++ b/drivers/video/smivgxfb.c
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Silicon Motion VoyaagerGX framebuffer driver
+ *  Silicon Motion VoyagerGX framebuffer driver
  *
  * 	ported to 2.6 by Embedded Alley Solutions, Inc
  * 	Copyright (C) 2005 Embedded Alley Solutions, Inc
@@ -159,10 +159,10 @@ smi_setcolreg(unsigned regno, unsigned r
 	unsigned blue, unsigned transp,
 	struct fb_info *info)
 {
-	if (regno > 255)
+	if (regno > 15)
 		return 1;
 
-	((u16 *)(info->pseudo_palette))[regno] =
+	((u32 *)(info->pseudo_palette))[regno] =
 		    ((red & 0xf800) >> 0) |
 		    ((green & 0xfc00) >> 5) |
 		    ((blue & 0xf800) >> 11);
@@ -318,9 +318,9 @@ static int __devinit vgx_pci_probe(struc
 	if (!info.pseudo_palette) {
 		return -ENOMEM;
 	}
-	memset(info.pseudo_palette, 0, sizeof(u32) *16);
+	memset(info.pseudo_palette, 0, sizeof(u32) * 16);
 
-	fb_alloc_cmap(&info.cmap,256,0);
+	fb_alloc_cmap(&info.cmap, 256, 0);
 
 	smi_setmode();
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] SiMotion VoyagerGX framebuffer: blue stripped background
  2005-12-09 18:10 [PATCH] SiMotion VoyagerGX framebuffer: blue stripped background Sergei Shtylylov
  2005-12-09 20:29 ` Sergei Shtylylov
@ 2005-12-11 16:53 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2005-12-11 16:53 UTC (permalink / raw)
  To: Sergei Shtylylov; +Cc: Linux MIPS, Manish Lachwani, Konstantin Baidarov

On Fri, Dec 09, 2005 at 09:10:51PM +0300, Sergei Shtylylov wrote:

>    This driver was using an incorrect typecast when setting pseudopalette,
> hence were the blue strips on the black char background. As this driver
> happens to be maintaned by Linux/MIPS, here's the patch (I've also noticed a

Framebuffer stuff to it's maintainer "Antonino A. Daplas" <adaplas@gmail.com>
and linux-fbdev-devel@lists.sourceforge.net, please.

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-11 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-09 18:10 [PATCH] SiMotion VoyagerGX framebuffer: blue stripped background Sergei Shtylylov
2005-12-09 20:29 ` Sergei Shtylylov
2005-12-11 16:53 ` Ralf Baechle

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.