efifb,vbefb: implement vd_fini
This removes the pmap entry when switching away to e.g. drm fb. Differential Revision: https://reviews.freebsd.org/D29020 MFC After: 1 month
This commit is contained in:
parent
7c13440845
commit
8ebda6e44b
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user