mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] recognize ATI M3 & M4 video bios on Dell notebooks
@ 2002-11-23  8:05 Andreas Oberritter
  2002-12-04 22:20 ` James Simmons
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Oberritter @ 2002-11-23  8:05 UTC (permalink / raw)
  To: linux-kernel

Hi,


This patch makes aty128fb find the video bios on a Latitude C600 (M3)
and Inspiron 8000 (M4).

If you reply, then please CC to me. I am not subscribed to the lkml.

Regards,
Andreas



diff -u -r1.26 aty128fb.c
--- drivers/video/aty128fb.c	2002/11/04 18:51:29	1.26
+++ drivers/video/aty128fb.c	2002/11/23 07:46:58
@@ -2134,9 +2134,12 @@
 	char *rom_base;
 	char *rom;
 	int  stage;
-	int  i;
+	int  i,j;
 	char aty_rom_sig[] = "761295520";   /* ATI ROM Signature      */
-	char R128_sig[] = "R128";           /* Rage128 ROM identifier */
+	char *R128_sig[] = {
+		"R128",           /* Rage128 ROM identifier */
+		"128b"
+	};
 
 	for (segstart=0x000c0000; segstart<0x000f0000; segstart+=0x00001000) {
         	stage = 1;
@@ -2167,10 +2170,14 @@
 
 		/* ATI signature found.  Let's see if it's a Rage128 */
 		for (i = 0; (i < 512) && (stage != 4); i++) {
-			if (R128_sig[0] == *rom)
-				if (strncmp(R128_sig, rom, 
-						strlen(R128_sig)) == 0)
-					stage = 4;
+		    for(j = 0;j < sizeof(R128_sig)/sizeof(char *);j++) {
+			if (R128_sig[j][0] == *rom)
+				if (strncmp(R128_sig[j], rom, 
+					    strlen(R128_sig[j])) == 0) {
+					      stage = 4;
+					      break;
+				            }
+		    }
 			rom++;
 		}
 		if (stage != 4) {




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

* Re: [PATCH] recognize ATI M3 & M4 video bios on Dell notebooks
  2002-11-23  8:05 [PATCH] recognize ATI M3 & M4 video bios on Dell notebooks Andreas Oberritter
@ 2002-12-04 22:20 ` James Simmons
  0 siblings, 0 replies; 2+ messages in thread
From: James Simmons @ 2002-12-04 22:20 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: linux-kernel


Applied to fbdev BK tree. Thanks.


MS: (n) 1. A debilitating and surprisingly widespread affliction that
renders the sufferer barely able to perform the simplest task. 2. A disease.

James Simmons  [jsimmons@users.sf.net] 	                ____/|
fbdev/console/gfx developer                             \ o.O|
http://www.linux-fbdev.org                               =(_)=
http://linuxgfx.sourceforge.net                            U
http://linuxconsole.sourceforge.net

On 23 Nov 2002, Andreas Oberritter wrote:

> Hi,
>
>
> This patch makes aty128fb find the video bios on a Latitude C600 (M3)
> and Inspiron 8000 (M4).
>
> If you reply, then please CC to me. I am not subscribed to the lkml.
>
> Regards,
> Andreas
>
>
>
> diff -u -r1.26 aty128fb.c
> --- drivers/video/aty128fb.c	2002/11/04 18:51:29	1.26
> +++ drivers/video/aty128fb.c	2002/11/23 07:46:58
> @@ -2134,9 +2134,12 @@
>  	char *rom_base;
>  	char *rom;
>  	int  stage;
> -	int  i;
> +	int  i,j;
>  	char aty_rom_sig[] = "761295520";   /* ATI ROM Signature      */
> -	char R128_sig[] = "R128";           /* Rage128 ROM identifier */
> +	char *R128_sig[] = {
> +		"R128",           /* Rage128 ROM identifier */
> +		"128b"
> +	};
>
>  	for (segstart=0x000c0000; segstart<0x000f0000; segstart+=0x00001000) {
>          	stage = 1;
> @@ -2167,10 +2170,14 @@
>
>  		/* ATI signature found.  Let's see if it's a Rage128 */
>  		for (i = 0; (i < 512) && (stage != 4); i++) {
> -			if (R128_sig[0] == *rom)
> -				if (strncmp(R128_sig, rom,
> -						strlen(R128_sig)) == 0)
> -					stage = 4;
> +		    for(j = 0;j < sizeof(R128_sig)/sizeof(char *);j++) {
> +			if (R128_sig[j][0] == *rom)
> +				if (strncmp(R128_sig[j], rom,
> +					    strlen(R128_sig[j])) == 0) {
> +					      stage = 4;
> +					      break;
> +				            }
> +		    }
>  			rom++;
>  		}
>  		if (stage != 4) {
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>


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

end of thread, other threads:[~2002-12-04 21:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-23  8:05 [PATCH] recognize ATI M3 & M4 video bios on Dell notebooks Andreas Oberritter
2002-12-04 22:20 ` James Simmons

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®