git: 9front

Download patch

ref: 54c2adf20adf72ec424874a54fcf4bb7e9c40691
parent: baba0c48ec13e0ceff028b4af8e28b77aff850c3
author: ftrvxmtrx <ftrvxmtrx@gmail.com>
date: Fri Jan 2 08:29:58 EST 2015

aux/vga: do not set mode 3 unless connected

--- a/sys/src/cmd/aux/vga/vesa.c
+++ b/sys/src/cmd/aux/vga/vesa.c
@@ -990,11 +990,11 @@
 	if(display == 0)
 		return 0;
 
-	/* switch to common mode before trying */
-	vbesetmode(vbe, 3);
-
 	cx = 1<<(display-1);
 	if(vbe->dspcon & cx){
+		/* switch to common mode before trying */
+		vbesetmode(vbe, 3);
+
 		vbesetup(vbe, &u, 0x5F64);
 		u.bx = 0;
 		u.cx = cx;
--