shithub: riscv

Download patch

ref: 90c1959fc4b0d05a81920edf9caf21f1280305d6
parent: 34f2e1eaf607c577b263f553c465930afbebd10f
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jan 11 21:10:00 EST 2015

igfx: properly turn vga monitor off

--- a/sys/src/cmd/aux/vga/igfx.c
+++ b/sys/src/cmd/aux/vga/igfx.c
@@ -760,6 +760,9 @@
 	igfx->ppcontrol.v &= ~5;
 	igfx->lvds.v &= ~(1<<31);
 	igfx->adpa.v &= ~(1<<31);
+	if(igfx->type == TypeG45)
+		igfx->adpa.v |= (3<<10);	/* Monitor DPMS: off */
+
 	for(x=0; x<igfx->npipe; x++)
 		igfx->pipe[x].conf.v &= ~(1<<31);
 
@@ -780,7 +783,7 @@
 			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 &= ~(3<<10);	/* Monitor DPMS: on */
 
 			igfx->adpa.v &= ~(1<<15);	/* ADPA Polarity Select */
 			if(m->vsync == '+')