diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-09-29 19:46:05 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-09-29 19:46:05 +0000 |
commit | 45891e1595258793ffd3dbfddb1e1d86d1b65b75 (patch) | |
tree | c51bf3016916c9de109fcd6b8cedf41854c441fd /sys/dev | |
parent | 7b4c2af499f84d6e248f4a1c3f4e525726251ca8 (diff) |
If option PCDISPLAY_SOFTCURSOR, force the hardware cursor off every time
we switch vt, so that the hardware cursor does not reappear after starting
X11, and switching to a text vt.
Spotted by jmc@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/pcdisplay_subr.c | 19 | ||||
-rw-r--r-- | sys/dev/ic/pcdisplayvar.h | 3 | ||||
-rw-r--r-- | sys/dev/ic/vga.c | 3 | ||||
-rw-r--r-- | sys/dev/isa/ega.c | 3 |
4 files changed, 21 insertions, 7 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); diff --git a/sys/dev/isa/ega.c b/sys/dev/isa/ega.c index fbfc9e92075..f0c4bb7448b 100644 --- a/sys/dev/isa/ega.c +++ b/sys/dev/isa/ega.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ega.c,v 1.7 2004/12/26 21:22:13 miod Exp $ */ +/* $OpenBSD: ega.c,v 1.8 2006/09/29 19:46:04 miod Exp $ */ /* $NetBSD: ega.c,v 1.4.4.1 2000/06/30 16:27:47 simonb Exp $ */ /* @@ -768,6 +768,7 @@ ega_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); |