summaryrefslogtreecommitdiff
path: root/sys/dev/wsfb/genfb.c
diff options
context:
space:
mode:
authorrin <rin@NetBSD.org>2020-10-18 11:54:20 +0000
committerrin <rin@NetBSD.org>2020-10-18 11:54:20 +0000
commit5d4e535365e905657d72d35cec8eecf6d9bbe86b (patch)
tree1312498c9d3dc20727769d8c8a1a7de18771db0e /sys/dev/wsfb/genfb.c
parentfd663c49e4d85ff7e6997689bd57ed0d208cd3cc (diff)
For WSDISPLAYIO_GET_FBINFO ioctl, set WSFB_VRAM_IS_RAM to fbi_flags
when shadow FB is used.
Diffstat (limited to 'sys/dev/wsfb/genfb.c')
-rw-r--r--sys/dev/wsfb/genfb.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/wsfb/genfb.c b/sys/dev/wsfb/genfb.c
index ab64728a406..0db9715364d 100644
--- a/sys/dev/wsfb/genfb.c
+++ b/sys/dev/wsfb/genfb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb.c,v 1.74 2020/06/11 02:39:31 thorpej Exp $ */
+/* $NetBSD: genfb.c,v 1.75 2020/10/18 11:54:20 rin Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.74 2020/06/11 02:39:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.75 2020/10/18 11:54:20 rin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -500,7 +500,12 @@ genfb_ioctl(void *v, void *vs, u_long cmd, void *data, int flag,
case WSDISPLAYIO_GET_FBINFO: {
struct wsdisplayio_fbinfo *fbi = data;
- return wsdisplayio_get_fbinfo(&ms->scr_ri, fbi);
+ ret = wsdisplayio_get_fbinfo(&ms->scr_ri, fbi);
+ if (ret == 0) {
+ if (sc->sc_enable_shadowfb)
+ fbi->fbi_flags |= WSFB_VRAM_IS_RAM;
+ }
+ return ret;
}
}
return EPASSTHROUGH;