summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfcambus <fcambus@openbsd.org>2020-05-28 20:26:25 +0000
committerfcambus <fcambus@openbsd.org>2020-05-28 20:26:25 +0000
commit0a71812f803ff8032ec1e8dc104b06b26338a385 (patch)
treee321be5a3c2878bf5cac1a783e7bc9b65164e9b3
parentEnable scrollback in simplefb(4). (diff)
downloadwireguard-openbsd-0a71812f803ff8032ec1e8dc104b06b26338a385.tar.xz
wireguard-openbsd-0a71812f803ff8032ec1e8dc104b06b26338a385.zip
When calling rasops_init() in efifb_cnremap() and efifb_attach(), pass
EFIFB_HEIGHT and EFIFB_WIDTH instead of efifb_std_descr.n{rows,cols}. Because the efifb resolution doesn't change, this ensures 'ri_emuwidth' and 'ri_emuheight' will always get the same value when we remap and later when we attach, so the text area is always displayed at the same position. This fixes display glitches happening on smaller screens or with larger fonts, which caused the content previously displayed in the area that was becoming margins when remapping to remain there. OK jsg@
-rw-r--r--sys/arch/amd64/amd64/efifb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/efifb.c b/sys/arch/amd64/amd64/efifb.c
index 11de5f45e7c..e421678ca96 100644
--- a/sys/arch/amd64/amd64/efifb.c
+++ b/sys/arch/amd64/amd64/efifb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efifb.c,v 1.31 2020/05/27 07:48:02 jsg Exp $ */
+/* $OpenBSD: efifb.c,v 1.32 2020/05/28 20:26:25 fcambus Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -222,7 +222,7 @@ efifb_attach(struct device *parent, struct device *self, void *aux)
ri->ri_flg &= ~RI_CLEAR;
ri->ri_flg |= RI_VCONS | RI_WRONLY;
- rasops_init(ri, efifb_std_descr.nrows, efifb_std_descr.ncols);
+ rasops_init(ri, EFIFB_HEIGHT, EFIFB_WIDTH);
ri->ri_ops.pack_attr(ri->ri_active, 0, 0, 0, &defattr);
wsdisplay_cnattach(&efifb_std_descr, ri->ri_active, ccol, crow,
@@ -480,7 +480,7 @@ efifb_cnremap(void)
ri->ri_flg &= ~RI_CLEAR;
ri->ri_flg |= RI_CENTER | RI_WRONLY;
- rasops_init(ri, efifb_std_descr.nrows, efifb_std_descr.ncols);
+ rasops_init(ri, EFIFB_HEIGHT, EFIFB_WIDTH);
efifb_early_cleanup();
}