diff options
author | 2015-09-01 06:57:10 +0000 | |
---|---|---|
committer | 2015-09-01 06:57:10 +0000 | |
commit | 127dc8263c7a84b76fd019b299917c28c5327c1b (patch) | |
tree | 124a78cec7cb5ac85c6a715d294a44b5fb70d6c9 | |
parent | test pointers with NULL not '\0' (diff) | |
download | wireguard-openbsd-127dc8263c7a84b76fd019b299917c28c5327c1b.tar.xz wireguard-openbsd-127dc8263c7a84b76fd019b299917c28c5327c1b.zip |
Only advertise the color depth we actually support. This makes the
xf86-video-wsfb driver work.
Map the framebuffer in write-combining mode. This significantly speeds
things up.
ok yuo@, yasuoka@, deraadt@
-rw-r--r-- | sys/arch/amd64/amd64/efifb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/efifb.c b/sys/arch/amd64/amd64/efifb.c index 848f6fd8e62..c780d4d5ed1 100644 --- a/sys/arch/amd64/amd64/efifb.c +++ b/sys/arch/amd64/amd64/efifb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efifb.c,v 1.2 2015/08/31 19:56:32 kettenis Exp $ */ +/* $OpenBSD: efifb.c,v 1.3 2015/09/01 06:57:10 kettenis Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -182,8 +182,10 @@ efifb_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) break; case WSDISPLAYIO_GETSUPPORTEDDEPTH: /* can't change the depth */ - if (ri->ri_depth == 32 || ri->ri_depth == 24) - *(u_int *)data = WSDISPLAYIO_DEPTH_24; + if (ri->ri_depth == 32) + *(u_int *)data = WSDISPLAYIO_DEPTH_24_32; + else if (ri->ri_depth == 24) + *(u_int *)data = WSDISPLAYIO_DEPTH_24_24; else if (ri->ri_depth == 16) *(u_int *)data = WSDISPLAYIO_DEPTH_16; else if (ri->ri_depth == 15) @@ -212,7 +214,7 @@ efifb_mmap(void *v, off_t off, int prot) if (off > sc->sc_fb->psize) return (-1); - return (sc->sc_fb->paddr + off); + return ((sc->sc_fb->paddr + off) | PMAP_WC); } int |