Here is a patch developed by Matan that correctly detects if a mda card is
really presents. It works for millienium card and he tested on a few
others cards with sucess. Please test it on as many cards as possible to
make sure it fixes the reported problems. Thank you.
Q: Why did they deprecate a.out support in linux?
A: Because a nasty coff is bad for your elf.
James Simmons [jsimmons@linux-fbdev.org] ____/|
fbdev/console/gfx developer \ o.O|
http://www.linux-fbdev.org =(_)=
http://linuxgfx.sourceforge.net U
http://linuxconsole.sourceforge.net
--- mdacon.c.orig Mon Jul 10 09:15:36 2000
+++ mdacon.c Mon Jul 10 09:18:05 2000
@@ -133,14 +133,20 @@
static int test_mda_b(unsigned char val, unsigned char reg)
{
unsigned long flags;
+ unsigned char save;
save_flags(flags); cli();
outb_p(reg, mda_index_port);
- outb (val, mda_value_port);
+ udelay(20);
+ save = inb_p(mda_value_port);
+ udelay(20);
+ outb(val, mda_value_port);
udelay(20); val = (inb_p(mda_value_port) == val);
+ udelay(20);
+ outb_p(save, mda_value_port);
restore_flags(flags);
return val;
@@ -246,14 +252,14 @@
/* Edward: These two mess `tests' mess up my cursor on bootup */
/* cursor low register */
- /* if (! test_mda_b(0x66, 0x0f)) {
+ if (! test_mda_b(0x66, 0x0f)) {
return 0;
- } */
+ }
/* cursor low register */
- /* if (! test_mda_b(0x99, 0x0f)) {
+ if (! test_mda_b(0x99, 0x0f)) {
return 0;
- } */
+ }
/* See if the card is a Hercules, by checking whether the vsync
* bit of the status register is changing. This test lasts for
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:11 EST