summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/pcdisplay_subr.c19
-rw-r--r--sys/dev/ic/pcdisplayvar.h3
-rw-r--r--sys/dev/ic/vga.c3
3 files changed, 19 insertions, 6 deletions
diff --git a/sys/dev/ic/pcdisplay_subr.c b/sys/dev/ic/pcdisplay_subr.c
index ee4b1a54948..f615dfd73a6 100644
--- a/sys/dev/ic/pcdisplay_subr.c
+++ b/sys/dev/ic/pcdisplay_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcdisplay_subr.c,v 1.5 2003/11/20 17:47:02 millert Exp $ */
+/* $OpenBSD: pcdisplay_subr.c,v 1.6 2006/09/29 19:46:02 miod Exp $ */
/* $NetBSD: pcdisplay_subr.c,v 1.16 2000/06/08 07:01:19 cgd Exp $ */
/*
@@ -41,6 +41,16 @@
#include <dev/wscons/wsdisplayvar.h>
void
+pcdisplay_cursor_reset(scr)
+ struct pcdisplayscreen *scr;
+{
+#ifdef PCDISPLAY_SOFTCURSOR
+ pcdisplay_6845_write(scr->hdl, curstart, 0x10);
+ pcdisplay_6845_write(scr->hdl, curend, 0x10);
+#endif
+}
+
+void
pcdisplay_cursor_init(scr, existing)
struct pcdisplayscreen *scr;
int existing;
@@ -49,10 +59,11 @@ pcdisplay_cursor_init(scr, existing)
bus_space_tag_t memt;
bus_space_handle_t memh;
int off;
+#endif
- pcdisplay_6845_write(scr->hdl, curstart, 0x10);
- pcdisplay_6845_write(scr->hdl, curend, 0x10);
-
+ pcdisplay_cursor_reset(scr);
+
+#ifdef PCDISPLAY_SOFTCURSOR
if (existing) {
/*
* This is the first screen. At this point, scr->active is
diff --git a/sys/dev/ic/pcdisplayvar.h b/sys/dev/ic/pcdisplayvar.h
index 50ae5eccf7e..314ed8b8aca 100644
--- a/sys/dev/ic/pcdisplayvar.h
+++ b/sys/dev/ic/pcdisplayvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcdisplayvar.h,v 1.6 2004/04/02 04:39:50 deraadt Exp $ */
+/* $OpenBSD: pcdisplayvar.h,v 1.7 2006/09/29 19:46:02 miod Exp $ */
/* $NetBSD: pcdisplayvar.h,v 1.8 2000/01/25 02:44:03 ad Exp $ */
/*
@@ -82,6 +82,7 @@ static inline void _pcdisplay_6845_write(ph, reg, val)
_pcdisplay_6845_write(ph, offsetof(struct reg_mc6845, reg), val)
void pcdisplay_cursor_init(struct pcdisplayscreen *, int);
+void pcdisplay_cursor_reset(struct pcdisplayscreen *);
void pcdisplay_cursor(void *, int, int, int);
#if 0
unsigned int pcdisplay_mapchar_simple(void *, int);
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index 2fc58732372..884dddf39e9 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga.c,v 1.38 2005/01/31 06:41:27 miod Exp $ */
+/* $OpenBSD: vga.c,v 1.39 2006/09/29 19:46:02 miod Exp $ */
/* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */
/*
@@ -817,6 +817,7 @@ vga_doswitch(vc)
vc->active = scr;
+ pcdisplay_cursor_reset(&scr->pcs);
pcdisplay_cursor(&scr->pcs, scr->pcs.cursoron,
scr->pcs.vc_crow, scr->pcs.vc_ccol);