shithub: riscv

Download patch

ref: 712ce5d9fff96a46f51b37a65532022b1a9b833c
parent: c57fe0690fd947c8f285d6a87319c07408ada42f
parent: a418525d953f55c9551b7eef223bc6fe4eb805b3
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Apr 15 05:43:53 EDT 2014

merge

--- a/lib/vgadb
+++ b/lib/vgadb
@@ -1661,3 +1661,22 @@
 	defaultclock=108
 	shb=1312 ehb=1496 ht=1720
 	vrs=1025 vre=1028 vt=1074
+
+
+#
+# EIZO Flexscan s2231W (LCD) Analog
+#
+s2231wA=1680x1050
+	defaultclock=146.25
+	shb=1784 ehb=1960 ht=2240
+	vrs=1053 vre=1059 vt=1089
+	hsync=- vsync=+
+
+#
+# EIZO Flexscan s2231w (LCD) Digital
+#
+s2231wD=1680x1050
+	defaultclock=119.0
+	shb=1728 ehb=1760 vt=1840
+	vrs=1053 vre=1059 vt=1080
+	hsync=+ vsync=-
--- a/sys/src/cmd/aux/vga/nvidia.c
+++ b/sys/src/cmd/aux/vga/nvidia.c
@@ -208,7 +208,7 @@
 		case 0x01D0:
 		case 0x0210:
 		case 0x0290:	/* nvidia 7950 */
-		case 0x0390:
+		case 0x0390:	/* nvidia 7600 */
 		case 0x0420:
 			nv->arch = 40;
 			break;
@@ -813,7 +813,7 @@
 		nv->pramin[0x0815] = 0;
 		nv->pramin[0x0816] = 0;
 		nv->pramin[0x0817] = 0;
-		nv->pramin[0x0818] = 0x0100805F;
+		nv->pramin[0x0818] = 0x0100805F;	/*WaitVSync not possible, if possible =0x01008062 */
 		nv->pramin[0x0819] = 0;
 		nv->pramin[0x081A] = 0x12001200;
 		nv->pramin[0x081B] = 0;
@@ -932,7 +932,7 @@
 				case 0x0090:
 				case 0x0290:
 				case 0x0390:
-					nv->pgraph[0x0608/4] |= 0x00100000;
+					nv->pgraph[0x0608/4] |= nv->pfb[(0x0608/4)] | 0x00100000;	/* K.Okamoto */
 					nv->pgraph[0x0828/4] = 0x07830610;
 					nv->pgraph[0x082C/4] = 0x0000016A;
 					break;
@@ -1016,9 +1016,17 @@
 					nv->pgraph[0x0824/4] = 0;
 					nv->pgraph[0x0864/4] = vga->vmz - 1;
 					nv->pgraph[0x0868/4] = vga->vmz - 1;
-				} else {
-					nv->pgraph[0x09F0/4] = nv->pfb[0x0200/4];
-					nv->pgraph[0x09F4/4] = nv->pfb[0x0204/4];
+				} else {		/* K.Okamoto */
+					if ((nv->did & 0xfff0) == 0x0090 ||
+					    (nv->did & 0xfff0) == 0x01D0 ||
+					    (nv->did & 0xfff0) == 0x0290 ||
+					    (nv->did & 0xfff0) == 0x0390) {
+						nv->pgraph[0x0DF0/4] = nv->pfb[0x0200/4];
+						nv->pgraph[0x0DF4/4] = nv->pfb[0x0204/4];
+					} else {
+						nv->pgraph[0x09F0/4] = nv->pfb[0x0200/4];
+						nv->pgraph[0x09F4/4] = nv->pfb[0x0204/4];
+					}
 					nv->pgraph[0x69F0/4] = nv->pfb[0x0200/4];
 					nv->pgraph[0x69F4/4] = nv->pfb[0x0204/4];