summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/dev/diofb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/hp300/dev/diofb.c')
-rw-r--r--sys/arch/hp300/dev/diofb.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/sys/arch/hp300/dev/diofb.c b/sys/arch/hp300/dev/diofb.c
index b66710dd9ac..94f2b776df8 100644
--- a/sys/arch/hp300/dev/diofb.c
+++ b/sys/arch/hp300/dev/diofb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diofb.c,v 1.3 2005/01/18 10:48:19 miod Exp $ */
+/* $OpenBSD: diofb.c,v 1.4 2005/01/18 19:17:03 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
@@ -206,7 +206,23 @@ diofb_fbsetup(struct diofb *fb)
/*
* Clear display
*/
- (*fb->bmv)(fb, 0, 0, 0, 0, fb->dwidth, fb->dheight, RR_CLEAR);
+ (*fb->bmv)(fb, 0, 0, 0, 0, fb->fbwidth, fb->fbheight, RR_CLEAR);
+ fb->curvisible = 0;
+
+ /*
+ * Setup inverted cursor.
+ */
+ (*fb->bmv)(fb, charX(fb, ' '), charY(fb, ' '),
+ fb->cblankx, fb->cblanky, fb->ftwidth, fb->ftheight,
+ RR_COPYINVERTED);
+
+ /*
+ * Default colormap
+ */
+ bzero(&fb->cmap, sizeof(fb->cmap));
+ fb->cmap.r[1] = 0xff;
+ fb->cmap.g[1] = 0xff;
+ fb->cmap.b[1] = 0xff;
strlcpy(fb->wsd.name, "std", sizeof(fb->wsd.name));
fb->wsd.ncols = fb->cols;
@@ -425,13 +441,6 @@ diofb_alloc_screen(void *v, const struct wsscreen_descr *type,
if (fb->nscreens > 0)
return (ENOMEM);
- /*
- * Setup inverted cursor.
- */
- (*fb->bmv)(fb, charX(fb, ' '), charY(fb, ' '),
- fb->cblankx, fb->cblanky, fb->ftwidth, fb->ftheight,
- RR_COPYINVERTED);
-
*cookiep = fb;
*curxp = *curyp = 0;
diofb_alloc_attr(fb, 0, 0, 0, attrp);