shithub: riscv

Download patch

ref: 34f2e1eaf607c577b263f553c465930afbebd10f
parent: 9b28b2d97b2a064cecdcd44a4a627db0c28e633d
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jan 11 21:04:13 EST 2015

igfx: aaand vga support for x200s :-)

--- a/sys/src/cmd/aux/vga/igfx.c
+++ b/sys/src/cmd/aux/vga/igfx.c
@@ -779,6 +779,19 @@
 		else
 			x = (igfx->adpa.v >> 30) & 1;
 		igfx->adpa.v |= (1<<31);
+		if(igfx->type == TypeG45){
+			igfx->adpa.v &= ~(3<<10);	/* Monitor DPMS */
+
+			igfx->adpa.v &= ~(1<<15);	/* ADPA Polarity Select */
+			if(m->vsync == '+')
+				igfx->adpa.v |= 1<<4;
+			else if(m->vsync == '-')
+				igfx->adpa.v &= ~(1<<14);
+			if(m->hsync == '+')
+				igfx->adpa.v |= 1<<3;
+			else if(m->hsync == '-')
+				igfx->adpa.v &= ~(1<<3);
+		}
 	}
 	p = &igfx->pipe[x];