summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-09-07 18:06:01 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-09-07 18:06:01 +0000
commit2ec36c8cb250a2216648958209a3cd8b45e72540 (patch)
tree54a40d3a80adfd1e826491c73b851c74ac1a5e67 /sys/arch
parent6dcaf406932d2f53fd6b1b7fdf7f623e576aa5eb (diff)
Use the RI_WRONLY flag to avoid reading back pixels from buffer memory.
Make scrolling efifb(4) a bit faster. ok yasuoka@, deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/efifb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/efifb.c b/sys/arch/amd64/amd64/efifb.c
index f119cb045a2..8c372f868ce 100644
--- a/sys/arch/amd64/amd64/efifb.c
+++ b/sys/arch/amd64/amd64/efifb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efifb.c,v 1.4 2015/09/05 08:21:27 miod Exp $ */
+/* $OpenBSD: efifb.c,v 1.5 2015/09/07 18:06:00 kettenis Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -121,7 +121,7 @@ efifb_attach(struct device *parent, struct device *self, void *aux)
efifb_rasops_preinit(fb);
ri->ri_flg &= ~RI_CLEAR;
- ri->ri_flg |= RI_VCONS;
+ ri->ri_flg |= RI_VCONS | RI_WRONLY;
rasops_init(ri, efifb_std_descr.nrows, efifb_std_descr.ncols);
}
@@ -264,6 +264,8 @@ efifb_list_font(void *v, struct wsdisplay_font *font)
return (rasops_list_font(ri, font));
}
+struct wsdisplay_charcell efifb_bs[EFIFB_HEIGHT * EFIFB_WIDTH];
+
int
efifb_cnattach(void)
{
@@ -289,7 +291,8 @@ efifb_cnattach(void)
efifb_rasops_preinit(fb);
- ri->ri_flg = RI_CLEAR | RI_CENTER;
+ ri->ri_bs = efifb_bs;
+ ri->ri_flg = RI_CLEAR | RI_CENTER | RI_WRONLY;
rasops_init(ri, EFIFB_HEIGHT, EFIFB_WIDTH);
efifb_std_descr.ncols = ri->ri_cols;
efifb_std_descr.nrows = ri->ri_rows;