All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] matroxfb_base.c - a little fix
@ 2002-02-04  1:01 Denis Zaitsev
  2002-02-04  1:08 ` Petr Vandrovec
  0 siblings, 1 reply; 6+ messages in thread
From: Denis Zaitsev @ 2002-02-04  1:01 UTC (permalink / raw)
  To: vandrove; +Cc: linux-kernel

So, below is the little fix.  It's self-explanatory.  Matrox's fb
can't be compiled without it.  Petr, please, apply it.


--- drivers/video/matrox/matroxfb_base.c.orig	Mon Feb  4 05:11:15 2002
+++ drivers/video/matrox/matroxfb_base.c	Mon Feb  4 05:16:05 2002
@@ -1789,7 +1789,7 @@
 
 	strcpy(ACCESS_FBINFO(fbcon.modename), "MATROX VGA");
 	ACCESS_FBINFO(fbcon.changevar) = NULL;
-	ACCESS_FBINFO(fbcon.node) = -1;
+	ACCESS_FBINFO(fbcon.node.value) = -1;
 	ACCESS_FBINFO(fbcon.fbops) = &matroxfb_ops;
 	ACCESS_FBINFO(fbcon.disp) = d;
 	ACCESS_FBINFO(fbcon.switch_con) = &matroxfb_switch;

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

* Re: [PATCH] matroxfb_base.c - a little fix
  2002-02-04  1:01 Denis Zaitsev
@ 2002-02-04  1:08 ` Petr Vandrovec
  2002-02-26 19:26   ` Denis Zaitsev
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vandrovec @ 2002-02-04  1:08 UTC (permalink / raw)
  To: Denis Zaitsev; +Cc: linux-kernel

On Mon, Feb 04, 2002 at 06:01:07AM +0500, Denis Zaitsev wrote:
> So, below is the little fix.  It's self-explanatory.  Matrox's fb
> can't be compiled without it.  Petr, please, apply it.

Thanks. I already tried to push updated matroxfb to both Marcello
and Linus, but only Alan picked it... matroxfb_crtc2.c needs
simillar fix, BTW.

> --- drivers/video/matrox/matroxfb_base.c.orig	Mon Feb  4 05:11:15 2002
> +++ drivers/video/matrox/matroxfb_base.c	Mon Feb  4 05:16:05 2002
> @@ -1789,7 +1789,7 @@
>  
>  	strcpy(ACCESS_FBINFO(fbcon.modename), "MATROX VGA");
>  	ACCESS_FBINFO(fbcon.changevar) = NULL;
> -	ACCESS_FBINFO(fbcon.node) = -1;
> +	ACCESS_FBINFO(fbcon.node.value) = -1;

No,     ACCESS_FBINFO(fbcon.node) = B_FREE;
or                                = NODEV; 

>  	ACCESS_FBINFO(fbcon.fbops) = &matroxfb_ops;
>  	ACCESS_FBINFO(fbcon.disp) = d;
>  	ACCESS_FBINFO(fbcon.switch_con) = &matroxfb_switch;

							Petr Vandrovec
							vandrove@vc.cvut.cz


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

* [PATCH] matroxfb_base.c - a little fix
  2002-02-04  1:08 ` Petr Vandrovec
@ 2002-02-26 19:26   ` Denis Zaitsev
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Zaitsev @ 2002-02-26 19:26 UTC (permalink / raw)
  To: Petr Vandrovec; +Cc: linux-kernel

It was two identical if-else branches in matroxfb_decode_var - one for
        var->bits_per_pixel == 4
and the other for
        var->bits_per_pixel <= 8
.  So, I've removed 4's one.  It should be ok, if this branch was ok -
i.e. was intentionally made the same as the 8bpp's.  So, Petr, please,
apply this fix, if all ok.


--- drivers/video/matrox/matroxfb_base.c.orig	Mon Feb 25 21:38:33 2002
+++ drivers/video/matrox/matroxfb_base.c	Tue Feb 26 16:38:33 2002
@@ -494,16 +494,6 @@ static int matroxfb_decode_var(CPMINFO s
 		var->transp.offset = 0;
 		var->transp.length = 0;
 		*visual = MX_VISUAL_PSEUDOCOLOR;
-	} else if (var->bits_per_pixel == 4) {
-		var->red.offset = 0;
-		var->red.length = 8;
-		var->green.offset = 0;
-		var->green.length = 8;
-		var->blue.offset = 0;
-		var->blue.length = 8;
-		var->transp.offset = 0;
-		var->transp.length = 0;
-		*visual = MX_VISUAL_PSEUDOCOLOR;
 	} else if (var->bits_per_pixel <= 8) {
 		var->red.offset = 0;
 		var->red.length = 8;

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

* Re: [PATCH] matroxfb_base.c - a little fix
@ 2002-02-26 19:43 Petr Vandrovec
  2002-02-26 22:36 ` Denis Zaitsev
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vandrovec @ 2002-02-26 19:43 UTC (permalink / raw)
  To: Denis Zaitsev; +Cc: linux-kernel

On 27 Feb 02 at 0:26, Denis Zaitsev wrote:
> It was two identical if-else branches in matroxfb_decode_var - one for
>         var->bits_per_pixel == 4
> and the other for
>         var->bits_per_pixel <= 8
> .  So, I've removed 4's one.  It should be ok, if this branch was ok -
> i.e. was intentionally made the same as the 8bpp's.  So, Petr, please,
> apply this fix, if all ok.

Somebody changed == 8 to <= 8 when I was not looking... But as
bits_per_pixel is already validated, it looks correct. Applied,
will go to Linus next round.
                                            Best regards,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                

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

* Re: [PATCH] matroxfb_base.c - a little fix
  2002-02-26 19:43 [PATCH] matroxfb_base.c - a little fix Petr Vandrovec
@ 2002-02-26 22:36 ` Denis Zaitsev
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Zaitsev @ 2002-02-26 22:36 UTC (permalink / raw)
  To: Petr Vandrovec; +Cc: linux-kernel

BTW, a little question: you use the (green.length == 5) test to
distinct bpp15 from bpp16 (matroxfb_base.c:509).  Why?  Is the "real"
15 not used as the bits_per_pixel's value?  Thanks in advance.

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

* Re: [PATCH] matroxfb_base.c - a little fix
@ 2002-02-27  0:01 Petr Vandrovec
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vandrovec @ 2002-02-27  0:01 UTC (permalink / raw)
  To: Denis Zaitsev; +Cc: linux-kernel

On 27 Feb 02 at 3:36, Denis Zaitsev wrote:
> BTW, a little question: you use the (green.length == 5) test to
> distinct bpp15 from bpp16 (matroxfb_base.c:509).  Why?  Is the "real"
> 15 not used as the bits_per_pixel's value?  Thanks in advance.

Yes, it is per spec. bits_per_pixel is bits per pixel, and for both
1:5:5:5 and 5:6:5 this is 16. Matrox hardware does not support 15bpp
pixels (16 pixels in 15 bytes)...
                                        Best regards,
                                            Petr Vandrovec
                                            vandrove@vc.cvut.cz
                                            

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

end of thread, other threads:[~2002-02-27  0:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-26 19:43 [PATCH] matroxfb_base.c - a little fix Petr Vandrovec
2002-02-26 22:36 ` Denis Zaitsev
  -- strict thread matches above, loose matches on Subject: below --
2002-02-27  0:01 Petr Vandrovec
2002-02-04  1:01 Denis Zaitsev
2002-02-04  1:08 ` Petr Vandrovec
2002-02-26 19:26   ` Denis Zaitsev

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.