Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/dev/pci Pull up revision 1.29 (requested by thorpej):



details:   https://anonhg.NetBSD.org/src/rev/4f959e9c35b6
branches:  netbsd-1-5
changeset: 490428:4f959e9c35b6
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Tue Dec 26 01:44:59 2000 +0000

description:
Pull up revision 1.29 (requested by thorpej):
  Restore code to clear "odd" in VCHR. This seems to
  be required for some TGA cards to run X.

diffstat:

 sys/dev/pci/tga.c |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r 97cc3d0b5011 -r 4f959e9c35b6 sys/dev/pci/tga.c
--- a/sys/dev/pci/tga.c Tue Dec 26 01:20:23 2000 +0000
+++ b/sys/dev/pci/tga.c Tue Dec 26 01:44:59 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tga.c,v 1.25.2.1 2000/06/30 16:27:51 simonb Exp $ */
+/* $NetBSD: tga.c,v 1.25.2.2 2000/12/26 01:44:59 jhawk Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -263,6 +263,17 @@
                break;
        }
 
+       /*
+        * XXX XXX Turning off "odd" shouldn't be necessary,
+        * XXX XXX but I can't make X work with the weird size.
+        */
+       if ((TGARREG(dc, TGA_REG_VHCR) & 0x00000001) != 0 &&    /* XXX */
+           (TGARREG(dc, TGA_REG_VHCR) & 0x80000000) != 0) {    /* XXX */
+               TGAWREG(dc, TGA_REG_VHCR,
+                   (TGARREG(dc, TGA_REG_VHCR) & ~0x80000001));
+               dc->dc_wid -= 4;
+       }
+
        dc->dc_rowbytes = dc->dc_wid * (dc->dc_tgaconf->tgac_phys_depth / 8);
        dc->dc_ht = (TGARREG(dc, TGA_REG_VVCR) & 0x7ff);        /* XXX */
 



Home | Main Index | Thread Index | Old Index