Index: sys/dev/misc/syscons/scvgarndr.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/misc/syscons/scvgarndr.c,v
retrieving revision 1.17
diff -u -r1.17 scvgarndr.c
--- sys/dev/misc/syscons/scvgarndr.c	10 Aug 2008 19:45:01 -0000	1.17
+++ sys/dev/misc/syscons/scvgarndr.c	18 Sep 2008 21:12:10 -0000
@@ -57,7 +57,6 @@
 #endif
 
 #ifdef SC_PIXEL_MODE
-static vr_init_t		vga_rndrinit;
 static vr_draw_border_t		vga_pxlborder_direct;
 static vr_draw_border_t		vga_pxlborder_planar;
 static vr_draw_t		vga_vgadraw_direct;
@@ -83,7 +82,6 @@
 static void			vga_nop(scr_stat *scp, ...);
 
 static sc_rndr_sw_t txtrndrsw = {
-	(vr_init_t *)vga_nop,
 	vga_txtborder,
 	vga_txtdraw,	
 	vga_txtcursor_shape,
@@ -92,25 +90,34 @@
 	(vr_set_mouse_t *)vga_nop,
 	vga_txtmouse,
 };
-RENDERER(vga, 0, txtrndrsw, vga_set);
+RENDERER(vga, 0, V_INFO_MM_TEXT, txtrndrsw, vga_set);
 
 #ifdef SC_PIXEL_MODE
