aboutsummarylogtreecommitdiffstats
path: root/0009-bootsplash.patch
diff options
context:
space:
mode:
Diffstat (limited to '0009-bootsplash.patch')
-rwxr-xr-x[-rw-r--r--]0009-bootsplash.patch92
1 files changed, 58 insertions, 34 deletions
diff --git a/0009-bootsplash.patch b/0009-bootsplash.patch
index e8cd479312be..216953762e2e 100644..100755
--- a/0009-bootsplash.patch
+++ b/0009-bootsplash.patch
@@ -1,42 +1,66 @@
-diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
-index f4166263bb3a..a248429194bb 100644
---- a/drivers/tty/vt/keyboard.c
-+++ b/drivers/tty/vt/keyboard.c
-@@ -47,6 +47,8 @@
+diff --git a/drivers/video/fbdev/core/bootsplash.c b/drivers/video/fbdev/core/bootsplash.c
+index 843c5400fefc..815b007f81ca 100644
+--- a/drivers/video/fbdev/core/bootsplash.c
++++ b/drivers/video/fbdev/core/bootsplash.c
+@@ -112,6 +112,8 @@ void bootsplash_render_full(struct fb_info *info)
- #include <asm/irq_regs.h>
+ bootsplash_do_render_pictures(info, splash_state.file);
-+#include <linux/bootsplash.h>
++ bootsplash_do_render_flush(info);
+
- extern void ctrl_alt_del(void);
+ out:
+ mutex_unlock(&splash_state.data_lock);
+ }
+diff --git a/drivers/video/fbdev/core/bootsplash_internal.h b/drivers/video/fbdev/core/bootsplash_internal.h
+index 71e2a27ac0b8..0acb383aa4e3 100644
+--- a/drivers/video/fbdev/core/bootsplash_internal.h
++++ b/drivers/video/fbdev/core/bootsplash_internal.h
+@@ -89,6 +89,7 @@ void bootsplash_do_render_background(struct fb_info *info,
+ const struct splash_file_priv *fp);
+ void bootsplash_do_render_pictures(struct fb_info *info,
+ const struct splash_file_priv *fp);
++void bootsplash_do_render_flush(struct fb_info *info);
- /*
-@@ -1353,6 +1355,28 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
- }
- #endif
-+ /* Trap keys when bootsplash is shown */
-+ if (bootsplash_would_render_now()) {
-+ /* Deactivate bootsplash on ESC or Alt+Fxx VT switch */
-+ if (keycode >= KEY_F1 && keycode <= KEY_F12) {
-+ bootsplash_disable();
+ void bootsplash_free_file(struct splash_file_priv *fp);
+diff --git a/drivers/video/fbdev/core/bootsplash_render.c b/drivers/video/fbdev/core/bootsplash_render.c
+index 2ae36949d0e3..8c09c306ff67 100644
+--- a/drivers/video/fbdev/core/bootsplash_render.c
++++ b/drivers/video/fbdev/core/bootsplash_render.c
+@@ -186,3 +186,36 @@ void bootsplash_do_render_pictures(struct fb_info *info,
+ pp->pic_header->width, pp->pic_header->height);
+ }
+ }
+
-+ /*
-+ * No return here since we want to actually
-+ * perform the VT switch.
-+ */
-+ } else {
-+ if (keycode == KEY_ESC)
-+ bootsplash_disable();
+
-+ /*
-+ * Just drop any other keys.
-+ * Their effect would be hidden by the splash.
-+ */
-+ return;
-+ }
-+ }
++void bootsplash_do_render_flush(struct fb_info *info)
++{
++ /*
++ * FB drivers using deferred_io (such as Xen) need to sync the
++ * screen after modifying its contents. When the FB is mmap()ed
++ * from userspace, this happens via a dirty pages callback, but
++ * when modifying the FB from the kernel, there is no such thing.
++ *
++ * So let's issue a fake fb_copyarea (copying the FB onto itself)
++ * to trick the FB driver into syncing the screen.
++ *
++ * A few DRM drivers' FB implementations are broken by not using
++ * deferred_io when they really should - we match on the known
++ * bad ones manually for now.
++ */
++ if (info->fbdefio
++ || !strcmp(info->fix.id, "astdrmfb")
++ || !strcmp(info->fix.id, "cirrusdrmfb")
++ || !strcmp(info->fix.id, "mgadrmfb")) {
++ struct fb_copyarea area;
+
- if (kbd->kbdmode == VC_MEDIUMRAW) {
- /*
- * This is extended medium raw mode, with keys above 127
++ area.dx = 0;
++ area.dy = 0;
++ area.width = info->var.xres;
++ area.height = info->var.yres;
++ area.sx = 0;
++ area.sy = 0;
++
++ info->fbops->fb_copyarea(info, &area);
++ }
++}