git: 9front

Download patch

ref: 75ce067abe2dd29df6939575c16f080d1b68d352
parent: d6110d28286281c0e6b3cac09c28507c5d67dab4
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Apr 7 18:02:57 EDT 2015

sgi: disable graphical arcs console printing on screen modeset

when we switch to graphics mode, we do not want graphical arcs console
to print on the screen anymore as it assumes 8bit color mode and just
messes up the screen on kernel prints.

--- a/sys/src/9/sgi/screen.c
+++ b/sys/src/9/sgi/screen.c
@@ -445,6 +445,7 @@
 };
 
 Memimage *gscreen;
+static Point curoff;
 
 static void 
 vc2set(uchar r, ushort val)
@@ -465,7 +466,6 @@
 	return regs->dcbdata0 >> 16;
 }
 
-static Point curoff;
 
 void
 cursoron(void)
@@ -556,8 +556,15 @@
 	regs->drawmode1 = DM1_RGBPLANES | 
 		NPORT_DMODE1_CCLT | NPORT_DMODE1_CCEQ | NPORT_DMODE1_CCGT | NPORT_DMODE1_LOSRC |
 		NPORT_DMODE1_DD24 | NPORT_DMODE1_RGBMD | NPORT_DMODE1_HD32 | NPORT_DMODE1_RWPCKD;
+}
 
-	setcursor(&arrow);
+static void
+arcsoff(void)
+{
+	if(consuart != nil && consuart->console && strcmp(consuart->name, "arcs") == 0){
+		consuart = nil;
+		serialoq = nil;
+	}
 }
 
 void
@@ -573,6 +580,7 @@
 	s = splhi();
 	if(!modeset){
 		modeset = 1;
+		arcsoff();
 		setmode();
 	}
 
@@ -613,7 +621,11 @@
 	*d = gscreen->depth;
 	*chan = gscreen->chan;
 	*width = gscreen->width;
-	*softscreen = 1;
+
+	/* make devdraw use gscreen->data */
+	*softscreen = 0xa110c;
+	gscreen->data->ref++;
+
 	return gscreen->data->bdata;
 }
 
--