diff options
| author | sato <sato@NetBSD.org> | 2001-01-05 09:09:48 +0000 |
|---|---|---|
| committer | sato <sato@NetBSD.org> | 2001-01-05 09:09:48 +0000 |
| commit | 37682e548818bcd292d781a90f36da1da582bd2d (patch) | |
| tree | 5e6036a38fa8e2c33f228c1abc1a2cd2204704b0 /sys | |
| parent | 78242b5fd89974129c6a72f846c5a6e1eede3bbf (diff) | |
- print debug message for WSDISPLAYIO_GETPARAM/WSDISPLAYIO_SETPARAM
when boot verbose mode.
for debuging LCD control and/or keyboard cmds.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/hpcmips/dev/bivideo.c | 19 | ||||
| -rw-r--r-- | sys/arch/hpcmips/dev/mq200.c | 37 |
2 files changed, 53 insertions, 3 deletions
diff --git a/sys/arch/hpcmips/dev/bivideo.c b/sys/arch/hpcmips/dev/bivideo.c index f28c7f99726..50969225f05 100644 --- a/sys/arch/hpcmips/dev/bivideo.c +++ b/sys/arch/hpcmips/dev/bivideo.c @@ -1,4 +1,4 @@ -/* $NetBSD: bivideo.c,v 1.13 2000/12/03 13:43:40 takemura Exp $ */ +/* $NetBSD: bivideo.c,v 1.14 2001/01/05 09:09:48 sato Exp $ */ /*- * Copyright (c) 1999 @@ -37,7 +37,7 @@ static const char _copyright[] __attribute__ ((unused)) = "Copyright (c) 1999 Shin Takemura. All rights reserved."; static const char _rcsid[] __attribute__ ((unused)) = - "$Id: bivideo.c,v 1.13 2000/12/03 13:43:40 takemura Exp $"; + "$Id: bivideo.c,v 1.14 2001/01/05 09:09:48 sato Exp $"; #include <sys/param.h> #include <sys/systm.h> @@ -47,6 +47,7 @@ static const char _rcsid[] __attribute__ ((unused)) = #include <sys/malloc.h> #include <sys/buf.h> #include <sys/ioctl.h> +#include <sys/reboot.h> #include <uvm/uvm_extern.h> @@ -67,6 +68,8 @@ static const char _rcsid[] __attribute__ ((unused)) = #include <arch/hpcmips/dev/bivideovar.h> #include <arch/hpcmips/dev/hpccmapvar.h> +#define VPRINTF(arg) do { if (bootverbose) printf arg; } while(0); + /* * global variables */ @@ -376,9 +379,15 @@ bivideo_ioctl(v, cmd, data, flag, p) dispparam->max = 1; dispparam->curval = (sc->sc_powerstate & PWRSTAT_BACKLIGHT) ? 1 : 0; + VPRINTF(("bivideo_ioctl: GETPARAM:BACKLIGHT:%d\n", + dispparam->curval)); break; case WSDISPLAYIO_PARAM_CONTRAST: + VPRINTF(("bivideo_ioctl: GETPARAM:CONTRAST\n")); + return (EINVAL); case WSDISPLAYIO_PARAM_BRIGHTNESS: + VPRINTF(("bivideo_ioctl: GETPARAM:BRIGHTNESS\n")); + return (EINVAL); default: return (EINVAL); } @@ -396,9 +405,15 @@ bivideo_ioctl(v, cmd, data, flag, p) else sc->sc_powerstate |= PWRSTAT_BACKLIGHT; bivideo_update_powerstate(sc, PWRSTAT_BACKLIGHT); + VPRINTF(("bivideo_ioctl: SETPARAM:BACKLIGHT:%d\n", + (sc->sc_powerstate & PWRSTAT_BACKLIGHT)?1:0)); break; case WSDISPLAYIO_PARAM_CONTRAST: + VPRINTF(("bivideo_ioctl: SETPARAM:CONTRAST\n")); + return (EINVAL); case WSDISPLAYIO_PARAM_BRIGHTNESS: + VPRINTF(("mq200_ioctl: SETPARAM:BRIGHTNESS\n")); + return (EINVAL); default: return (EINVAL); } diff --git a/sys/arch/hpcmips/dev/mq200.c b/sys/arch/hpcmips/dev/mq200.c index 253f85f5ec3..bbb70877eb8 100644 --- a/sys/arch/hpcmips/dev/mq200.c +++ b/sys/arch/hpcmips/dev/mq200.c @@ -1,4 +1,4 @@ -/* $NetBSD: mq200.c,v 1.5 2000/12/21 03:27:15 sato Exp $ */ +/* $NetBSD: mq200.c,v 1.6 2001/01/05 09:09:48 sato Exp $ */ /*- * Copyright (c) 2000 Takemura Shin @@ -358,6 +358,7 @@ mq200_ioctl(v, cmd, data, flag, p) struct hpcfb_fbconf *fbconf; struct hpcfb_dspconf *dspconf; struct wsdisplay_cmap *cmap; + struct wsdisplay_param *dispparam; switch (cmd) { case WSDISPLAYIO_GETCMAP: @@ -388,6 +389,40 @@ mq200_ioctl(v, cmd, data, flag, p) */ return (EINVAL); + case WSDISPLAYIO_GETPARAM: + dispparam = (struct wsdisplay_param*)data; + switch (dispparam->param) { + case WSDISPLAYIO_PARAM_BACKLIGHT: + VPRINTF(("mq200_ioctl: GETPARAM:BACKLIGHT\n")); + return (EINVAL); + case WSDISPLAYIO_PARAM_CONTRAST: + VPRINTF(("mq200_ioctl: GETPARAM:CONTRAST\n")); + return (EINVAL); + case WSDISPLAYIO_PARAM_BRIGHTNESS: + VPRINTF(("mq200_ioctl: GETPARAM:BRIGHTNESS\n")); + return (EINVAL); + default: + return (EINVAL); + } + return (0); + + case WSDISPLAYIO_SETPARAM: + dispparam = (struct wsdisplay_param*)data; + switch (dispparam->param) { + case WSDISPLAYIO_PARAM_BACKLIGHT: + VPRINTF(("mq200_ioctl: GETPARAM:BACKLIGHT\n")); + return (EINVAL); + case WSDISPLAYIO_PARAM_CONTRAST: + VPRINTF(("mq200_ioctl: GETPARAM:CONTRAST\n")); + return (EINVAL); + case WSDISPLAYIO_PARAM_BRIGHTNESS: + VPRINTF(("mq200_ioctl: GETPARAM:BRIGHTNESS\n")); + return (EINVAL); + default: + return (EINVAL); + } + return (0); + case HPCFBIO_GCONF: fbconf = (struct hpcfb_fbconf *)data; if (fbconf->hf_conf_index != 0 && |
