shithub: riscv

Download patch

ref: 480d8a19b1faca90f8c4eb2df2d085c00927697e
parent: fbbb449cc0bd35ebb89b87d5b46ed2874246876e
parent: 40319a2b963a3b1988910b3a62a0606bf16b6bd0
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Sat May 28 04:16:29 EDT 2011

merge

--- a/sys/src/cmd/aux/vga/nvidia.c
+++ b/sys/src/cmd/aux/vga/nvidia.c
@@ -222,6 +222,9 @@
 	 * Unlock
 	 */
 	vgaxo(Crtx, 0x1F, 0x57);
+	outportb(Crtx, 0x11);
+	outportb(Crtx+1, inportb(Crtx+1) & ~0x80);
+	trace("nvidia: Unlocked\n");
 
 	if (nv->pextdev[0] & 0x40)
 		nv->crystalfreq = RefFreq;
--- a/sys/src/cmd/aux/vga/pci.c
+++ b/sys/src/cmd/aux/vga/pci.c
@@ -55,7 +55,7 @@
 		buf[j] = 0;
 		close(fd);
 
-		p->ccru = strtol(buf + 3, nil, 16);
+		p->ccru = strtol(buf + 0, nil, 16) << 8;
 		p->vid = strtol(buf + 9, &s, 16);
 		p->did = strtol(s + 1, &s, 16);
 		p->intl = strtol(s + 1, &s, 10);