shithub: riscv

Download patch

ref: c9ea2fbb77982f20583bfdcb075a79dbcb8226df
parent: 4c93f534ac515a3e553bf65aaa2ee47b8588e1e3
parent: 8e388a703782a1d7f25efb2890371bcb4fe49fbb
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Sat May 28 12:34:41 EDT 2011

merge

--- 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;