diff options
author | Frederic Cambus <fcambus@cvs.openbsd.org> | 2020-05-28 20:26:26 +0000 |
---|---|---|
committer | Frederic Cambus <fcambus@cvs.openbsd.org> | 2020-05-28 20:26:26 +0000 |
commit | 1b068056803da48a36b2380f7cfb05140386f4b3 (patch) | |
tree | 58d7c4a2753a179e51e0462168b90a19a2d6f478 /sys | |
parent | a926114ed2a4437101ec40671e1202232c68cbef (diff) |
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@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/efifb.c | 6 |
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(); } |