aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vt/hw
diff options
context:
space:
mode:
authorGreg V <greg@unrelenting.technology>2021-03-30 15:46:17 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2021-03-30 15:47:49 +0000
commit8ebda6e44bb6ac9113e2a7fe65889811d894dd63 (patch)
treefd619145a6619d48ab4533b82c7d154ffe658710 /sys/dev/vt/hw
parent7c134408454072666dd9338c285817ab6850f663 (diff)
Diffstat (limited to 'sys/dev/vt/hw')
-rw-r--r--sys/dev/vt/hw/efifb/efifb.c11
-rw-r--r--sys/dev/vt/hw/vbefb/vbefb.c11
2 files changed, 22 insertions, 0 deletions
diff --git a/sys/dev/vt/hw/efifb/efifb.c b/sys/dev/vt/hw/efifb/efifb.c
index fb270d438c81..1d08bdd99ce7 100644
--- a/sys/dev/vt/hw/efifb/efifb.c
+++ b/sys/dev/vt/hw/efifb/efifb.c
@@ -50,12 +50,14 @@ __FBSDID("$FreeBSD$");
#include <dev/vt/colors/vt_termcolors.h>
static vd_init_t vt_efifb_init;
+static vd_fini_t vt_efifb_fini;
static vd_probe_t vt_efifb_probe;
static struct vt_driver vt_efifb_driver = {
.vd_name = "efifb",
.vd_probe = vt_efifb_probe,
.vd_init = vt_efifb_init,
+ .vd_fini = vt_efifb_fini,
.vd_blank = vt_fb_blank,
.vd_bitblt_text = vt_fb_bitblt_text,
.vd_invalidate_text = vt_fb_invalidate_text,
@@ -145,3 +147,12 @@ vt_efifb_init(struct vt_device *vd)
return (CN_INTERNAL);
}
+
+static void
+vt_efifb_fini(struct vt_device *vd, void *softc)
+{
+ struct fb_info *info = softc;
+
+ vt_fb_fini(vd, softc);
+ pmap_unmapdev(info->fb_vbase, info->fb_size);
+}
diff --git a/sys/dev/vt/hw/vbefb/vbefb.c b/sys/dev/vt/hw/vbefb/vbefb.c
index c8789e3bddac..85f594e4ed21 100644
--- a/sys/dev/vt/hw/vbefb/vbefb.c
+++ b/sys/dev/vt/hw/vbefb/vbefb.c
@@ -50,12 +50,14 @@ __FBSDID("$FreeBSD$");
#include <dev/vt/colors/vt_termcolors.h>
static vd_init_t vt_vbefb_init;
+static vd_fini_t vt_vbefb_fini;
static vd_probe_t vt_vbefb_probe;
static struct vt_driver vt_vbefb_driver = {
.vd_name = "vbefb",
.vd_probe = vt_vbefb_probe,
.vd_init = vt_vbefb_init,
+ .vd_fini = vt_vbefb_fini,
.vd_blank = vt_fb_blank,
.vd_bitblt_text = vt_fb_bitblt_text,
.vd_invalidate_text = vt_fb_invalidate_text,
@@ -151,3 +153,12 @@ vt_vbefb_init(struct vt_device *vd)
return (CN_INTERNAL);
}
+
+static void
+vt_vbefb_fini(struct vt_device *vd, void *softc)
+{
+ struct fb_info *info = softc;
+
+ vt_fb_fini(vd, softc);
+ pmap_unmapdev(info->fb_vbase, info->fb_size);
+}