Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/patch/misc/0006-bootsplash.patch
Views: 3959
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c1index 2ebaba16f785..416735ab6dc1 1006442--- a/drivers/tty/vt/vt.c3+++ b/drivers/tty/vt/vt.c4@@ -105,6 +105,7 @@5#include <linux/ctype.h>6#include <linux/bsearch.h>7#include <linux/gcd.h>8+#include <linux/bootsplash.h>910#define MAX_NR_CON_DRIVER 161112@@ -4235,6 +4236,7 @@ void do_unblank_screen(int leaving_gfx)13}1415console_blanked = 0;16+ bootsplash_mark_dirty();17if (vc->vc_sw->con_blank(vc, 0, leaving_gfx))18/* Low-level driver cannot restore -> do it ourselves */19update_screen(vc);20diff --git a/drivers/video/fbdev/core/bootsplash.c b/drivers/video/fbdev/core/bootsplash.c21index c8642142cfea..13fcaabbc2ca 10064422--- a/drivers/video/fbdev/core/bootsplash.c23+++ b/drivers/video/fbdev/core/bootsplash.c24@@ -165,6 +165,13 @@ bool bootsplash_would_render_now(void)25&& bootsplash_is_enabled();26}2728+void bootsplash_mark_dirty(void)29+{30+ mutex_lock(&splash_state.data_lock);31+ splash_state.splash_fb = NULL;32+ mutex_unlock(&splash_state.data_lock);33+}34+35bool bootsplash_is_enabled(void)36{37bool was_enabled;38@@ -206,9 +213,7 @@ void bootsplash_enable(void)3940if (!was_enabled) {41/* Force a full redraw when the splash is re-activated */42- mutex_lock(&splash_state.data_lock);43- splash_state.splash_fb = NULL;44- mutex_unlock(&splash_state.data_lock);45+ bootsplash_mark_dirty();4647schedule_work(&splash_state.work_redraw_vc);48}49@@ -272,9 +277,7 @@ static int splash_resume(struct device *device)50* Force full redraw on resume since we've probably lost the51* framebuffer's contents meanwhile52*/53- mutex_lock(&splash_state.data_lock);54- splash_state.splash_fb = NULL;55- mutex_unlock(&splash_state.data_lock);56+ bootsplash_mark_dirty();5758if (bootsplash_would_render_now())59schedule_work(&splash_state.work_redraw_vc);60diff --git a/include/linux/bootsplash.h b/include/linux/bootsplash.h61index c6dd0b43180d..4075098aaadd 10064462--- a/include/linux/bootsplash.h63+++ b/include/linux/bootsplash.h64@@ -19,6 +19,8 @@ extern void bootsplash_render_full(struct fb_info *info);6566extern bool bootsplash_would_render_now(void);6768+extern void bootsplash_mark_dirty(void);69+70extern bool bootsplash_is_enabled(void);71extern void bootsplash_disable(void);72extern void bootsplash_enable(void);73@@ -31,6 +33,8 @@ extern void bootsplash_init(void);7475#define bootsplash_would_render_now() (false)7677+#define bootsplash_mark_dirty()78+79#define bootsplash_is_enabled() (false)80#define bootsplash_disable()81#define bootsplash_enable()828384