summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-04-07 22:02:57 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-04-07 22:02:57 +0200
commit39c3bc277d2fc0756843c5e3fd82500df0c95dcd (patch)
treef29adea1a7d58501216c3bcece1fcf54faf6c594
parent067e035fff201c7bb2957fe8e6090707fb998844 (diff)
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.
-rw-r--r--sys/src/9/sgi/screen.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/src/9/sgi/screen.c b/sys/src/9/sgi/screen.c
index 1c059a0f5..d98aec78e 100644
--- a/sys/src/9/sgi/screen.c
+++ b/sys/src/9/sgi/screen.c
@@ -445,6 +445,7 @@ Cursor arrow = {
};
Memimage *gscreen;
+static Point curoff;
static void
vc2set(uchar r, ushort val)
@@ -465,7 +466,6 @@ vc2get(uchar r)
return regs->dcbdata0 >> 16;
}
-static Point curoff;
void
cursoron(void)
@@ -556,8 +556,15 @@ setmode(void)
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 @@ flushmemscreen(Rectangle r)
s = splhi();
if(!modeset){
modeset = 1;
+ arcsoff();
setmode();
}
@@ -613,7 +621,11 @@ attachscreen(Rectangle *r, ulong *chan, int* d, int *width, int *softscreen)
*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;
}