-static sc_rndr_sw_t vgarndrsw = {
-	vga_rndrinit,
-	(vr_draw_border_t *)vga_nop,
-	(vr_draw_t *)vga_nop,
+static sc_rndr_sw_t vgarndrsw_planar = {
+	vga_pxlborder_planar,
+	vga_vgadraw_planar,
 	vga_pxlcursor_shape,
-	(vr_draw_cursor_t *)vga_nop,
-	(vr_blink_cursor_t *)vga_nop,
+	vga_pxlcursor_planar,
+	vga_pxlblink_planar,
 	(vr_set_mouse_t *)vga_nop,
-	(vr_draw_mouse_t *)vga_nop,
+	vga_pxlmouse_planar,
 };
-RENDERER(vga, PIXEL_MODE, vgarndrsw, vga_set);
+RENDERER(vga, PIXEL_MODE, V_INFO_MM_PLANAR, vgarndrsw_planar, vga_set);
+
+static sc_rndr_sw_t vgarndrsw_direct = {
+	vga_pxlborder_direct,
+	vga_vgadraw_direct,
+	vga_pxlcursor_shape,
+	vga_pxlcursor_direct,
+	vga_pxlblink_direct,
+	(vr_set_mouse_t *)vga_nop,
+	vga_pxlmouse_direct,
+};
+RENDERER(vga, PIXEL_MODE, V_INFO_MM_DIRECT, vgarndrsw_direct, vga_set);
 #endif /* SC_PIXEL_MODE */
 
 #ifndef SC_NO_MODE_CHANGE
 static sc_rndr_sw_t grrndrsw = {
-	(vr_init_t *)vga_nop,
 	vga_grborder,
 	(vr_draw_t *)vga_nop,
 	(vr_set_cursor_t *)vga_nop,
@@ -119,7 +126,8 @@
 	(vr_set_mouse_t *)vga_nop,
 	(vr_draw_mouse_t *)vga_nop,
 };
-RENDERER(vga, GRAPHICS_MODE, grrndrsw, vga_set);
+RENDERER(vga, GRAPHICS_MODE, V_INFO_MM_PLANAR, grrndrsw, vga_set);
+RENDERER(vga, GRAPHICS_MODE, V_INFO_MM_DIRECT, grrndrsw, vga_set);
 #endif /* SC_NO_MODE_CHANGE */
 
 RENDERER_MODULE(vga, vga_set);
@@ -405,24 +413,6 @@
 /* pixel (raster text) mode renderer */
 
 static void
-vga_rndrinit(scr_stat *scp)
-{
-	if (scp->sc->adp->va_info.vi_mem_model == V_INFO_MM_PLANAR) {
-		scp->rndr->draw_border = vga_pxlborder_planar;
-		scp->rndr->draw = vga_vgadraw_planar;
-		scp->rndr->draw_cursor = vga_pxlcursor_planar;
-		scp->rndr->blink_cursor = vga_pxlblink_planar;
-		scp->rndr->draw_mouse = vga_pxlmouse_planar;
-	} else if (scp->sc->adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) {
-		scp->rndr->draw_border = vga_pxlborder_direct;
-		scp->rndr->draw = vga_vgadraw_direct;
-		scp->rndr->draw_cursor = vga_pxlcursor_direct;
-		scp->rndr->blink_cursor = vga_pxlblink_direct;
-		scp->rndr->draw_mouse = vga_pxlmouse_direct;
-	}
-}
-
-static void
 vga_pxlborder_direct(scr_stat *scp, int color)
 {
 	int i, x, y;
Index: sys/dev/misc/syscons/scvidctl.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/misc/syscons/scvidctl.c,v
retrieving revision 1.16
diff -u -r1.16 scvidctl.c
--- sys/dev/misc/syscons/scvidctl.c	19 Aug 2007 11:39:11 -0000	1.16
+++ sys/dev/misc/syscons/scvidctl.c	19 Sep 2008 08:57:28 -0000
@@ -103,7 +103,8 @@
 	return error;
     }
 
-    if (sc_render_match(scp, scp->sc->adp->va_name, 0) == NULL) {
+    if (sc_render_match(scp, scp->sc->adp->va_name, 0,
+	V_INFO_MM_TEXT) == NULL) {
 	crit_exit();
 	return ENODEV;
     }
@@ -181,7 +182,8 @@
 	return error;
     }
 
-    if (sc_render_match(scp, scp->sc->adp->va_name, GRAPHICS_MODE) == NULL) {
+    if (sc_render_match(scp, scp->sc->adp->va_name, GRAPHICS_MODE,
+	info.vi_mem_model) == NULL) {
 	crit_exit();
 	return ENODEV;
     }
@@ -314,7 +316,8 @@
 	return error;
     }
 
-    if (sc_render_match(scp, scp->sc->adp->va_name, PIXEL_MODE) == NULL) {
+    if (sc_render_match(scp, scp->sc->adp->va_name, PIXEL_MODE,
+	info.vi_mem_model) == NULL) {
 	crit_exit();
 	return ENODEV;
     }
@@ -620,7 +623,7 @@
 }
 
 sc_rndr_sw_t *
-sc_render_match(scr_stat *scp, char *name, int mode)
+sc_render_match(scr_stat *scp, char *name, int mode, int model)
 {
 	const sc_renderer_t **list;
 	const sc_renderer_t *p;
@@ -628,7 +631,8 @@
 	if (!LIST_EMPTY(&sc_rndr_list)) {
 		LIST_FOREACH(p, &sc_rndr_list, link) {
 			if ((strcmp(p->name, name) == 0)
-				&& (mode == p->mode)) {
+				&& (mode == p->mode)
+				&& ((model == p->model) || (model == V_INFO_MM_OTHER))) {
 				scp->status &=
 				    ~(VR_CURSOR_ON | VR_CURSOR_BLINK);
 				return p->rndrsw;
@@ -638,7 +642,8 @@
 		SET_FOREACH(list, scrndr_set) {
 			p = *list;
 			if ((strcmp(p->name, name) == 0)
-				&& (mode == p->mode)) {
+				&& (mode == p->mode)
+				&& ((model == p->model) || (model == V_INFO_MM_OTHER))) {
 				scp->status &=
 				    ~(VR_CURSOR_ON | VR_CURSOR_BLINK);
 				return p->rndrsw;
Index: sys/dev/misc/syscons/syscons.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/misc/syscons/syscons.c,v
retrieving revision 1.35
diff -u -r1.35 syscons.c
--- sys/dev/misc/syscons/syscons.c	10 Aug 2008 19:47:31 -0000	1.35
+++ sys/dev/misc/syscons/syscons.c	19 Sep 2008 08:51:18 -0000
@@ -2884,11 +2884,13 @@
     rndr = NULL;
     if (strcmp(sw->te_renderer, "*") != 0) {
 	rndr = sc_render_match(scp, sw->te_renderer,
-			       scp->status & (GRAPHICS_MODE | PIXEL_MODE));
+	    scp->status & (GRAPHICS_MODE | PIXEL_MODE),
+	    scp->sc->adp->va_info.vi_mem_model);
     }
     if (rndr == NULL) {
 	rndr = sc_render_match(scp, scp->sc->adp->va_name,
-			       scp->status & (GRAPHICS_MODE | PIXEL_MODE));
+	    scp->status & (GRAPHICS_MODE | PIXEL_MODE),
+	    scp->sc->adp->va_info.vi_mem_model);
 	if (rndr == NULL)
 	    return ENODEV;
     }
@@ -2896,7 +2898,6 @@
     if (sw == scp->tsw) {
 	error = (*sw->te_init)(scp, &scp->ts, SC_TE_WARM_INIT);
 	scp->rndr = rndr;
-	scp->rndr->init(scp);
 	sc_clear_screen(scp);
 	/* assert(error == 0); */
 	return error;
@@ -2917,7 +2918,6 @@
     scp->tsw = sw;
     scp->ts = p;
     scp->rndr = rndr;
-    scp->rndr->init(scp);
 
     /* XXX */
     (*sw->te_default_attr)(scp, user_default.std_color, user_default.rev_color);
@@ -3285,7 +3285,6 @@
 
     /* setup video hardware for the given mode */
     (*vidsw[scp->sc->adapter]->set_mode)(scp->sc->adp, scp->mode);
-    scp->rndr->init(scp);
     sc_vtb_init(&scp->scr, VTB_FRAMEBUFFER, scp->xsize, scp->ysize,
 		(void *)scp->sc->adp->va_window, FALSE);
 
Index: sys/dev/misc/syscons/syscons.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/misc/syscons/syscons.h,v
retrieving revision 1.21
diff -u -r1.21 syscons.h
--- sys/dev/misc/syscons/syscons.h	3 Aug 2008 03:00:21 -0000	1.21
+++ sys/dev/misc/syscons/syscons.h	18 Sep 2008 17:43:54 -0000
@@ -400,7 +400,6 @@
 		       SI_SUB_DRIVERS, SI_ORDER_MIDDLE)
 
 /* renderer function table */
-typedef void	vr_init_t(scr_stat *scp);
 typedef void	vr_draw_border_t(scr_stat *scp, int color);
 typedef void	vr_draw_t(scr_stat *scp, int from, int count, int flip);
 typedef void	vr_set_cursor_t(scr_stat *scp, int base, int height, int blink);
@@ -411,7 +410,6 @@
 typedef void	vr_draw_mouse_t(scr_stat *scp, int x, int y, int on);
 
 typedef struct sc_rndr_sw {
-	vr_init_t		*init;
 	vr_draw_border_t	*draw_border;
 	vr_draw_t		*draw;
 	vr_set_cursor_t		*set_cursor;
@@ -424,18 +422,19 @@
 typedef struct sc_renderer {
 	char			*name;
 	int			mode;
+	int			model;
 	sc_rndr_sw_t		*rndrsw;
 	LIST_ENTRY(sc_renderer)	link;
 } sc_renderer_t;
 
 extern struct linker_set scrndr_set;
 
-#define RENDERER(name, mode, sw, set)				\
-	static struct sc_renderer scrndr_##name##_##mode = {	\
-		#name, mode, &sw				\
+#define RENDERER(name, mode, model, sw, set)			\
+	static struct sc_renderer scrndr_##name##_##mode##_##model = { \
+		#name, mode, model, &sw				\
 	};							\
-	DATA_SET(scrndr_set, scrndr_##name##_##mode);		\
-	DATA_SET(set, scrndr_##name##_##mode)
+	DATA_SET(scrndr_set, scrndr_##name##_##mode##_##model);	\
+	DATA_SET(set, scrndr_##name##_##mode##_##model)
 
 #define RENDERER_MODULE(name, set)				\
 	SET_DECLARE(set, sc_renderer_t);			\
@@ -454,7 +453,7 @@
 			break;					\
 		case MOD_UNLOAD:				\
 			SET_FOREACH(list, set) {		\
-				error = sc_render_remove(*list);	\
+				error = sc_render_remove(*list); \
 				if (error)			\
 					break;			\
 			}					\
@@ -592,7 +591,8 @@
 
 int		sc_render_add(sc_renderer_t *rndr);
 int		sc_render_remove(sc_renderer_t *rndr);
-sc_rndr_sw_t	*sc_render_match(scr_stat *scp, char *name, int mode);
+sc_rndr_sw_t	*sc_render_match(scr_stat *scp, char *name, int mode,
+				 int model);
 
 /* scvtb.c */
 void		sc_vtb_init(sc_vtb_t *vtb, int type, int cols, int rows, 
