summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjmcneill <jmcneill@NetBSD.org>2008-01-15 02:00:49 +0000
committerjmcneill <jmcneill@NetBSD.org>2008-01-15 02:00:49 +0000
commitcdd511a2fbef61b114ede6b9515e4004684f59c2 (patch)
tree1756c73c8ee983f8c71a4bde552888ab0e7b507e /sys/dev
parent69ac8d9d9e502cdaa34b12e20b812eecbf2fb110 (diff)
For WSDISPLAY_GINFO, depth should be sc->bits_per_pixel, not
sc->color_depth. While we're here, implement WSDISPLAYIO_LINEBYTES.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/machfb.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/pci/machfb.c b/sys/dev/pci/machfb.c
index cb81c48af5a..6ad43e53abe 100644
--- a/sys/dev/pci/machfb.c
+++ b/sys/dev/pci/machfb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machfb.c,v 1.49 2007/03/04 06:02:24 christos Exp $ */
+/* $NetBSD: machfb.c,v 1.50 2008/01/15 02:00:49 jmcneill Exp $ */
/*
* Copyright (c) 2002 Bang Jun-Young
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0,
- "$NetBSD: machfb.c,v 1.49 2007/03/04 06:02:24 christos Exp $");
+ "$NetBSD: machfb.c,v 1.50 2008/01/15 02:00:49 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1598,11 +1598,15 @@ mach64_ioctl(void *v, void *vs, u_long cmd, void *data, int flag,
*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
return 0;
+ case WSDISPLAYIO_LINEBYTES:
+ *(u_int *)data = sc->virt_x * sc->bits_per_pixel / 8;
+ return 0;
+
case WSDISPLAYIO_GINFO:
wdf = (void *)data;
wdf->height = sc->virt_y;
wdf->width = sc->virt_x;
- wdf->depth = sc->color_depth;
+ wdf->depth = sc->bits_per_pixel;
wdf->cmsize = 256;
return 0;