All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: hgafb crash on MDA only cards
@ 2001-01-24 13:51 Paul Gortmaker
  2001-01-24 14:42 ` Bakonyi Ferenc
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Gortmaker @ 2001-01-24 13:51 UTC (permalink / raw)
  To: fero; +Cc: geert, linux-kernel


Current (2.4.0pre8) hgafb will misdetect MDA only cards and
then crash - last message briefly seen before screen clears is

hgafb: <NULL> with 32K of memory detected.

A comparison to the detection code in XFree86 shows that hgafb 
forgets to return failure if the status port doesn't show 
any active changes associated with counting vertical syncs.

Paul.

--- drivers/video/hgafb.c~	Sun Aug 20 03:06:13 2000
+++ drivers/video/hgafb.c	Tue Jan 23 13:38:12 2001
@@ -7,6 +7,8 @@
  *
  * History:
  *
+ * - Revision 0.1.7 (23 Jan 2001): fix crash resulting from MDA only cards 
+ *				   being detected as Hercules.	 (Paul G.)
  * - Revision 0.1.6 (17 Aug 2000): new style structs
  *                                 documentation
  * - Revision 0.1.5 (13 Mar 2000): spinlocks instead of saveflags();cli();etc
@@ -358,21 +360,22 @@
 		udelay(2);
 	}
 
-	if (p_save != q_save) {
-		switch (inb_p(HGA_STATUS_PORT) & 0x70) {
-			case 0x10:
-				hga_type = TYPE_HERCPLUS;
-				hga_type_name = "HerculesPlus";
-				break;
-			case 0x50:
-				hga_type = TYPE_HERCCOLOR;
-				hga_type_name = "HerculesColor";
-				break;
-			default:
-				hga_type = TYPE_HERC;
-				hga_type_name = "Hercules";
-				break;
-		}
+	if (p_save == q_save) 
+		return 0;
+
+	switch (inb_p(HGA_STATUS_PORT) & 0x70) {
+		case 0x10:
+			hga_type = TYPE_HERCPLUS;
+			hga_type_name = "HerculesPlus";
+			break;
+		case 0x50:
+			hga_type = TYPE_HERCCOLOR;
+			hga_type_name = "HerculesColor";
+			break;
+		default:
+			hga_type = TYPE_HERC;
+			hga_type_name = "Hercules";
+			break;
 	}
 	return 1;
 }





_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH]: hgafb crash on MDA only cards
  2001-01-24 13:51 [PATCH]: hgafb crash on MDA only cards Paul Gortmaker
@ 2001-01-24 14:42 ` Bakonyi Ferenc
  0 siblings, 0 replies; 2+ messages in thread
From: Bakonyi Ferenc @ 2001-01-24 14:42 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: geert, linux-kernel



Paul Gortmaker wrote:
> Current (2.4.0pre8) hgafb will misdetect MDA only cards and
> then crash - last message briefly seen before screen clears is
> 
> hgafb: <NULL> with 32K of memory detected.
> 
> A comparison to the detection code in XFree86 shows that hgafb 
> forgets to return failure if the status port doesn't show 
> any active changes associated with counting vertical syncs.

Hi!

I'm happy to see I'm not the only one using theese old beasts. :)
Your patch looks good, thanks for it! I'll test it tonight.

Best regards,
	Ferenc Bakonyi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2001-01-24 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-24 13:51 [PATCH]: hgafb crash on MDA only cards Paul Gortmaker
2001-01-24 14:42 ` Bakonyi Ferenc

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.