linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vga16fb: fix color component length for pseudocolor modes
@ 2009-03-30 22:05 Michal Januszewski
  2009-04-01 16:58 ` [Linux-fbdev-devel] " Krzysztof Helt
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Januszewski @ 2009-03-30 22:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-fbdev-devel

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..50033b9 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;

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

* Re: [Linux-fbdev-devel] [PATCH] vga16fb: fix color component length for pseudocolor modes
  2009-03-30 22:05 [PATCH] vga16fb: fix color component length for pseudocolor modes Michal Januszewski
@ 2009-04-01 16:58 ` Krzysztof Helt
  2009-04-02 12:26   ` Michal Januszewski
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Helt @ 2009-04-01 16:58 UTC (permalink / raw)
  To: spock; +Cc: linux-kernel, linux-fbdev-devel

On Tue, 31 Mar 2009 00:05:24 +0200
Michal Januszewski <spock@gentoo.org> wrote:

> 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..50033b9 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;
> 

There is the second place to change in the vga16fb_probe().

Regards,
Krzysztof

 	
----------------------------------------------------------------------
Internetowe dowcipy na 1 kwietnia! Sprawdz! ;) 
http://link.interia.pl/f20f4

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

* [PATCH] vga16fb: fix color component length for pseudocolor modes
  2009-04-01 16:58 ` [Linux-fbdev-devel] " Krzysztof Helt
@ 2009-04-02 12:26   ` Michal Januszewski
  2009-04-04 11:03     ` Krzysztof Helt
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Januszewski @ 2009-04-02 12:26 UTC (permalink / raw)
  To: Krzysztof Helt; +Cc: linux-kernel, linux-fbdev-devel

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;

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

* Re: [PATCH] vga16fb: fix color component length for pseudocolor modes
  2009-04-02 12:26   ` Michal Januszewski
@ 2009-04-04 11:03     ` Krzysztof Helt
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Helt @ 2009-04-04 11:03 UTC (permalink / raw)
  To: spock; +Cc: linux-kernel, linux-fbdev-devel

On Thu, 2 Apr 2009 14:26:13 +0200
Michal Januszewski <spock@gentoo.org> wrote:

> 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>
> ---

Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>


> 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;
> 

----------------------------------------------------------------------
Kredyt z doplata, nawet 200 000 zl. Sprawdz!
http://link.interia.pl/f20fc

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

end of thread, other threads:[~2009-04-04 11:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-04-04 11:03     ` Krzysztof Helt

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).