summaryrefslogtreecommitdiffstats
path: root/sys/dev/fb
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2015-03-01 12:54:22 +0000
committerdumbbell <dumbbell@FreeBSD.org>2015-03-01 12:54:22 +0000
commitdf193d50d144894127e95f3263e9462596a344d2 (patch)
tree4223e3d377fb373200c2dfa239b3c43e990ff76b /sys/dev/fb
parenta8e8986092752ebcae306387f3729a8425be26be (diff)
downloadFreeBSD-src-df193d50d144894127e95f3263e9462596a344d2.zip
FreeBSD-src-df193d50d144894127e95f3263e9462596a344d2.tar.gz
vt(4): Add support to "downgrade" from eg. vt_fb to vt_vga
The main purpose of this feature is to be able to unload a KMS driver. When going back from the current vt(4) backend to the previous backend, the previous backend is reinitialized with the special VDF_DOWNGRADE flag set. Then the current driver is terminated with the new "vd_fini" callback. In the case of vt_fb and vt_vga, this allows the former to pass the vgapci device vt_fb used to vt_vga so the device can be rePOSTed. Differential Revision: https://reviews.freebsd.org/D687
Diffstat (limited to 'sys/dev/fb')
-rw-r--r--sys/dev/fb/fbd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/fb/fbd.c b/sys/dev/fb/fbd.c
index f9b4d8e..6b7b731 100644
--- a/sys/dev/fb/fbd.c
+++ b/sys/dev/fb/fbd.c
@@ -263,6 +263,8 @@ fbd_unregister(struct fb_info* info)
LIST_FOREACH_SAFE(entry, &fb_list_head, fb_list, tmp) {
if (entry->fb_info == info) {
LIST_REMOVE(entry, fb_list);
+ if (LIST_EMPTY(&fb_list_head))
+ vt_fb_detach(info);
free(entry, M_DEVBUF);
return (0);
}
OpenPOWER on IntegriCloud