shithub: riscv

Download patch

ref: a0a1082dbf2dec847bd4ab70a49e1aabf56f9f34
parent: b6c0b30b7f4d4b923284f17e495ddd583d3016b5
author: taruti <[email protected]>
date: Fri May 27 06:48:12 EDT 2011

NVIDIA fix + 0x420 cards

--- a/sys/src/cmd/aux/vga/nvidia.c
+++ b/sys/src/cmd/aux/vga/nvidia.c
@@ -206,6 +206,7 @@
 		case 0x0210:
 		case 0x0290:	/* nvidia 7950 */
 		case 0x0390:
+		case 0x0420:
 			nv->arch = 40;
 			break;
 		default:
@@ -1155,7 +1156,7 @@
 	n = (nv->vpll >> 8) & 0xFF;
 	m = nv->vpll & 0xFF;
 	trouble = nv->crystalfreq;
-	trouble = trouble * n / (m<<p);
+	trouble = trouble * n / ((m<<p) + 0.000000001);
 	f = trouble+0.5;
 	printitem(ctlr->name, "dclk m n p");
 	Bprint(&stdout, " %d %d - %d %d\n", f, m, n, p);