Commit cf7389b8 authored by Hans de Goede's avatar Hans de Goede Committed by Bartlomiej Zolnierkiewicz

efifb: BGRT: Add nobgrt option

In some setups restoring the BGRT logo is undesirable, allow passing
video=efifb:nobgrt on the kernel commandline to disable it.
Reported-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 1bafcbf5
...@@ -42,6 +42,7 @@ struct bmp_dib_header { ...@@ -42,6 +42,7 @@ struct bmp_dib_header {
u32 colors_important; u32 colors_important;
} __packed; } __packed;
static bool use_bgrt = true;
static bool request_mem_succeeded = false; static bool request_mem_succeeded = false;
static u64 mem_flags = EFI_MEMORY_WC | EFI_MEMORY_UC; static u64 mem_flags = EFI_MEMORY_WC | EFI_MEMORY_UC;
...@@ -160,6 +161,9 @@ static void efifb_show_boot_graphics(struct fb_info *info) ...@@ -160,6 +161,9 @@ static void efifb_show_boot_graphics(struct fb_info *info)
void *bgrt_image = NULL; void *bgrt_image = NULL;
u8 *dst = info->screen_base; u8 *dst = info->screen_base;
if (!use_bgrt)
return;
if (!bgrt_tab.image_address) { if (!bgrt_tab.image_address) {
pr_info("efifb: No BGRT, not showing boot graphics\n"); pr_info("efifb: No BGRT, not showing boot graphics\n");
return; return;
...@@ -290,6 +294,8 @@ static int efifb_setup(char *options) ...@@ -290,6 +294,8 @@ static int efifb_setup(char *options)
screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0); screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0);
else if (!strcmp(this_opt, "nowc")) else if (!strcmp(this_opt, "nowc"))
mem_flags &= ~EFI_MEMORY_WC; mem_flags &= ~EFI_MEMORY_WC;
else if (!strcmp(this_opt, "nobgrt"))
use_bgrt = false;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment