Remove the getwschar and putwschar accessops from wsdisplay drivers as
requested by uwe@. These were wrong because they were receiving an emulcookie yet they were accessops (thus having to receive an accesscookie). Instead, just handle the WSDISPLAYIO_{GET,PUT}WSCHAR ioctls from the driver's ioctl accessop. As this reduces the amount of code needed to handle these operations to two small functions in each driver, remove the WSDISPLAY_CHARFUNCS kernel option. Reviewed by, at least, uwe@ and macallan@. No objections in tech-kern@.
This commit is contained in:
parent
d4449c8a4e
commit
aec18036fd
@ -1,4 +1,4 @@
|
||||
# $NetBSD: GENERIC,v 1.91 2006/04/12 03:41:51 martti Exp $
|
||||
# $NetBSD: GENERIC,v 1.92 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# GENERIC machine description file
|
||||
#
|
||||
@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64"
|
||||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "GENERIC-$Revision: 1.91 $"
|
||||
#ident "GENERIC-$Revision: 1.92 $"
|
||||
|
||||
maxusers 32 # estimated number of users
|
||||
|
||||
@ -211,10 +211,6 @@ options PCDISPLAY_SOFTCURSOR
|
||||
#options VGA_CONSOLE_SCREENTYPE="\"80x24\""
|
||||
# work around a hardware bug that loaded fonts don't work; found on ATI cards
|
||||
#options VGA_CONSOLE_ATI_BROKEN_FONTSEL
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
# console scrolling support.
|
||||
options WSDISPLAY_SCROLLSUPPORT
|
||||
# enable VGA raster mode capable of displaying multilingual text on console
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: INSTALL,v 1.50 2006/04/12 03:41:51 martti Exp $
|
||||
# $NetBSD: INSTALL,v 1.51 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# GENERIC machine description file
|
||||
#
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
include "arch/amd64/conf/std.amd64"
|
||||
|
||||
#ident "INSTALL-$Revision: 1.50 $"
|
||||
#ident "INSTALL-$Revision: 1.51 $"
|
||||
|
||||
maxusers 32 # estimated number of users
|
||||
|
||||
@ -149,10 +149,6 @@ options PCDISPLAY_SOFTCURSOR
|
||||
#options VGA_CONSOLE_SCREENTYPE="\"80x24\""
|
||||
# work around a hardware bug that loaded fonts don't work; found on ATI cards
|
||||
#options VGA_CONSOLE_ATI_BROKEN_FONTSEL
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
# enable VGA raster mode capable of displaying multilingual text on console
|
||||
#options VGA_RASTERCONSOLE
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vidcvideo.c,v 1.22 2006/04/12 19:38:22 jmmv Exp $ */
|
||||
/* $NetBSD: vidcvideo.c,v 1.23 2006/04/15 17:48:23 jmmv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Reinoud Zandijk
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: vidcvideo.c,v 1.22 2006/04/12 19:38:22 jmmv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vidcvideo.c,v 1.23 2006/04/15 17:48:23 jmmv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -182,9 +182,7 @@ static const struct wsdisplay_accessops vidcvideo_accessops = {
|
||||
vidcvideo_free_screen,
|
||||
vidcvideo_show_screen,
|
||||
NULL, /* load_font */
|
||||
NULL, /* pollc */
|
||||
NULL, /* getwschar */
|
||||
NULL /* putwschar */
|
||||
NULL /* pollc */
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: GENERIC,v 1.103 2006/03/28 20:58:39 pavel Exp $
|
||||
# $NetBSD: GENERIC,v 1.104 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# GENERIC machine description file
|
||||
#
|
||||
@ -188,10 +188,6 @@ options WSDISPLAY_COMPAT_USL # VT handling
|
||||
options WSDISPLAY_COMPAT_RAWKBD # can get raw scancodes
|
||||
# see dev/wscons/wskbdmap_mfii.h for implemented layouts
|
||||
#options PCKBD_LAYOUT="(KB_DE | KB_NODEAD)"
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
|
||||
# Development and Debugging options
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: ARMADILLO9,v 1.10 2006/02/13 12:24:22 hamajima Exp $
|
||||
# $NetBSD: ARMADILLO9,v 1.11 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# ARMADILLO9 -- Atmark Techno, Armadillo-9
|
||||
#
|
||||
@ -342,10 +342,6 @@ options WSEMUL_VT100 # VT100 / VT220 emulation
|
||||
#options VGA_CONSOLE_SCREENTYPE="\"80x24\""
|
||||
# work around a hardware bug that loaded fonts don't work; found on ATI cards
|
||||
#options VGA_CONSOLE_ATI_BROKEN_FONTSEL
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
# console scrolling support.
|
||||
#options WSDISPLAY_SCROLLSUPPORT
|
||||
# enable VGA raster mode capable of displaying multilingual text on console
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: TS7200,v 1.25 2006/02/05 05:01:49 cube Exp $
|
||||
# $NetBSD: TS7200,v 1.26 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# GENERIC -- Generic kernel
|
||||
#
|
||||
@ -479,10 +479,6 @@ options WSEMUL_VT100 # VT100 / VT220 emulation
|
||||
#options VGA_CONSOLE_SCREENTYPE="\"80x24\""
|
||||
# work around a hardware bug that loaded fonts don't work; found on ATI cards
|
||||
#options VGA_CONSOLE_ATI_BROKEN_FONTSEL
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
# console scrolling support.
|
||||
#options WSDISPLAY_SCROLLSUPPORT
|
||||
# enable VGA raster mode capable of displaying multilingual text on console
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: GENERIC,v 1.64 2006/03/28 20:58:40 pavel Exp $
|
||||
# $NetBSD: GENERIC,v 1.65 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# GENERIC machine description file
|
||||
#
|
||||
@ -23,7 +23,7 @@ include "arch/hp700/conf/std.hp700"
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
|
||||
|
||||
#ident "GENERIC-$Revision: 1.64 $"
|
||||
#ident "GENERIC-$Revision: 1.65 $"
|
||||
|
||||
maxusers 32 # estimated number of users
|
||||
|
||||
@ -205,10 +205,6 @@ options PCDISPLAY_SOFTCURSOR
|
||||
#options VGA_CONSOLE_SCREENTYPE="\"80x24\""
|
||||
# work around a hardware bug that loaded fonts don't work; found on ATI cards
|
||||
#options VGA_CONSOLE_ATI_BROKEN_FONTSEL
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
# console scrolling support.
|
||||
#options WSDISPLAY_SCROLLSUPPORT
|
||||
# enable VGA raster mode capable of displaying multilingual text on console
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: GENERIC,v 1.742 2006/04/13 00:30:19 christos Exp $
|
||||
# $NetBSD: GENERIC,v 1.743 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# GENERIC machine description file
|
||||
#
|
||||
@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386"
|
||||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "GENERIC-$Revision: 1.742 $"
|
||||
#ident "GENERIC-$Revision: 1.743 $"
|
||||
|
||||
maxusers 32 # estimated number of users
|
||||
|
||||
@ -276,10 +276,6 @@ options PCDISPLAY_SOFTCURSOR
|
||||
#options VGA_CONSOLE_SCREENTYPE="\"80x24\""
|
||||
# work around a hardware bug that loaded fonts don't work; found on ATI cards
|
||||
#options VGA_CONSOLE_ATI_BROKEN_FONTSEL
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
# console scrolling support.
|
||||
options WSDISPLAY_SCROLLSUPPORT
|
||||
# enable VGA raster mode capable of displaying multilingual text on console
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: LAMB,v 1.62 2006/03/28 20:58:40 pavel Exp $
|
||||
# $NetBSD: LAMB,v 1.63 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# LAMB - a complete kernel for wildlab LAMB, http://www.wildlab.com/
|
||||
#
|
||||
@ -200,10 +200,6 @@ options PCDISPLAY_SOFTCURSOR
|
||||
#options VGA_CONSOLE_SCREENTYPE="\"80x24\""
|
||||
# work around a hardware bug that loaded fonts don't work; found on ATI cards
|
||||
#options VGA_CONSOLE_ATI_BROKEN_FONTSEL
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
|
||||
# Kernel root file system and dump configuration.
|
||||
config netbsd root on ? type ?
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: VIRTUALPC,v 1.39 2006/03/28 20:58:40 pavel Exp $
|
||||
# $NetBSD: VIRTUALPC,v 1.40 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# VIRTUALPC machine description file --
|
||||
#
|
||||
@ -11,7 +11,7 @@ include "arch/i386/conf/std.i386"
|
||||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "VIRTUALPC-$Revision: 1.39 $"
|
||||
#ident "VIRTUALPC-$Revision: 1.40 $"
|
||||
|
||||
maxusers 32 # estimated number of users
|
||||
|
||||
@ -234,10 +234,6 @@ options PCDISPLAY_SOFTCURSOR
|
||||
#options VGA_CONSOLE_SCREENTYPE="\"80x24\""
|
||||
# work around a hardware bug that loaded fonts don't work; found on ATI cards
|
||||
#options VGA_CONSOLE_ATI_BROKEN_FONTSEL
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
# enable VGA raster mode capable of displaying multilingual text on console
|
||||
#options VGA_RASTERCONSOLE
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: GENERIC32_IP2x,v 1.47 2006/03/28 20:58:41 pavel Exp $
|
||||
# $NetBSD: GENERIC32_IP2x,v 1.48 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# GENERIC32_IP2x machine description file
|
||||
#
|
||||
@ -29,7 +29,7 @@ makeoptions TEXTADDR=0x88069000 # entry point
|
||||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "GENERIC32-IP2x-$Revision: 1.47 $"
|
||||
#ident "GENERIC32-IP2x-$Revision: 1.48 $"
|
||||
|
||||
maxusers 32
|
||||
|
||||
@ -192,10 +192,6 @@ options WS_KERNEL_FG=WSCOL_GREEN
|
||||
options WSDISPLAY_COMPAT_RAWKBD # can get raw scancodes
|
||||
# see dev/pckbc/wskbdmap_mfii.c for implemented layouts
|
||||
#options PCKBD_LAYOUT="(KB_DE | KB_NODEAD)"
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
|
||||
|
||||
# Kernel root file system and dump configuration.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: GENERIC,v 1.60 2006/03/28 20:58:41 pavel Exp $
|
||||
# $NetBSD: GENERIC,v 1.61 2006/04/15 17:48:23 jmmv Exp $
|
||||
#
|
||||
# Generic Shark configuration.
|
||||
#
|
||||
@ -7,7 +7,7 @@ include "arch/shark/conf/std.shark"
|
||||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "GENERIC-$Revision: 1.60 $"
|
||||
#ident "GENERIC-$Revision: 1.61 $"
|
||||
|
||||
# estimated number of users
|
||||
maxusers 32
|
||||
@ -207,10 +207,6 @@ options WSDISPLAY_COMPAT_RAWKBD # can get raw scancodes
|
||||
#options PCDISPLAY_SOFTCURSOR
|
||||
# modify the screen type of the console; defaults to "80x25"
|
||||
#options VGA_CONSOLE_SCREENTYPE="\"80x24\""
|
||||
# the following enables some functions to get mouse console support.
|
||||
# if you want a really secure system, it may be better not to enable them,
|
||||
# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
|
||||
#options WSDISPLAY_CHARFUNCS # mouse console support
|
||||
# console scrolling support.
|
||||
#options WSDISPLAY_SCROLLSUPPORT
|
||||
# enable VGA raster mode capable of displaying multilingual text on console
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffb.c,v 1.25 2006/04/12 20:22:00 macallan Exp $ */
|
||||
/* $NetBSD: ffb.c,v 1.26 2006/04/15 17:48:23 jmmv Exp $ */
|
||||
/* $OpenBSD: creator.c,v 1.20 2002/07/30 19:48:15 jason Exp $ */
|
||||
|
||||
/*
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.25 2006/04/12 20:22:00 macallan Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.26 2006/04/15 17:48:23 jmmv Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -136,8 +136,6 @@ struct wsdisplay_accessops ffb_accessops = {
|
||||
ffb_show_screen,
|
||||
NULL, /* load font */
|
||||
NULL, /* pollc */
|
||||
NULL, /* getwschar */
|
||||
NULL, /* putwschar */
|
||||
NULL, /* scroll */
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcdisplay_subr.c,v 1.31 2006/04/12 20:08:20 jmmv Exp $ */
|
||||
/* $NetBSD: pcdisplay_subr.c,v 1.32 2006/04/15 17:48:23 jmmv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -28,9 +28,8 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pcdisplay_subr.c,v 1.31 2006/04/12 20:08:20 jmmv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pcdisplay_subr.c,v 1.32 2006/04/15 17:48:23 jmmv Exp $");
|
||||
|
||||
#include "opt_wsdisplay_compat.h" /* for WSDISPLAY_CHARFUNCS */
|
||||
#include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -291,15 +290,15 @@ pcdisplay_replaceattr(void *id, long oldattr, long newattr)
|
||||
}
|
||||
#endif /* WSDISPLAY_CUSTOM_OUTPUT */
|
||||
|
||||
#ifdef WSDISPLAY_CHARFUNCS
|
||||
int
|
||||
pcdisplay_getwschar(void *id, struct wsdisplay_char *wschar)
|
||||
pcdisplay_getwschar(struct pcdisplayscreen *scr, struct wsdisplay_char *wschar)
|
||||
{
|
||||
struct pcdisplayscreen *scr = id;
|
||||
int off;
|
||||
uint16_t chardata;
|
||||
uint8_t attrbyte;
|
||||
|
||||
KASSERT(scr != NULL && wschar != NULL);
|
||||
|
||||
off = wschar->row * scr->type->ncols + wschar->col;
|
||||
if (off >= scr->type->ncols * scr->type->nrows)
|
||||
return -1;
|
||||
@ -322,13 +321,14 @@ pcdisplay_getwschar(void *id, struct wsdisplay_char *wschar)
|
||||
}
|
||||
|
||||
int
|
||||
pcdisplay_putwschar(void *id, struct wsdisplay_char *wschar)
|
||||
pcdisplay_putwschar(struct pcdisplayscreen *scr, struct wsdisplay_char *wschar)
|
||||
{
|
||||
struct pcdisplayscreen *scr = id;
|
||||
int off;
|
||||
uint16_t chardata;
|
||||
uint8_t attrbyte;
|
||||
|
||||
KASSERT(scr != NULL && wschar != NULL);
|
||||
|
||||
off = wschar->row * scr->type->ncols + wschar->col;
|
||||
if (off >= (scr->type->ncols * scr->type->nrows))
|
||||
return -1;
|
||||
@ -348,4 +348,3 @@ pcdisplay_putwschar(void *id, struct wsdisplay_char *wschar)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* WSDISPLAY_CHARFUNCS */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcdisplayvar.h,v 1.16 2006/02/16 20:17:16 perry Exp $ */
|
||||
/* $NetBSD: pcdisplayvar.h,v 1.17 2006/04/15 17:48:23 jmmv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998
|
||||
@ -90,5 +90,5 @@ void pcdisplay_copyrows(void *, int, int, int);
|
||||
void pcdisplay_eraserows(void *, int, int, long);
|
||||
void pcdisplay_replaceattr(void *, long, long);
|
||||
struct wsdisplay_char;
|
||||
int pcdisplay_getwschar(void *, struct wsdisplay_char *);
|
||||
int pcdisplay_putwschar(void *, struct wsdisplay_char *);
|
||||
int pcdisplay_getwschar(struct pcdisplayscreen *, struct wsdisplay_char *);
|
||||
int pcdisplay_putwschar(struct pcdisplayscreen *, struct wsdisplay_char *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vga.c,v 1.86 2006/04/12 19:38:23 jmmv Exp $ */
|
||||
/* $NetBSD: vga.c,v 1.87 2006/04/15 17:48:23 jmmv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -27,7 +27,7 @@
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
|
||||
/* for WSCONS_SUPPORT_PCVTFONTS and WSDISPLAY_CHARFUNCS */
|
||||
/* for WSCONS_SUPPORT_PCVTFONTS */
|
||||
#include "opt_wsdisplay_compat.h"
|
||||
/* for WSDISPLAY_CUSTOM_BORDER */
|
||||
#include "opt_wsdisplay_border.h"
|
||||
@ -35,7 +35,7 @@
|
||||
#include "opt_wsmsgattrs.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.86 2006/04/12 19:38:23 jmmv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.87 2006/04/15 17:48:23 jmmv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -274,10 +274,6 @@ static void vga_free_screen(void *, void *);
|
||||
static int vga_show_screen(void *, void *, int,
|
||||
void (*)(void *, int, int), void *);
|
||||
static int vga_load_font(void *, void *, struct wsdisplay_font *);
|
||||
#ifdef WSDISPLAY_CHARFUNCS
|
||||
static int vga_getwschar(void *, struct wsdisplay_char *);
|
||||
static int vga_putwschar(void *, struct wsdisplay_char *);
|
||||
#endif /* WSDISPLAY_CHARFUNCS */
|
||||
#ifdef WSDISPLAY_CUSTOM_BORDER
|
||||
static int vga_getborder(struct vga_config *, u_int *);
|
||||
static int vga_setborder(struct vga_config *, u_int);
|
||||
@ -293,13 +289,6 @@ const struct wsdisplay_accessops vga_accessops = {
|
||||
vga_show_screen,
|
||||
vga_load_font,
|
||||
NULL,
|
||||
#ifdef WSDISPLAY_CHARFUNCS
|
||||
vga_getwschar,
|
||||
vga_putwschar,
|
||||
#else /* WSDISPLAY_CHARFUNCS */
|
||||
NULL,
|
||||
NULL,
|
||||
#endif /* WSDISPLAY_CHARFUNCS */
|
||||
#ifdef WSDISPLAY_SCROLLSUPPORT
|
||||
vga_scroll,
|
||||
#else
|
||||
@ -771,6 +760,7 @@ int
|
||||
vga_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
{
|
||||
struct vga_config *vc = v;
|
||||
struct vgascreen *scr = vs;
|
||||
const struct vga_funcs *vf = vc->vc_funcs;
|
||||
|
||||
switch (cmd) {
|
||||
@ -791,6 +781,16 @@ vga_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
vga_set_video(vc, *(int *)data == WSDISPLAYIO_VIDEO_ON);
|
||||
return 0;
|
||||
|
||||
case WSDISPLAYIO_GETWSCHAR:
|
||||
KASSERT(scr != NULL);
|
||||
return pcdisplay_getwschar(&scr->pcs,
|
||||
(struct wsdisplay_char *)data);
|
||||
|
||||
case WSDISPLAYIO_PUTWSCHAR:
|
||||
KASSERT(scr != NULL);
|
||||
return pcdisplay_putwschar(&scr->pcs,
|
||||
(struct wsdisplay_char *)data);
|
||||
|
||||
#ifdef WSDISPLAY_CUSTOM_BORDER
|
||||
case WSDISPLAYIO_GBORDER:
|
||||
return (vga_getborder(vc, (u_int *)data));
|
||||
@ -1417,27 +1417,6 @@ vga_putchar(void *c, int row, int col, u_int uc, long attr)
|
||||
pcdisplay_putchar(c, row, col, uc, attr);
|
||||
}
|
||||
|
||||
|
||||
#ifdef WSDISPLAY_CHARFUNCS
|
||||
int
|
||||
vga_getwschar(void *cookie, struct wsdisplay_char *wschar)
|
||||
{
|
||||
struct vgascreen *scr = cookie;
|
||||
|
||||
if (scr == NULL) return 0;
|
||||
return (pcdisplay_getwschar(&scr->pcs, wschar));
|
||||
}
|
||||
|
||||
int
|
||||
vga_putwschar(void *cookie, struct wsdisplay_char *wschar)
|
||||
{
|
||||
struct vgascreen *scr = cookie;
|
||||
|
||||
if (scr == NULL) return 0;
|
||||
return (pcdisplay_putwschar(&scr->pcs, wschar));
|
||||
}
|
||||
#endif /* WSDISPLAY_CHARFUNCS */
|
||||
|
||||
#ifdef WSDISPLAY_CUSTOM_BORDER
|
||||
static int
|
||||
vga_getborder(struct vga_config *vc, u_int *valuep)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machfb.c,v 1.41 2006/04/12 20:35:42 macallan Exp $ */
|
||||
/* $NetBSD: machfb.c,v 1.42 2006/04/15 17:48:23 jmmv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Bang Jun-Young
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0,
|
||||
"$NetBSD: machfb.c,v 1.41 2006/04/12 20:35:42 macallan Exp $");
|
||||
"$NetBSD: machfb.c,v 1.42 2006/04/15 17:48:23 jmmv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -382,8 +382,6 @@ static struct wsdisplay_accessops mach64_accessops = {
|
||||
NULL, /* vcons_show_screen */
|
||||
NULL, /* load_font */
|
||||
NULL, /* polls */
|
||||
NULL, /* getwschar */
|
||||
NULL, /* putwschar */
|
||||
NULL, /* scroll */
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: voodoofb.c,v 1.3 2006/04/12 23:11:56 macallan Exp $ */
|
||||
/* $NetBSD: voodoofb.c,v 1.4 2006/04/15 17:48:23 jmmv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005, 2006 Michael Lorenz
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.3 2006/04/12 23:11:56 macallan Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.4 2006/04/15 17:48:23 jmmv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -198,8 +198,6 @@ struct wsdisplay_accessops voodoofb_accessops = {
|
||||
voodoofb_mmap,
|
||||
NULL, /* load_font */
|
||||
NULL, /* polls */
|
||||
NULL, /* getwschar */
|
||||
NULL, /* putwschar */
|
||||
NULL, /* scroll */
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: p9100.c,v 1.31 2006/04/12 19:38:24 jmmv Exp $ */
|
||||
/* $NetBSD: p9100.c,v 1.32 2006/04/15 17:48:23 jmmv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
|
||||
@ -45,7 +45,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.31 2006/04/12 19:38:24 jmmv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.32 2006/04/15 17:48:23 jmmv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -250,8 +250,6 @@ struct wsdisplay_accessops p9100_accessops = {
|
||||
NULL, /* vcons_show_screen */
|
||||
NULL, /* load_font */
|
||||
NULL, /* polls */
|
||||
NULL, /* getwschar */
|
||||
NULL, /* putwschar */
|
||||
NULL, /* scroll */
|
||||
};
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cgsix.c,v 1.30 2006/04/12 19:38:24 jmmv Exp $ */
|
||||
/* $NetBSD: cgsix.c,v 1.31 2006/04/15 17:48:24 jmmv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -85,7 +85,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.30 2006/04/12 19:38:24 jmmv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.31 2006/04/15 17:48:24 jmmv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -192,8 +192,6 @@ struct wsdisplay_accessops cgsix_accessops = {
|
||||
cgsix_show_screen,
|
||||
NULL, /* load_font */
|
||||
NULL, /* pollc */
|
||||
NULL, /* getwschar */
|
||||
NULL, /* putwschar */
|
||||
NULL /* scroll */
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files.wscons,v 1.37 2006/02/23 08:01:59 macallan Exp $
|
||||
# $NetBSD: files.wscons,v 1.38 2006/04/15 17:48:24 jmmv Exp $
|
||||
|
||||
#
|
||||
# "Workstation Console" glue; attaches frame buffer to emulator & keyboard,
|
||||
@ -27,7 +27,6 @@ defparam opt_wsemul.h WSEMUL_VT100_HILIT_FG WSEMUL_VT100_UNDERLINE_FG
|
||||
defflag opt_wsdisplay_compat.h WSDISPLAY_COMPAT_USL
|
||||
WSDISPLAY_COMPAT_RAWKBD
|
||||
WSDISPLAY_COMPAT_PCVT WSDISPLAY_COMPAT_SYSCONS
|
||||
WSDISPLAY_CHARFUNCS
|
||||
WSCONS_SUPPORT_PCVTFONTS
|
||||
WSCONS_SUPPORT_ISO7FONTS
|
||||
WSDISPLAY_SCROLLSUPPORT
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wsdisplay.c,v 1.96 2006/04/13 01:15:27 macallan Exp $ */
|
||||
/* $NetBSD: wsdisplay.c,v 1.97 2006/04/15 17:48:24 jmmv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.96 2006/04/13 01:15:27 macallan Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.97 2006/04/15 17:48:24 jmmv Exp $");
|
||||
|
||||
#include "opt_wsdisplay_compat.h"
|
||||
#include "opt_wsmsgattrs.h"
|
||||
@ -1134,28 +1134,6 @@ wsdisplay_internal_ioctl(struct wsdisplay_softc *sc, struct wsscreen *scr,
|
||||
return (error);
|
||||
#undef d
|
||||
|
||||
#if defined(WSDISPLAY_CHARFUNCS)
|
||||
case WSDISPLAYIO_GETWSCHAR:
|
||||
#define d ((struct wsdisplay_char *)data)
|
||||
if (!sc->sc_accessops->getwschar)
|
||||
return (EINVAL);
|
||||
return ((*sc->sc_accessops->getwschar)
|
||||
(scr->scr_dconf->emulcookie, d));
|
||||
#undef d
|
||||
|
||||
case WSDISPLAYIO_PUTWSCHAR:
|
||||
#define d ((struct wsdisplay_char *)data)
|
||||
if (!sc->sc_accessops->putwschar)
|
||||
return (EINVAL);
|
||||
return ((*sc->sc_accessops->putwschar)
|
||||
(scr->scr_dconf->emulcookie, d));
|
||||
#undef d
|
||||
#else
|
||||
case WSDISPLAYIO_PUTWSCHAR:
|
||||
case WSDISPLAYIO_GETWSCHAR:
|
||||
return ENODEV;
|
||||
#endif /* WSDISPLAY_CHARFUNCS */
|
||||
|
||||
#ifdef WSDISPLAY_CUSTOM_OUTPUT
|
||||
case WSDISPLAYIO_GMSGATTRS:
|
||||
#define d ((struct wsdisplay_msgattrs *)data)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wsdisplay_vcons.c,v 1.5 2006/02/19 03:51:03 macallan Exp $ */
|
||||
/* $NetBSD: wsdisplay_vcons.c,v 1.6 2006/04/15 17:48:24 jmmv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005, 2006 Michael Lorenz
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.5 2006/02/19 03:51:03 macallan Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.6 2006/04/15 17:48:24 jmmv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -60,6 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.5 2006/02/19 03:51:03 macallan
|
||||
static void vcons_dummy_init_screen(void *, struct vcons_screen *, int,
|
||||
long *);
|
||||
|
||||
static int vcons_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *);
|
||||
static int vcons_alloc_screen(void *, const struct wsscreen_descr *, void **,
|
||||
int *, int *, long *);
|
||||
static void vcons_free_screen(void *, void *);
|
||||
@ -87,8 +88,8 @@ static void vcons_putchar(void *, int, int, u_int, long);
|
||||
static void vcons_cursor(void *, int, int, int);
|
||||
|
||||
/* support for readin/writing text buffers. For wsmoused */
|
||||
static int vcons_putwschar(void *, struct wsdisplay_char *);
|
||||
static int vcons_getwschar(void *, struct wsdisplay_char *);
|
||||
static int vcons_putwschar(struct vcons_screen *, struct wsdisplay_char *);
|
||||
static int vcons_getwschar(struct vcons_screen *, struct wsdisplay_char *);
|
||||
|
||||
static void vcons_lock(struct vcons_screen *);
|
||||
static void vcons_unlock(struct vcons_screen *);
|
||||
@ -107,11 +108,15 @@ vcons_init(struct vcons_data *vd, void *cookie, struct wsscreen_descr *def,
|
||||
vd->init_screen = vcons_dummy_init_screen;
|
||||
vd->show_screen_cb = NULL;
|
||||
|
||||
/* keep a copy of the accessops that we replace below with our
|
||||
* own wrappers */
|
||||
vd->ioctl = ao->ioctl;
|
||||
|
||||
/* configure the accessops */
|
||||
ao->ioctl = vcons_ioctl;
|
||||
ao->alloc_screen = vcons_alloc_screen;
|
||||
ao->free_screen = vcons_free_screen;
|
||||
ao->show_screen = vcons_show_screen;
|
||||
ao->getwschar = vcons_getwschar;
|
||||
ao->putwschar = vcons_putwschar;
|
||||
|
||||
LIST_INIT(&vd->screens);
|
||||
vd->active = NULL;
|
||||
@ -360,6 +365,34 @@ vcons_redraw_screen(struct vcons_screen *scr)
|
||||
vcons_unlock(scr);
|
||||
}
|
||||
|
||||
static int
|
||||
vcons_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag,
|
||||
struct lwp *l)
|
||||
{
|
||||
struct vcons_data *vd = v;
|
||||
int error;
|
||||
|
||||
switch (cmd) {
|
||||
case WSDISPLAYIO_GETWSCHAR:
|
||||
error = vcons_getwschar((struct vcons_screen *)vs,
|
||||
(struct wsdisplay_char *)data);
|
||||
break;
|
||||
|
||||
case WSDISPLAYIO_PUTWSCHAR:
|
||||
error = vcons_putwschar((struct vcons_screen *)vs,
|
||||
(struct wsdisplay_char *)data);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (vd->ioctl != NULL)
|
||||
error = (*vd->ioctl)(v, vs, cmd, data, flag, l);
|
||||
else
|
||||
error = EPASSTHROUGH;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
static int
|
||||
vcons_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
|
||||
int *curxp, int *curyp, long *defattrp)
|
||||
@ -622,10 +655,14 @@ vcons_cursor(void *cookie, int on, int row, int col)
|
||||
/* methods to read/write characters via ioctl() */
|
||||
|
||||
static int
|
||||
vcons_putwschar(void *cookie, struct wsdisplay_char *wsc)
|
||||
vcons_putwschar(struct vcons_screen *scr, struct wsdisplay_char *wsc)
|
||||
{
|
||||
struct rasops_info *ri = cookie;
|
||||
long attr;
|
||||
struct rasops_info *ri;
|
||||
|
||||
KASSERT(scr != NULL && wsc != NULL);
|
||||
|
||||
ri = &scr->scr_ri;
|
||||
|
||||
ri->ri_ops.allocattr(ri, wsc->foreground, wsc->background,
|
||||
wsc->flags, &attr);
|
||||
@ -634,13 +671,16 @@ vcons_putwschar(void *cookie, struct wsdisplay_char *wsc)
|
||||
}
|
||||
|
||||
static int
|
||||
vcons_getwschar(void *cookie, struct wsdisplay_char *wsc)
|
||||
vcons_getwschar(struct vcons_screen *scr, struct wsdisplay_char *wsc)
|
||||
{
|
||||
struct rasops_info *ri = cookie;
|
||||
struct vcons_screen *scr = ri->ri_hw;
|
||||
int offset;
|
||||
long attr;
|
||||
int offset = ri->ri_cols * wsc->row + wsc->col;
|
||||
|
||||
struct rasops_info *ri;
|
||||
|
||||
KASSERT(scr != NULL && wsc != NULL);
|
||||
|
||||
ri = &scr->scr_ri;
|
||||
offset = ri->ri_cols * wsc->row + wsc->col;
|
||||
wsc->letter = scr->scr_chars[offset];
|
||||
attr = scr->scr_attrs[offset];
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wsdisplay_vconsvar.h,v 1.3 2006/02/19 03:51:03 macallan Exp $ */
|
||||
/* $NetBSD: wsdisplay_vconsvar.h,v 1.4 2006/04/15 17:48:24 jmmv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005, 2006 Michael Lorenz
|
||||
@ -85,6 +85,9 @@ struct vcons_data {
|
||||
void (*init_screen)(void *, struct vcons_screen *, int,
|
||||
long *);
|
||||
|
||||
/* accessops */
|
||||
int (*ioctl)(void *, void *, u_long, caddr_t, int, struct lwp *);
|
||||
|
||||
/* rasops */
|
||||
void (*copycols)(void *, int, int, int, int);
|
||||
void (*erasecols)(void *, int, int, int, long);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wsdisplayvar.h,v 1.38 2006/04/12 19:38:24 jmmv Exp $ */
|
||||
/* $NetBSD: wsdisplayvar.h,v 1.39 2006/04/15 17:48:24 jmmv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
|
||||
@ -121,8 +121,6 @@ struct wsdisplay_accessops {
|
||||
void (*) (void *, int, int), void *);
|
||||
int (*load_font)(void *, void *, struct wsdisplay_font *);
|
||||
void (*pollc)(void *, int);
|
||||
int (*getwschar)(void *, struct wsdisplay_char *);
|
||||
int (*putwschar)(void *, struct wsdisplay_char *);
|
||||
void (*scroll)(void *, void *, int);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user