diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-07-30 09:58:37 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2018-07-30 16:46:56 +0200 |
commit | 838818e5a9e7bd845732d74108223bb5457f9e72 (patch) | |
tree | 5738dae114919536a8e7a9a1a3fc8a094b34a9ff | |
parent | 86f7bf57f922080bcb95684cc482ff1ba244020f (diff) | |
download | kernel-838818e5a9e7bd845732d74108223bb5457f9e72.tar.gz kernel-838818e5a9e7bd845732d74108223bb5457f9e72.tar.xz kernel-838818e5a9e7bd845732d74108223bb5457f9e72.zip |
Add patch queued in -next to make quiet more quiet
Add patches queued in -next to make efifb / fbcon retain the vendor logo
(ACPI BRGT boot graphics) until the first text is output to the console
29 files changed, 880 insertions, 2 deletions
diff --git a/0001-printk-Make-CONSOLE_LOGLEVEL_QUIET-configurable.patch b/0001-printk-Make-CONSOLE_LOGLEVEL_QUIET-configurable.patch new file mode 100644 index 000000000..548bd4bbb --- /dev/null +++ b/0001-printk-Make-CONSOLE_LOGLEVEL_QUIET-configurable.patch @@ -0,0 +1,79 @@ +From 79bfd044ed82290603093be1a3759672176f3e6f Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Tue, 19 Jun 2018 13:30:04 +0200 +Subject: [PATCH] printk: Make CONSOLE_LOGLEVEL_QUIET configurable + +The goal of passing the "quiet" option to the kernel is for the kernel +to be quiet unless something really is wrong. + +Sofar passing quiet has been (mostly) equivalent to passing +loglevel=4 on the kernel commandline. Which means to show any messages +with a level of KERN_ERR or higher severity on the console. + +In practice this often does not result in a quiet boot though, since +there are many false-positive or otherwise harmless error messages printed, +defeating the purpose of the quiet option. Esp. the ACPICA code is really +bad wrt this, but there are plenty of others too. + +This commit makes CONSOLE_LOGLEVEL_QUIET configurable. + +This for example will allow distros which want quiet to really mean quiet +to set CONSOLE_LOGLEVEL_QUIET so that only messages with a higher severity +then KERN_ERR (CRIT, ALERT, EMERG) get printed, avoiding an endless game +of whack-a-mole silencing harmless error messages. + +Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + include/linux/printk.h | 6 +++--- + lib/Kconfig.debug | 11 +++++++++++ + 2 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/include/linux/printk.h b/include/linux/printk.h +index 6d7e800affd8..18602bb3eca8 100644 +--- a/include/linux/printk.h ++++ b/include/linux/printk.h +@@ -50,15 +50,15 @@ static inline const char *printk_skip_headers(const char *buffer) + /* We show everything that is MORE important than this.. */ + #define CONSOLE_LOGLEVEL_SILENT 0 /* Mum's the word */ + #define CONSOLE_LOGLEVEL_MIN 1 /* Minimum loglevel we let people use */ +-#define CONSOLE_LOGLEVEL_QUIET 4 /* Shhh ..., when booted with "quiet" */ + #define CONSOLE_LOGLEVEL_DEBUG 10 /* issue debug messages */ + #define CONSOLE_LOGLEVEL_MOTORMOUTH 15 /* You can't shut this one up */ + + /* +- * Default used to be hard-coded at 7, we're now allowing it to be set from +- * kernel config. ++ * Default used to be hard-coded at 7, quiet used to be hardcoded at 4, ++ * we're now allowing both to be set from kernel config. + */ + #define CONSOLE_LOGLEVEL_DEFAULT CONFIG_CONSOLE_LOGLEVEL_DEFAULT ++#define CONSOLE_LOGLEVEL_QUIET CONFIG_CONSOLE_LOGLEVEL_QUIET + + extern int console_printk[]; + +diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug +index 8838d1158d19..0d1c48dd22a9 100644 +--- a/lib/Kconfig.debug ++++ b/lib/Kconfig.debug +@@ -30,6 +30,17 @@ config CONSOLE_LOGLEVEL_DEFAULT + usage in the kernel. That is controlled by the MESSAGE_LOGLEVEL_DEFAULT + option. + ++config CONSOLE_LOGLEVEL_QUIET ++ int "quiet console loglevel (1-15)" ++ range 1 15 ++ default "4" ++ help ++ loglevel to use when "quiet" is passed on the kernel commandline. ++ ++ When "quiet" is passed on the kernel commandline this loglevel ++ will be used as the loglevel. IOW passing "quiet" will be the ++ equivalent of passing "loglevel=<CONSOLE_LOGLEVEL_QUIET>" ++ + config MESSAGE_LOGLEVEL_DEFAULT + int "Default message log level (1-7)" + range 1 7 +-- +2.18.0 + diff --git a/0002-printk-Export-is_console_locked.patch b/0002-printk-Export-is_console_locked.patch new file mode 100644 index 000000000..aad37308d --- /dev/null +++ b/0002-printk-Export-is_console_locked.patch @@ -0,0 +1,34 @@ +From d48de54a9dab5370edd2e991f78cc7996cf5483e Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Thu, 28 Jun 2018 15:20:27 +0200 +Subject: [PATCH 2/7] printk: Export is_console_locked + +This is a preparation patch for adding a number of WARN_CONSOLE_UNLOCKED() +calls to the fbcon code, which may be built as a module (event though +usually it is not). + +Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> +Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> +Acked-by: Petr Mladek <pmladek@suse.com> +Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> +--- + kernel/printk/printk.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index 247808333ba4..3f041e7cbfc9 100644 +--- a/kernel/printk/printk.c ++++ b/kernel/printk/printk.c +@@ -2243,6 +2243,7 @@ int is_console_locked(void) + { + return console_locked; + } ++EXPORT_SYMBOL(is_console_locked); + + /* + * Check if we have any console that is capable of printing while cpu is +-- +2.18.0 + diff --git a/0003-fbcon-Call-WARN_CONSOLE_UNLOCKED-where-applicable.patch b/0003-fbcon-Call-WARN_CONSOLE_UNLOCKED-where-applicable.patch new file mode 100644 index 000000000..fef33c118 --- /dev/null +++ b/0003-fbcon-Call-WARN_CONSOLE_UNLOCKED-where-applicable.patch @@ -0,0 +1,70 @@ +From 3bd3a0e330aae4fffa8028aba2407ef615ab040b Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Thu, 28 Jun 2018 15:20:28 +0200 +Subject: [PATCH 3/7] fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable + +Replace comments about places where the console lock should be held with +calls to WARN_CONSOLE_UNLOCKED() to assert that it is actually held. + +Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> +Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> +Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> +--- + drivers/video/fbdev/core/fbcon.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c +index c910e74d46ff..cd8d52a967aa 100644 +--- a/drivers/video/fbdev/core/fbcon.c ++++ b/drivers/video/fbdev/core/fbcon.c +@@ -828,6 +828,8 @@ static int set_con2fb_map(int unit, int newidx, int user) + struct fb_info *oldinfo = NULL; + int found, err = 0; + ++ WARN_CONSOLE_UNLOCKED(); ++ + if (oldidx == newidx) + return 0; + +@@ -3044,6 +3046,8 @@ static int fbcon_fb_unbind(int idx) + { + int i, new_idx = -1, ret = 0; + ++ WARN_CONSOLE_UNLOCKED(); ++ + if (!fbcon_has_console_bind) + return 0; + +@@ -3094,6 +3098,8 @@ static int fbcon_fb_unregistered(struct fb_info *info) + { + int i, idx; + ++ WARN_CONSOLE_UNLOCKED(); ++ + idx = info->node; + for (i = first_fb_vc; i <= last_fb_vc; i++) { + if (con2fb_map[i] == idx) +@@ -3131,6 +3137,9 @@ static int fbcon_fb_unregistered(struct fb_info *info) + static void fbcon_remap_all(int idx) + { + int i; ++ ++ WARN_CONSOLE_UNLOCKED(); ++ + for (i = first_fb_vc; i <= last_fb_vc; i++) + set_con2fb_map(i, idx, 0); + +@@ -3177,6 +3186,8 @@ static int fbcon_fb_registered(struct fb_info *info) + { + int ret = 0, i, idx; + ++ WARN_CONSOLE_UNLOCKED(); ++ + idx = info->node; + fbcon_select_primary(info); + +-- +2.18.0 + diff --git a/0004-console-fbcon-Add-support-for-deferred-console-takeo.patch b/0004-console-fbcon-Add-support-for-deferred-console-takeo.patch new file mode 100644 index 000000000..36d625ef3 --- /dev/null +++ b/0004-console-fbcon-Add-support-for-deferred-console-takeo.patch @@ -0,0 +1,322 @@ +From 83d83bebf40132e2d55ec58af666713cc76f9764 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Thu, 28 Jun 2018 15:20:30 +0200 +Subject: [PATCH 4/7] console/fbcon: Add support for deferred console takeover + +Currently fbcon claims fbdevs as soon as they are registered and takes over +the console as soon as the first fbdev gets registered. + +This behavior is undesirable in cases where a smooth graphical bootup is +desired, in such cases we typically want the contents of the framebuffer +(typically a vendor logo) to stay in place as is. + +The current solution for this problem (on embedded systems) is to not +enable fbcon. + +This commit adds a new FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER config option, +which when enabled defers fbcon taking over the console from the dummy +console until the first text is displayed on the console. Together with the +"quiet" kernel commandline option, this allows fbcon to still be used +together with a smooth graphical bootup, having it take over the console as +soon as e.g. an error message is logged. + +Note the choice to detect the first console output in the dummycon driver, +rather then handling this entirely inside the fbcon code, was made after +2 failed attempts to handle this entirely inside the fbcon code. The fbcon +code is woven quite tightly into the console code, making this to only +feasible option. + +Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> +--- + Documentation/fb/fbcon.txt | 7 ++++ + drivers/video/console/Kconfig | 11 +++++ + drivers/video/console/dummycon.c | 67 +++++++++++++++++++++++++---- + drivers/video/fbdev/core/fbcon.c | 72 ++++++++++++++++++++++++++++++++ + include/linux/console.h | 5 +++ + 5 files changed, 154 insertions(+), 8 deletions(-) + +diff --git a/Documentation/fb/fbcon.txt b/Documentation/fb/fbcon.txt +index 79c22d096bbc..d4d642e1ce9c 100644 +--- a/Documentation/fb/fbcon.txt ++++ b/Documentation/fb/fbcon.txt +@@ -155,6 +155,13 @@ C. Boot options + used by text. By default, this area will be black. The 'color' value + is an integer number that depends on the framebuffer driver being used. + ++6. fbcon=nodefer ++ ++ If the kernel is compiled with deferred fbcon takeover support, normally ++ the framebuffer contents, left in place by the firmware/bootloader, will ++ be preserved until there actually is some text is output to the console. ++ This option causes fbcon to bind immediately to the fbdev device. ++ + C. Attaching, Detaching and Unloading + + Before going on how to attach, detach and unload the framebuffer console, an +diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig +index 4110ba7d7ca9..e91edef98633 100644 +--- a/drivers/video/console/Kconfig ++++ b/drivers/video/console/Kconfig +@@ -150,6 +150,17 @@ config FRAMEBUFFER_CONSOLE_ROTATION + such that other users of the framebuffer will remain normally + oriented. + ++config FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER ++ bool "Framebuffer Console Deferred Takeover" ++ depends on FRAMEBUFFER_CONSOLE=y && DUMMY_CONSOLE=y ++ help ++ If enabled this defers the framebuffer console taking over the ++ console from the dummy console until the first text is displayed on ++ the console. This is useful in combination with the "quiet" kernel ++ commandline option to keep the framebuffer contents initially put up ++ by the firmware in place, rather then replacing the contents with a ++ black screen as soon as fbcon loads. ++ + config STI_CONSOLE + bool "STI text console" + depends on PARISC && HAS_IOMEM +diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c +index f2eafe2ed980..45ad925ad5f8 100644 +--- a/drivers/video/console/dummycon.c ++++ b/drivers/video/console/dummycon.c +@@ -26,6 +26,65 @@ + #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS + #endif + ++#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER ++/* These are both protected by the console_lock */ ++static RAW_NOTIFIER_HEAD(dummycon_output_nh); ++static bool dummycon_putc_called; ++ ++void dummycon_register_output_notifier(struct notifier_block *nb) ++{ ++ raw_notifier_chain_register(&dummycon_output_nh, nb); ++ ++ if (dummycon_putc_called) ++ nb->notifier_call(nb, 0, NULL); ++} ++ ++void dummycon_unregister_output_notifier(struct notifier_block *nb) ++{ ++ raw_notifier_chain_unregister(&dummycon_output_nh, nb); ++} ++ ++static void dummycon_putc(struct vc_data *vc, int c, int ypos, int xpos) ++{ ++ dummycon_putc_called = true; ++ raw_notifier_call_chain(&dummycon_output_nh, 0, NULL); ++} ++ ++static void dummycon_putcs(struct vc_data *vc, const unsigned short *s, ++ int count, int ypos, int xpos) ++{ ++ int i; ++ ++ if (!dummycon_putc_called) { ++ /* Ignore erases */ ++ for (i = 0 ; i < count; i++) { ++ if (s[i] != vc->vc_video_erase_char) ++ break; ++ } ++ if (i == count) ++ return; ++ ++ dummycon_putc_called = true; ++ } ++ ++ raw_notifier_call_chain(&dummycon_output_nh, 0, NULL); ++} ++ ++static int dummycon_blank(struct vc_data *vc, int blank, int mode_switch) ++{ ++ /* Redraw, so that we get putc(s) for output done while blanked */ ++ return 1; ++} ++#else ++static void dummycon_putc(struct vc_data *vc, int c, int ypos, int xpos) { } ++static void dummycon_putcs(struct vc_data *vc, const unsigned short *s, ++ int count, int ypos, int xpos) { } ++static int dummycon_blank(struct vc_data *vc, int blank, int mode_switch) ++{ ++ return 0; ++} ++#endif ++ + static const char *dummycon_startup(void) + { + return "dummy device"; +@@ -44,9 +103,6 @@ static void dummycon_init(struct vc_data *vc, int init) + static void dummycon_deinit(struct vc_data *vc) { } + static void dummycon_clear(struct vc_data *vc, int sy, int sx, int height, + int width) { } +-static void dummycon_putc(struct vc_data *vc, int c, int ypos, int xpos) { } +-static void dummycon_putcs(struct vc_data *vc, const unsigned short *s, +- int count, int ypos, int xpos) { } + static void dummycon_cursor(struct vc_data *vc, int mode) { } + + static bool dummycon_scroll(struct vc_data *vc, unsigned int top, +@@ -61,11 +117,6 @@ static int dummycon_switch(struct vc_data *vc) + return 0; + } + +-static int dummycon_blank(struct vc_data *vc, int blank, int mode_switch) +-{ +- return 0; +-} +- + static int dummycon_font_set(struct vc_data *vc, struct console_font *font, + unsigned int flags) + { +diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c +index cd8d52a967aa..5fb156bdcf4e 100644 +--- a/drivers/video/fbdev/core/fbcon.c ++++ b/drivers/video/fbdev/core/fbcon.c +@@ -129,6 +129,12 @@ static inline void fbcon_map_override(void) + } + #endif /* CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY */ + ++#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER ++static bool deferred_takeover = true; ++#else ++#define deferred_takeover false ++#endif ++ + /* font data */ + static char fontname[40]; + +@@ -499,6 +505,12 @@ static int __init fb_console_setup(char *this_opt) + margin_color = simple_strtoul(options, &options, 0); + continue; + } ++#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER ++ if (!strcmp(options, "nodefer")) { ++ deferred_takeover = false; ++ continue; ++ } ++#endif + } + return 1; + } +@@ -3100,6 +3112,9 @@ static int fbcon_fb_unregistered(struct fb_info *info) + + WARN_CONSOLE_UNLOCKED(); + ++ if (deferred_takeover) ++ return 0; ++ + idx = info->node; + for (i = first_fb_vc; i <= last_fb_vc; i++) { + if (con2fb_map[i] == idx) +@@ -3140,6 +3155,13 @@ static void fbcon_remap_all(int idx) + + WARN_CONSOLE_UNLOCKED(); + ++ if (deferred_takeover) { ++ for (i = first_fb_vc; i <= last_fb_vc; i++) ++ con2fb_map_boot[i] = idx; ++ fbcon_map_override(); ++ return; ++ } ++ + for (i = first_fb_vc; i <= last_fb_vc; i++) + set_con2fb_map(i, idx, 0); + +@@ -3191,6 +3213,11 @@ static int fbcon_fb_registered(struct fb_info *info) + idx = info->node; + fbcon_select_primary(info); + ++ if (deferred_takeover) { ++ pr_info("fbcon: Deferring console take-over\n"); ++ return 0; ++ } ++ + if (info_idx == -1) { + for (i = first_fb_vc; i <= last_fb_vc; i++) { + if (con2fb_map_boot[i] == idx) { +@@ -3566,8 +3593,46 @@ static int fbcon_init_device(void) + return 0; + } + ++#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER ++static struct notifier_block fbcon_output_nb; ++ ++static int fbcon_output_notifier(struct notifier_block *nb, ++ unsigned long action, void *data) ++{ ++ int i; ++ ++ WARN_CONSOLE_UNLOCKED(); ++ ++ pr_info("fbcon: Taking over console\n"); ++ ++ dummycon_unregister_output_notifier(&fbcon_output_nb); ++ deferred_takeover = false; ++ logo_shown = FBCON_LOGO_DONTSHOW; ++ ++ for (i = 0; i < FB_MAX; i++) { ++ if (registered_fb[i]) ++ fbcon_fb_registered(registered_fb[i]); ++ } ++ ++ return NOTIFY_OK; ++} ++ ++static void fbcon_register_output_notifier(void) ++{ ++ fbcon_output_nb.notifier_call = fbcon_output_notifier; ++ dummycon_register_output_notifier(&fbcon_output_nb); ++} ++#else ++static inline void fbcon_register_output_notifier(void) {} ++#endif ++ + static void fbcon_start(void) + { ++ if (deferred_takeover) { ++ fbcon_register_output_notifier(); ++ return; ++ } ++ + if (num_registered_fb) { + int i; + +@@ -3594,6 +3659,13 @@ static void fbcon_exit(void) + if (fbcon_has_exited) + return; + ++#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER ++ if (deferred_takeover) { ++ dummycon_unregister_output_notifier(&fbcon_output_nb); ++ deferred_takeover = false; ++ } ++#endif ++ + kfree((void *)softback_buf); + softback_buf = 0UL; + +diff --git a/include/linux/console.h b/include/linux/console.h +index dfd6b0e97855..f59f3dbca65c 100644 +--- a/include/linux/console.h ++++ b/include/linux/console.h +@@ -21,6 +21,7 @@ struct console_font_op; + struct console_font; + struct module; + struct tty_struct; ++struct notifier_block; + + /* + * this is what the terminal answers to a ESC-Z or csi0c query. +@@ -220,4 +221,8 @@ static inline bool vgacon_text_force(void) { return false; } + + extern void console_init(void); + ++/* For deferred console takeover */ ++void dummycon_register_output_notifier(struct notifier_block *nb); ++void dummycon_unregister_output_notifier(struct notifier_block *nb); ++ + #endif /* _LINUX_CONSOLE_H */ +-- +2.18.0 + diff --git a/0005-efi-bgrt-Drop-__initdata-from-bgrt_image_size.patch b/0005-efi-bgrt-Drop-__initdata-from-bgrt_image_size.patch new file mode 100644 index 000000000..ec1ff7fbc --- /dev/null +++ b/0005-efi-bgrt-Drop-__initdata-from-bgrt_image_size.patch @@ -0,0 +1,33 @@ +From 421b8aef3902426c4c3ebd23218c0ad282786e1d Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Tue, 3 Jul 2018 17:43:10 +0200 +Subject: [PATCH 5/7] efi/bgrt: Drop __initdata from bgrt_image_size + +bgrt_image_size is necessary to (optionally) show the boot graphics from +the efifb code. The efifb driver is a platform driver, using a normal +driver probe() driver callback. So even though it is always builtin it +cannot reference __initdata. + +Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> +--- + drivers/firmware/efi/efi-bgrt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/firmware/efi/efi-bgrt.c b/drivers/firmware/efi/efi-bgrt.c +index 50793fda7819..b22ccfb0c991 100644 +--- a/drivers/firmware/efi/efi-bgrt.c ++++ b/drivers/firmware/efi/efi-bgrt.c +@@ -20,7 +20,7 @@ + #include <linux/efi-bgrt.h> + + struct acpi_table_bgrt bgrt_tab; +-size_t __initdata bgrt_image_size; ++size_t bgrt_image_size; + + struct bmp_header { + u16 id; +-- +2.18.0 + diff --git a/0006-efifb-Copy-the-ACPI-BGRT-boot-graphics-to-the-frameb.patch b/0006-efifb-Copy-the-ACPI-BGRT-boot-graphics-to-the-frameb.patch new file mode 100644 index 000000000..706c2f3c8 --- /dev/null +++ b/0006-efifb-Copy-the-ACPI-BGRT-boot-graphics-to-the-frameb.patch @@ -0,0 +1,201 @@ +From a5f742d7ba70c702bcf67dd1fd8d5dde3f5042fc Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Tue, 3 Jul 2018 17:43:10 +0200 +Subject: [PATCH 6/7] efifb: Copy the ACPI BGRT boot graphics to the + framebuffer + +On systems where fbcon is configured for deferred console takeover, the +intend is for the framebuffer to show the boot graphics (e.g a vendor +logo) until some message (e.g. an error) is printed or a graphical +session takes over. + +Some firmware relies on the OS to show the boot graphics. + +This patch adds support to efifb to show the boot graphics and +automatically enables this when fbcon is configured for deferred +console takeover. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> +--- + drivers/video/fbdev/efifb.c | 140 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 140 insertions(+) + +diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c +index 46a4484e3da7..fa01eecc0a55 100644 +--- a/drivers/video/fbdev/efifb.c ++++ b/drivers/video/fbdev/efifb.c +@@ -9,16 +9,39 @@ + + #include <linux/kernel.h> + #include <linux/efi.h> ++#include <linux/efi-bgrt.h> + #include <linux/errno.h> + #include <linux/fb.h> + #include <linux/pci.h> + #include <linux/platform_device.h> ++#include <linux/printk.h> + #include <linux/screen_info.h> + #include <video/vga.h> + #include <asm/efi.h> + #include <drm/drm_utils.h> /* For drm_get_panel_orientation_quirk */ + #include <drm/drm_connector.h> /* For DRM_MODE_PANEL_ORIENTATION_* */ + ++struct bmp_file_header { ++ u16 id; ++ u32 file_size; ++ u32 reserved; ++ u32 bitmap_offset; ++} __packed; ++ ++struct bmp_dib_header { ++ u32 dib_header_size; ++ s32 width; ++ s32 height; ++ u16 planes; ++ u16 bpp; ++ u32 compression; ++ u32 bitmap_size; ++ u32 horz_resolution; ++ u32 vert_resolution; ++ u32 colors_used; ++ u32 colors_important; ++} __packed; ++ + static bool request_mem_succeeded = false; + static bool nowc = false; + +@@ -66,6 +89,121 @@ static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green, + return 0; + } + ++/* ++ * If fbcon deffered console takeover is configured, the intent is for the ++ * framebuffer to show the boot graphics (e.g. vendor logo) until there is some ++ * (error) message to display. But the boot graphics may have been destroyed by ++ * e.g. option ROM output, detect this and restore the boot graphics. ++ */ ++#if defined CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER && \ ++ defined CONFIG_ACPI_BGRT ++static void efifb_copy_bmp(u8 *src, u32 *dst, int width, struct screen_info *si) ++{ ++ u8 r, g, b; ++ ++ while (width--) { ++ b = *src++; ++ g = *src++; ++ r = *src++; ++ *dst++ = (r << si->red_pos) | ++ (g << si->green_pos) | ++ (b << si->blue_pos); ++ } ++} ++ ++static void efifb_show_boot_graphics(struct fb_info *info) ++{ ++ u32 bmp_width, bmp_height, bmp_pitch, screen_pitch, dst_x, y, src_y; ++ struct screen_info *si = &screen_info; ++ struct bmp_file_header *file_header; ++ struct bmp_dib_header *dib_header; ++ void *bgrt_image = NULL; ++ u8 *dst = info->screen_base; ++ ++ if (!bgrt_tab.image_address) { ++ pr_info("efifb: No BGRT, not showing boot graphics\n"); ++ return; ++ } ++ ++ /* Avoid flashing the logo if we're going to print std probe messages */ ++ if (console_loglevel > CONSOLE_LOGLEVEL_QUIET) ++ return; ++ ++ /* bgrt_tab.status is unreliable, so we don't check it */ ++ ++ if (si->lfb_depth != 32) { ++ pr_info("efifb: not 32 bits, not showing boot graphics\n"); ++ return; ++ } ++ ++ bgrt_image = memremap(bgrt_tab.image_address, bgrt_image_size, ++ MEMREMAP_WB); ++ if (!bgrt_image) { ++ pr_warn("efifb: Ignoring BGRT: failed to map image memory\n"); ++ return; ++ } ++ ++ if (bgrt_image_size < (sizeof(*file_header) + sizeof(*dib_header))) ++ goto error; ++ ++ file_header = bgrt_image; ++ if (file_header->id != 0x4d42 || file_header->reserved != 0) ++ goto error; ++ ++ dib_header = bgrt_image + sizeof(*file_header); ++ if (dib_header->dib_header_size != 40 || dib_header->width < 0 || ++ dib_header->planes != 1 || dib_header->bpp != 24 || ++ dib_header->compression != 0) ++ goto error; ++ ++ bmp_width = dib_header->width; ++ bmp_height = abs(dib_header->height); ++ bmp_pitch = round_up(3 * bmp_width, 4); ++ screen_pitch = si->lfb_linelength; ++ ++ if ((file_header->bitmap_offset + bmp_pitch * bmp_height) > ++ bgrt_image_size) ++ goto error; ++ ++ if ((bgrt_tab.image_offset_x + bmp_width) > si->lfb_width || ++ (bgrt_tab.image_offset_y + bmp_height) > si->lfb_height) ++ goto error; ++ ++ pr_info("efifb: showing boot graphics\n"); ++ ++ for (y = 0; y < si->lfb_height; y++, dst += si->lfb_linelength) { ++ /* Only background? */ ++ if (y < bgrt_tab.image_offset_y || ++ y >= (bgrt_tab.image_offset_y + bmp_height)) { ++ memset(dst, 0, 4 * si->lfb_width); ++ continue; ++ } ++ ++ src_y = y - bgrt_tab.image_offset_y; ++ /* Positive header height means upside down row order */ ++ if (dib_header->height > 0) ++ src_y = (bmp_height - 1) - src_y; ++ ++ memset(dst, 0, bgrt_tab.image_offset_x * 4); ++ dst_x = bgrt_tab.image_offset_x; ++ efifb_copy_bmp(bgrt_image + file_header->bitmap_offset + ++ src_y * bmp_pitch, ++ (u32 *)dst + dst_x, bmp_width, si); ++ dst_x += bmp_width; ++ memset((u32 *)dst + dst_x, 0, (si->lfb_width - dst_x) * 4); ++ } ++ ++ memunmap(bgrt_image); ++ return; ++ ++error: ++ memunmap(bgrt_image); ++ pr_warn("efifb: Ignoring BGRT: unexpected or invalid BMP data\n"); ++} ++#else ++static inline void efifb_show_boot_graphics(struct fb_info *info) {} ++#endif ++ + static void efifb_destroy(struct fb_info *info) + { + if (info->screen_base) +@@ -283,6 +421,8 @@ static int efifb_probe(struct platform_device *dev) + goto err_release_fb; + } + ++ efifb_show_boot_graphics(info); ++ + pr_info("efifb: framebuffer at 0x%lx, using %dk, total %dk\n", + efifb_fix.smem_start, size_remap/1024, size_total/1024); + pr_info("efifb: mode is %dx%dx%d, linelength=%d, pages=%d\n", +-- +2.18.0 + diff --git a/0007-efifb-BGRT-Do-not-copy-the-boot-graphics-for-non-nat.patch b/0007-efifb-BGRT-Do-not-copy-the-boot-graphics-for-non-nat.patch new file mode 100644 index 000000000..4b84688e1 --- /dev/null +++ b/0007-efifb-BGRT-Do-not-copy-the-boot-graphics-for-non-nat.patch @@ -0,0 +1,85 @@ +From c4220b3f747ae6dd28171137d85fba0eab64e36d Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Tue, 24 Jul 2018 19:11:28 +0200 +Subject: [PATCH 7/7] efifb: BGRT: Do not copy the boot graphics for non native + resolutions + +On x86 some firmwares use a low non native resolution for the display when +they have shown some text messages. While keeping the bgrt filled with info +for the native resolution. If the bgrt image intended for the native +resolution still fits, it will be displayed very close to the right edge of +the display looking quite bad. + +This commits adds a (heuristics based) checks for this and makes efifb +not show the boot graphics when this is the case. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> +--- + drivers/video/fbdev/efifb.c | 43 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c +index fa01eecc0a55..52bf39f93888 100644 +--- a/drivers/video/fbdev/efifb.c ++++ b/drivers/video/fbdev/efifb.c +@@ -111,6 +111,46 @@ static void efifb_copy_bmp(u8 *src, u32 *dst, int width, struct screen_info *si) + } + } + ++#ifdef CONFIG_X86 ++/* ++ * On x86 some firmwares use a low non native resolution for the display when ++ * they have shown some text messages. While keeping the bgrt filled with info ++ * for the native resolution. If the bgrt image intended for the native ++ * resolution still fits, it will be displayed very close to the right edge of ++ * the display looking quite bad. This function checks for this. ++ */ ++static bool efifb_bgrt_sanity_check(struct screen_info *si, u32 bmp_width) ++{ ++ static const int default_resolutions[][2] = { ++ { 800, 600 }, ++ { 1024, 768 }, ++ { 1280, 1024 }, ++ }; ++ u32 i, right_margin; ++ ++ for (i = 0; i < ARRAY_SIZE(default_resolutions); i++) { ++ if (default_resolutions[i][0] == si->lfb_width && ++ default_resolutions[i][1] == si->lfb_height) ++ break; ++ } ++ /* If not a default resolution used for textmode, this should be fine */ ++ if (i >= ARRAY_SIZE(default_resolutions)) ++ return true; ++ ++ /* If the right margin is 5 times smaller then the left one, reject */ ++ right_margin = si->lfb_width - (bgrt_tab.image_offset_x + bmp_width); ++ if (right_margin < (bgrt_tab.image_offset_x / 5)) ++ return false; ++ ++ return true; ++} ++#else ++static bool efifb_bgrt_sanity_check(struct screen_info *si, u32 bmp_width) ++{ ++ return true; ++} ++#endif ++ + static void efifb_show_boot_graphics(struct fb_info *info) + { + u32 bmp_width, bmp_height, bmp_pitch, screen_pitch, dst_x, y, src_y; +@@ -169,6 +209,9 @@ static void efifb_show_boot_graphics(struct fb_info *info) + (bgrt_tab.image_offset_y + bmp_height) > si->lfb_height) + goto error; + ++ if (!efifb_bgrt_sanity_check(si, bmp_width)) ++ goto error; ++ + pr_info("efifb: showing boot graphics\n"); + + for (y = 0; y < si->lfb_height; y++, dst += si->lfb_linelength) { +-- +2.18.0 + diff --git a/configs/fedora/generic/CONFIG_CONSOLE_LOGLEVEL_QUIET b/configs/fedora/generic/CONFIG_CONSOLE_LOGLEVEL_QUIET new file mode 100644 index 000000000..b0f9eb6a2 --- /dev/null +++ b/configs/fedora/generic/CONFIG_CONSOLE_LOGLEVEL_QUIET @@ -0,0 +1 @@ +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 diff --git a/configs/fedora/generic/CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER b/configs/fedora/generic/CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER new file mode 100644 index 000000000..62979153f --- /dev/null +++ b/configs/fedora/generic/CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER @@ -0,0 +1 @@ +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y diff --git a/configs/fedora/generic/x86/x86_64/CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 b/configs/fedora/generic/x86/x86_64/CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 new file mode 100644 index 000000000..ad7ea72d0 --- /dev/null +++ b/configs/fedora/generic/x86/x86_64/CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 @@ -0,0 +1 @@ +CONFIG_TOUCHSCREEN_CHIPONE_ICN8505=m diff --git a/kernel-aarch64-debug.config b/kernel-aarch64-debug.config index f2489c47e..58e976956 100644 --- a/kernel-aarch64-debug.config +++ b/kernel-aarch64-debug.config @@ -990,6 +990,7 @@ CONFIG_COMPACTION=y CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONSOLE_TRANSLATIONS=y CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m @@ -1819,6 +1820,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-aarch64.config b/kernel-aarch64.config index 09ba5c062..e4f78405a 100644 --- a/kernel-aarch64.config +++ b/kernel-aarch64.config @@ -990,6 +990,7 @@ CONFIG_COMPACTION=y CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONSOLE_TRANSLATIONS=y CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m @@ -1801,6 +1802,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-armv7hl-debug.config b/kernel-armv7hl-debug.config index 72a505842..362f4bcc2 100644 --- a/kernel-armv7hl-debug.config +++ b/kernel-armv7hl-debug.config @@ -1024,6 +1024,7 @@ CONFIG_COMPACTION=y CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1935,6 +1936,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-armv7hl-lpae-debug.config b/kernel-armv7hl-lpae-debug.config index 81ef06112..5377ad668 100644 --- a/kernel-armv7hl-lpae-debug.config +++ b/kernel-armv7hl-lpae-debug.config @@ -990,6 +990,7 @@ CONFIG_COMPACTION=y CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1839,6 +1840,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-armv7hl-lpae.config b/kernel-armv7hl-lpae.config index 21f200d56..deee81563 100644 --- a/kernel-armv7hl-lpae.config +++ b/kernel-armv7hl-lpae.config @@ -989,6 +989,7 @@ CONFIG_COMPACTION=y CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1821,6 +1822,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-armv7hl.config b/kernel-armv7hl.config index d81f28103..e20e13e6e 100644 --- a/kernel-armv7hl.config +++ b/kernel-armv7hl.config @@ -1023,6 +1023,7 @@ CONFIG_COMPACTION=y CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1917,6 +1918,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-i686-PAE.config b/kernel-i686-PAE.config index ae2feca2d..996057b27 100644 --- a/kernel-i686-PAE.config +++ b/kernel-i686-PAE.config @@ -835,6 +835,7 @@ CONFIG_COMPAL_LAPTOP=m CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1643,6 +1644,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-i686-PAEdebug.config b/kernel-i686-PAEdebug.config index 34fa6ef07..3ceb5c28c 100644 --- a/kernel-i686-PAEdebug.config +++ b/kernel-i686-PAEdebug.config @@ -838,6 +838,7 @@ CONFIG_COMPAL_LAPTOP=m CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1664,6 +1665,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-i686-debug.config b/kernel-i686-debug.config index d99171272..2ccd70b2c 100644 --- a/kernel-i686-debug.config +++ b/kernel-i686-debug.config @@ -838,6 +838,7 @@ CONFIG_COMPAL_LAPTOP=m CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1664,6 +1665,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-i686.config b/kernel-i686.config index c4a9393c3..46ca899c0 100644 --- a/kernel-i686.config +++ b/kernel-i686.config @@ -835,6 +835,7 @@ CONFIG_COMPAL_LAPTOP=m CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1643,6 +1644,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-ppc64-debug.config b/kernel-ppc64-debug.config index b856d001d..91242d277 100644 --- a/kernel-ppc64-debug.config +++ b/kernel-ppc64-debug.config @@ -826,6 +826,7 @@ CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y # CONFIG_CONSISTENT_SIZE_BOOL is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1578,6 +1579,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-ppc64.config b/kernel-ppc64.config index 4009c30e3..b5946a308 100644 --- a/kernel-ppc64.config +++ b/kernel-ppc64.config @@ -823,6 +823,7 @@ CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y # CONFIG_CONSISTENT_SIZE_BOOL is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1557,6 +1558,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config index 8dd84cea1..8e63a6633 100644 --- a/kernel-ppc64le-debug.config +++ b/kernel-ppc64le-debug.config @@ -782,6 +782,7 @@ CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y # CONFIG_CONSISTENT_SIZE_BOOL is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1531,6 +1532,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config index 656a21e7a..d2494fa10 100644 --- a/kernel-ppc64le.config +++ b/kernel-ppc64le.config @@ -779,6 +779,7 @@ CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y # CONFIG_CONSISTENT_SIZE_BOOL is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1510,6 +1511,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-s390x-debug.config b/kernel-s390x-debug.config index a62e2ca32..118479d15 100644 --- a/kernel-s390x-debug.config +++ b/kernel-s390x-debug.config @@ -784,6 +784,7 @@ CONFIG_COMPAT=y CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1516,6 +1517,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-s390x.config b/kernel-s390x.config index 7c7e35e20..e4251036c 100644 --- a/kernel-s390x.config +++ b/kernel-s390x.config @@ -781,6 +781,7 @@ CONFIG_COMPAT=y CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_CORDIC=m CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y @@ -1495,6 +1496,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y diff --git a/kernel-x86_64-debug.config b/kernel-x86_64-debug.config index 1749cb00f..cf64b227f 100644 --- a/kernel-x86_64-debug.config +++ b/kernel-x86_64-debug.config @@ -856,6 +856,7 @@ CONFIG_COMPAL_LAPTOP=m CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y # CONFIG_CONTEXT_TRACKING_FORCE is not set CONFIG_CORDIC=m @@ -1708,6 +1709,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y @@ -5850,7 +5852,7 @@ CONFIG_TOUCHSCREEN_ATMEL_MXT=m CONFIG_TOUCHSCREEN_AUO_PIXCIR=m # CONFIG_TOUCHSCREEN_BU21013 is not set # CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set -# CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 is not set +CONFIG_TOUCHSCREEN_CHIPONE_ICN8505=m # CONFIG_TOUCHSCREEN_CY8CTMG110 is not set # CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set # CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set diff --git a/kernel-x86_64.config b/kernel-x86_64.config index 9c21fd160..29928b09f 100644 --- a/kernel-x86_64.config +++ b/kernel-x86_64.config @@ -853,6 +853,7 @@ CONFIG_COMPAL_LAPTOP=m CONFIG_CONFIGFS_FS=y CONFIG_CONNECTOR=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=3 CONFIG_CONTEXT_SWITCH_TRACER=y # CONFIG_CONTEXT_TRACKING_FORCE is not set CONFIG_CORDIC=m @@ -1687,6 +1688,7 @@ CONFIG_FPGA_MGR_MACHXO2_SPI=m CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_MGR_ZYNQ_FPGA=m CONFIG_FPGA_REGION=m +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE=y @@ -5825,7 +5827,7 @@ CONFIG_TOUCHSCREEN_ATMEL_MXT=m CONFIG_TOUCHSCREEN_AUO_PIXCIR=m # CONFIG_TOUCHSCREEN_BU21013 is not set # CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set -# CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 is not set +CONFIG_TOUCHSCREEN_CHIPONE_ICN8505=m # CONFIG_TOUCHSCREEN_CY8CTMG110 is not set # CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set # CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set diff --git a/kernel.spec b/kernel.spec index 85bb6fa1f..257550117 100644 --- a/kernel.spec +++ b/kernel.spec @@ -625,6 +625,15 @@ Patch514: 0005-treewide-Rename-HOSTLDFLAGS-to-KBUILD_HOSTLDFLAGS.patch Patch515: 0006-treewide-Rename-HOST_LOADLIBES-to-KBUILD_HOSTLDLIBS.patch Patch516: 0007-Kbuild-Use-HOST-FLAGS-options-from-the-command-line.patch +# For quiet / flickerfree boot, all queued for merging into 4.19-rc1 +Patch521: 0001-printk-Make-CONSOLE_LOGLEVEL_QUIET-configurable.patch +Patch522: 0002-printk-Export-is_console_locked.patch +Patch523: 0003-fbcon-Call-WARN_CONSOLE_UNLOCKED-where-applicable.patch +Patch524: 0004-console-fbcon-Add-support-for-deferred-console-takeo.patch +Patch525: 0005-efi-bgrt-Drop-__initdata-from-bgrt_image_size.patch +Patch526: 0006-efifb-Copy-the-ACPI-BGRT-boot-graphics-to-the-frameb.patch +Patch527: 0007-efifb-BGRT-Do-not-copy-the-boot-graphics-for-non-nat.patch + # END OF PATCH DEFINITIONS %endif @@ -1884,6 +1893,12 @@ fi # # %changelog +* Mon Jul 30 2018 Hans de Goede <hdegoede@redhat.com> +- Add patch queued in -next to make quiet more quiet +- Add patches queued in -next to make efifb / fbcon retain the vendor logo + (ACPI BRGT boot graphics) until the first text is output to the console +- Enable support for ICN8505 touchscreen used on some Cherry Trail tablets + * Fri Jul 27 2018 Peter Robinson <pbrobinson@fedoraproject.org> - Enable FPGA Manager kernel framework |