shithub: riscv

Download patch

ref: 39c3bc277d2fc0756843c5e3fd82500df0c95dcd
parent: 067e035fff201c7bb2957fe8e6090707fb998844
author: cinap_lenrek <[email protected]>
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;
 }