Page MenuHomeFreeBSD

D59928.1795078030.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D59928.1795078030.diff

diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -1501,7 +1501,7 @@
if (vw == NULL)
return (0);
- if (vd->vd_flags & VDF_SPLASH || vw->vw_flags & VWF_BUSY)
+ if (vw->vw_flags & VWF_BUSY)
return (0);
vf = vw->vw_font;
@@ -1511,6 +1511,13 @@
VT_FLUSH_LOCK(vd);
vtbuf_lock(&vw->vw_buf);
+
+ if (vd->vd_flags & VDF_SPLASH) {
+ vtbuf_unlock(&vw->vw_buf);
+ VT_FLUSH_UNLOCK(vd);
+ return (0);
+ }
+
inside_vt_flush = true;
#ifndef SC_NO_CUTPASTE
@@ -1697,17 +1704,21 @@
si = MD_FETCH(preload_kmdp, rebooting == 1 ? MODINFOMD_SHTDWNSPLASH :
MODINFOMD_SPLASH, struct splash_info *);
+ /* Quit before taking the lock if the backend lacks something. */
if (si == NULL) {
if (vd->vd_driver->vd_bitblt_bmp == NULL)
return;
- } else if (vd->vd_driver->vd_bitblt_argb == NULL)
+ } else if (vd->vd_driver->vd_bitblt_argb == NULL || si->si_depth != 4)
+ return;
+ if (rebooting == 1 && vd->vd_driver->vd_blank == NULL)
return;
- if (rebooting == 1) {
- if (vd->vd_driver->vd_blank == NULL)
- return;
+ vtbuf_lock(&vd->vd_curwindow->vw_buf);
+ vd->vd_flags |= VDF_SPLASH;
+ vtbuf_unlock(&vd->vd_curwindow->vw_buf);
+
+ if (rebooting == 1)
vd->vd_driver->vd_blank(vd, TC_BLACK);
- }
if (si == NULL) {
top = (vd->vd_height - vt_logo_height) / 2;
@@ -1716,8 +1727,6 @@
vd->vd_curwindow, vt_logo_image, NULL, vt_logo_width,
vt_logo_height, left, top, TC_WHITE, TC_BLACK);
} else {
- if (si->si_depth != 4)
- return;
image = (uintptr_t)si + sizeof(struct splash_info);
image = roundup2(image, 8);
top = (vd->vd_height - si->si_height) / 2;
@@ -1726,7 +1735,6 @@
(unsigned char *)image, si->si_width, si->si_height,
left, top);
}
- vd->vd_flags |= VDF_SPLASH;
}
#endif

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 19, 8:47 AM (19 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40108722
Default Alt Text
D59928.1795078030.diff (1 KB)

Event Timeline