Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci consider all ATI cards broken wrt font handling, ...



details:   https://anonhg.NetBSD.org/src/rev/560b4d4b99d8
branches:  trunk
changeset: 533509:560b4d4b99d8
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Jul 02 18:17:30 2002 +0000

description:
consider all ATI cards broken wrt font handling, as suggested by
Bang Jun-Young <junyoung%mogua.com@localhost>, but do it in way which allows
single cards to be declared O.K. in case we find one

diffstat:

 sys/dev/pci/vga_pci.c |  20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diffs (60 lines):

diff -r 064df9e9cf23 -r 560b4d4b99d8 sys/dev/pci/vga_pci.c
--- a/sys/dev/pci/vga_pci.c     Tue Jul 02 17:18:21 2002 +0000
+++ b/sys/dev/pci/vga_pci.c     Tue Jul 02 18:17:30 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vga_pci.c,v 1.15 2002/06/28 22:24:13 drochner Exp $    */
+/*     $NetBSD: vga_pci.c,v 1.16 2002/07/02 18:17:30 drochner Exp $    */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_pci.c,v 1.15 2002/06/28 22:24:13 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_pci.c,v 1.16 2002/07/02 18:17:30 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,6 +89,7 @@
        vga_pci_mmap,
 };
 
+#if 0 /* caught by the more general rule below */
 static const struct {
        int id;
        int quirks;
@@ -96,6 +97,14 @@
        {PCI_ID_CODE(PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RAGE_XL_AGP),
         VGA_QUIRK_ONEFONT},
 };
+#endif
+
+static const struct {
+       int vid;
+       int quirks;
+} vga_pci_vquirks[] = {
+       {PCI_VENDOR_ATI, VGA_QUIRK_ONEFONT},
+};
 
 static int
 vga_pci_lookup_quirks(pa)
@@ -103,11 +112,18 @@
 {
        int i;
 
+#if 0
        for (i = 0; i < sizeof(vga_pci_quirks) / sizeof (vga_pci_quirks[0]);
             i++) {
                if (vga_pci_quirks[i].id == pa->pa_id)
                        return (vga_pci_quirks[i].quirks);
        }
+#endif
+       for (i = 0; i < sizeof(vga_pci_vquirks) / sizeof (vga_pci_vquirks[0]);
+            i++) {
+               if (vga_pci_vquirks[i].vid == PCI_VENDOR(pa->pa_id))
+                       return (vga_pci_vquirks[i].quirks);
+       }
        return (0);
 }
 



Home | Main Index | Thread Index | Old Index