ref: 8e388a703782a1d7f25efb2890371bcb4fe49fbb
parent: 64f14cc6a4a5d0200f56d88c843bb439dcc473d9
author: taruti <[email protected]>
date: Thu Jun 2 17:27:41 EDT 2011
aux/vga ccru/ccrb parsing
--- a/sys/src/cmd/aux/vga/db.c
+++ b/sys/src/cmd/aux/vga/db.c
@@ -142,7 +142,7 @@
else if((did=atoi(td->val)) == 0)
continue;
for(pci=nil; pci=pcimatch(pci, vid, did);)
- if((pci->ccru>>8) == 3)
+ if(pci->ccrb == 3)
break;
if(pci == nil)
continue;
--- a/sys/src/cmd/aux/vga/nvidia.c
+++ b/sys/src/cmd/aux/vga/nvidia.c
@@ -138,7 +138,7 @@
p = nil;
while((p = pcimatch(p, 0x10DE, 0)) != nil){
- if((p->ccru>>8) == 3)
+ if(p->ccrb == 3)
break;
}
if(p == nil)
@@ -399,7 +399,6 @@
{
ctlr->flag |= Hlinear|Foptions;
}
-
static void
clock(Vga* vga, Ctlr* ctlr)
--- a/sys/src/cmd/aux/vga/pci.c
+++ b/sys/src/cmd/aux/vga/pci.c
@@ -55,7 +55,8 @@
buf[j] = 0;
close(fd);
- p->ccru = strtol(buf + 0, nil, 16) << 8;
+ p->ccrb = strtol(buf, nil, 16);
+ p->ccru = strtol(buf + 3, nil, 16);
p->vid = strtol(buf + 9, &s, 16);
p->did = strtol(s + 1, &s, 16);
p->intl = strtol(s + 1, &s, 10);
--- a/sys/src/cmd/aux/vga/pci.h
+++ b/sys/src/cmd/aux/vga/pci.h
@@ -97,7 +97,8 @@
} mem[6];
uchar intl; /* interrupt line */
- ushort ccru;
+ uchar ccru;
+ uchar ccrb;
Pcidev* list;
int rawfd;