diff options
author | 2015-09-07 18:19:58 +0000 | |
---|---|---|
committer | 2015-09-07 18:19:58 +0000 | |
commit | 9405ed2ba64242b5747bd179ec02e2ca133420a5 (patch) | |
tree | d83f5bab39eb48aeabfac987134156c013973faa | |
parent | put back an El macro, wrongly zapped in previous; (diff) | |
download | wireguard-openbsd-9405ed2ba64242b5747bd179ec02e2ca133420a5.tar.xz wireguard-openbsd-9405ed2ba64242b5747bd179ec02e2ca133420a5.zip |
Remap the framebuffer as write-combining when we actually attach. Speeds up
scrolling by a factor of 20 on my x1.
-rw-r--r-- | sys/arch/amd64/amd64/efifb.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/efifb.c b/sys/arch/amd64/amd64/efifb.c index 8c372f868ce..4f3375f077a 100644 --- a/sys/arch/amd64/amd64/efifb.c +++ b/sys/arch/amd64/amd64/efifb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efifb.c,v 1.5 2015/09/07 18:06:00 kettenis Exp $ */ +/* $OpenBSD: efifb.c,v 1.6 2015/09/07 18:19:58 kettenis Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -104,10 +104,11 @@ efifb_attach(struct device *parent, struct device *self, void *aux) { struct efifb *fb; struct efifb_softc *sc = (struct efifb_softc *)self; - struct wsemuldisplaydev_attach_args - aa; + struct wsemuldisplaydev_attach_args aa; struct rasops_info *ri; int ccol = 0, crow = 0; + bus_space_tag_t iot = X86_BUS_SPACE_MEM; + bus_space_handle_t ioh; long defattr; printf("\n"); @@ -119,6 +120,11 @@ efifb_attach(struct device *parent, struct device *self, void *aux) ccol = ri->ri_ccol; crow = ri->ri_crow; + if (bus_space_map(iot, fb->paddr, fb->psize, + BUS_SPACE_MAP_PREFETCHABLE | BUS_SPACE_MAP_LINEAR, + &ioh) == 0) + ri->ri_origbits = bus_space_vaddr(iot, ioh); + efifb_rasops_preinit(fb); ri->ri_flg &= ~RI_CLEAR; ri->ri_flg |= RI_VCONS | RI_WRONLY; |