Module Name: src
Committed By: macallan
Date: Fri Jun 2 19:33:51 UTC 2017
Modified Files:
src/sys/dev/wscons: wsdisplay_vcons.c wsdisplay_vconsvar.h
Log Message:
- add a cookie to show_screen_cb()
- call show_screen_cb() when loading a font into a visible screen, so this can
be used to track parameters by drivers that use the glyph cache
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/wscons/wsdisplay_vcons.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/wscons/wsdisplay_vconsvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/wscons/wsdisplay_vcons.c
diff -u src/sys/dev/wscons/wsdisplay_vcons.c:1.37 src/sys/dev/wscons/wsdisplay_vcons.c:1.38
--- src/sys/dev/wscons/wsdisplay_vcons.c:1.37 Fri May 19 19:22:33 2017
+++ src/sys/dev/wscons/wsdisplay_vcons.c Fri Jun 2 19:33:51 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_vcons.c,v 1.37 2017/05/19 19:22:33 macallan Exp $ */
+/* $NetBSD: wsdisplay_vcons.c,v 1.38 2017/06/02 19:33:51 macallan Exp $ */
/*-
* Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.37 2017/05/19 19:22:33 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.38 2017/06/02 19:33:51 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -438,6 +438,11 @@ vcons_load_font(void *v, void *cookie, s
ri->ri_ops.copycols = vcons_copycols;
ri->ri_ops.copyrows = vcons_copyrows;
vcons_unlock(vd->active);
+
+ /* notify things that we're about to redraw */
+ if (vd->show_screen_cb != NULL)
+ vd->show_screen_cb(scr, vd->show_screen_cookie);
+
#ifdef VCONS_DRAW_INTR
/*
* XXX
@@ -515,7 +520,7 @@ vcons_do_switch(void *arg)
#endif
if (vd->show_screen_cb != NULL)
- vd->show_screen_cb(scr);
+ vd->show_screen_cb(scr, vd->show_screen_cookie);
if ((scr->scr_flags & VCONS_NO_REDRAW) == 0)
vcons_redraw_screen(scr);
@@ -1505,7 +1510,7 @@ vcons_hard_switch(struct vcons_screen *s
vd->wanted = NULL;
if (vd->show_screen_cb != NULL)
- vd->show_screen_cb(scr);
+ vd->show_screen_cb(scr, vd->show_screen_cookie);
}
#ifdef VCONS_DRAW_INTR
Index: src/sys/dev/wscons/wsdisplay_vconsvar.h
diff -u src/sys/dev/wscons/wsdisplay_vconsvar.h:1.25 src/sys/dev/wscons/wsdisplay_vconsvar.h:1.26
--- src/sys/dev/wscons/wsdisplay_vconsvar.h:1.25 Fri May 19 19:22:33 2017
+++ src/sys/dev/wscons/wsdisplay_vconsvar.h Fri Jun 2 19:33:51 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_vconsvar.h,v 1.25 2017/05/19 19:22:33 macallan Exp $ */
+/* $NetBSD: wsdisplay_vconsvar.h,v 1.26 2017/06/02 19:33:51 macallan Exp $ */
/*-
* Copyright (c) 2005, 2006 Michael Lorenz
@@ -116,7 +116,8 @@ struct vcons_data {
void (*eraserows)(void *, int, int, long);
void (*cursor)(void *, int, int, int);
/* called before vcons_redraw_screen */
- void (*show_screen_cb)(struct vcons_screen *);
+ void *show_screen_cookie;
+ void (*show_screen_cb)(struct vcons_screen *, void *);
/* virtual screen management stuff */
void (*switch_cb)(void *, int, int);
void *switch_cb_arg;