summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/scgfbrndr.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2007-06-18 22:15:17 +0000
committermarius <marius@FreeBSD.org>2007-06-18 22:15:17 +0000
commit80914db2fcb1f7e79fa76e74696f8bb9bd90ec76 (patch)
tree2ff600b653d6d433fae853f21ac5b7c8dd93bcb3 /sys/dev/syscons/scgfbrndr.c
parentef68a809b7e95e2e282dc724412946628ba3f050 (diff)
downloadFreeBSD-src-80914db2fcb1f7e79fa76e74696f8bb9bd90ec76.zip
FreeBSD-src-80914db2fcb1f7e79fa76e74696f8bb9bd90ec76.tar.gz
According to the default font size on sparc64 provide a 12 x 22
mouse pointer instead of a 8 x 16 one so device drivers don't need to bring there own one there and in gfb_mouse() (ab)use the pixel_mask argument of putm() to pass along on/off info as erasing the mouse cursor image by redrawing the text underneath doesn't work as we use hardware cursors on sparc64.
Diffstat (limited to 'sys/dev/syscons/scgfbrndr.c')
-rw-r--r--sys/dev/syscons/scgfbrndr.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/sys/dev/syscons/scgfbrndr.c b/sys/dev/syscons/scgfbrndr.c
index fa522f8..bca5ad6 100644
--- a/sys/dev/syscons/scgfbrndr.c
+++ b/sys/dev/syscons/scgfbrndr.c
@@ -105,12 +105,38 @@ sc_rndr_sw_t grrndrsw = {
#endif /* SC_NO_MODE_CHANGE */
#ifndef SC_NO_CUTPASTE
-
+#ifdef __sparc64__
+static u_char mouse_pointer[22 * 2] = {
+ 0x00, 0x00, /* ............ */
+ 0x80, 0x00, /* *........... */
+ 0xc0, 0x00, /* **.......... */
+ 0xe0, 0x00, /* ***......... */
+ 0xf0, 0x00, /* ****........ */
+ 0xf8, 0x00, /* *****....... */
+ 0xfc, 0x00, /* ******...... */
+ 0xfe, 0x00, /* *******..... */
+ 0xff, 0x00, /* ********.... */
+ 0xff, 0x80, /* *********... */
+ 0xfc, 0xc0, /* ******..**.. */
+ 0xdc, 0x00, /* **.***...... */
+ 0x8e, 0x00, /* *...***..... */
+ 0x0e, 0x00, /* ....***..... */
+ 0x07, 0x00, /* .....***.... */
+ 0x04, 0x00, /* .....*...... */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00, /* ............ */
+ 0x00, 0x00 /* ............ */
+};
+#else
static u_char mouse_pointer[16] = {
0x00, 0x40, 0x60, 0x70, 0x78, 0x7c, 0x7e, 0x68,
0x0c, 0x0c, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00
};
#endif
+#endif
static void
gfb_nop(scr_stat *scp)
@@ -317,6 +343,10 @@ gfb_blink(scr_stat *scp, int at, int flip)
static void
gfb_mouse(scr_stat *scp, int x, int y, int on)
{
+#ifdef __sparc64__
+ (*vidsw[scp->sc->adapter]->putm)(scp->sc->adp, x, y,
+ mouse_pointer, on ? 0xffffffff : 0x0, 22, 12);
+#else
int i, pos;
if (on) {
@@ -337,6 +367,7 @@ gfb_mouse(scr_stat *scp, int x, int y, int on)
if (x < scp->ysize - 1)
(*scp->rndr->draw)(scp, pos + scp->xsize, i, FALSE);
}
+#endif
}
#endif /* SC_NO_CUTPASTE */
OpenPOWER on IntegriCloud