summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-08-19 03:13:08 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-08-19 03:13:08 +0000
commita2fa5d2ed1eec2de963b11f8a98180a12a2c4ca8 (patch)
tree8633afbc004b54db746dbf1465238d5752d1c9b2 /sys/dev
parent79c14f975d6bf5ce62e1665e84eff5d8c4963fe8 (diff)
give better depth and cmsize
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/sti.c7
-rw-r--r--sys/dev/ic/stivar.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c
index 57d95892e1a..45fe0d2c764 100644
--- a/sys/dev/ic/sti.c
+++ b/sys/dev/ic/sti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sti.c,v 1.31 2003/08/19 02:52:38 mickey Exp $ */
+/* $OpenBSD: sti.c,v 1.32 2003/08/19 03:13:07 mickey Exp $ */
/*
* Copyright (c) 2000-2003 Michael Shalayeff
@@ -323,6 +323,7 @@ sti_attach_common(sc)
ecfg.crt_hw[0], ecfg.crt_hw[1], ecfg.crt_hw[2]);
#endif
sc->sc_wsmode = WSDISPLAYIO_MODE_EMUL;
+ sc->sc_bpp = cfg.bppu;
printf(": %s rev %d.%02d;%d, ID 0x%016llX\n"
"%s: %dx%d frame buffer, %dx%dx%d display, offset %dx%d\n",
cfg.name, dd->dd_grrev >> 4, dd->dd_grrev & 0xf, dd->dd_lrrev,
@@ -621,8 +622,8 @@ sti_ioctl(v, cmd, data, flag, p)
wdf = (struct wsdisplay_fbinfo *)data;
wdf->height = sc->sc_cfg.scr_height;
wdf->width = sc->sc_cfg.scr_width;
- wdf->depth = 8; /* XXX */
- wdf->cmsize = 256;
+ wdf->depth = sc->sc_bpp;
+ wdf->cmsize = STI_NCMAP;
break;
case WSDISPLAYIO_LINEBYTES:
diff --git a/sys/dev/ic/stivar.h b/sys/dev/ic/stivar.h
index 2ddb3a7870b..85568c90df3 100644
--- a/sys/dev/ic/stivar.h
+++ b/sys/dev/ic/stivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stivar.h,v 1.13 2003/08/19 02:52:38 mickey Exp $ */
+/* $OpenBSD: stivar.h,v 1.14 2003/08/19 03:13:07 mickey Exp $ */
/*
* Copyright (c) 2000-2003 Michael Shalayeff
@@ -40,6 +40,7 @@ struct sti_softc {
#define STI_CONSOLE 0x0004
int sc_devtype;
int sc_nscreens;
+ int sc_bpp;
bus_space_tag_t iot, memt;
bus_space_handle_t ioh, romh, fbh;