summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2001-02-28 19:12:41 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2001-02-28 19:12:41 +0000
commit61700cc20eacd0512092cc90f72f065f0a7f2de5 (patch)
tree5353e1e9af0b3824d7a68f18b7a476fd22488f7c /sys
parentb54150eb2c6ddc09bda66e185997df6345673a8b (diff)
Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger. This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes of 1024.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/powerpc/pci/vgafb.c6
-rw-r--r--sys/dev/wscons/wsconsio.h6
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/powerpc/pci/vgafb.c b/sys/arch/powerpc/pci/vgafb.c
index 7f84cd97e3f..580328c59bc 100644
--- a/sys/arch/powerpc/pci/vgafb.c
+++ b/sys/arch/powerpc/pci/vgafb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vgafb.c,v 1.8 2001/02/01 23:51:07 drahn Exp $ */
+/* $OpenBSD: vgafb.c,v 1.9 2001/02/28 19:12:40 drahn Exp $ */
/* $NetBSD: vga.c,v 1.3 1996/12/02 22:24:54 cgd Exp $ */
/*
@@ -369,6 +369,10 @@ vgafb_ioctl(v, cmd, data, flag, p)
wdf->cmsize = 256;
return 0;
+ case WSDISPLAYIO_LINEBYTES:
+ *(u_int *)data = cons_linebytes;
+ return 0;
+
case WSDISPLAYIO_GETCMAP:
return vgafb_getcmap(vc, (struct wsdisplay_cmap *)data);
diff --git a/sys/dev/wscons/wsconsio.h b/sys/dev/wscons/wsconsio.h
index 457764baffc..daff0afb1a2 100644
--- a/sys/dev/wscons/wsconsio.h
+++ b/sys/dev/wscons/wsconsio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsconsio.h,v 1.5 2001/02/10 19:42:06 mickey Exp $ */
+/* $OpenBSD: wsconsio.h,v 1.6 2001/02/28 19:12:40 drahn Exp $ */
/* $NetBSD: wsconsio.h,v 1.31.2.1 2000/07/07 09:49:17 hannken Exp $ */
/*
@@ -334,6 +334,10 @@ struct wsdisplay_usefontdata {
};
#define WSDISPLAYIO_USEFONT _IOW('W', 80, struct wsdisplay_usefontdata)
+/* Display information: number of bytes per row, may be same as pixels */
+#define WSDISPLAYIO_LINEBYTES _IOR('W', 95, u_int)
+
+
/* Replaced by WSMUX_{ADD,REMOVE}_DEVICE */
struct wsdisplay_kbddata {
int op;