Skip to contentSkip to conversation

efifb: BGRT: Add nobgrt option

PATCH In review Hans de Goede 3 participants 3 messages Sep 12, 2018 – Sep 26, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efifb: BGRT: Add nobgrt option

In some setups restoring the BGRT logo is undesirable, allow passing videoïifb:nobgrt on the kernel commandline to disable it.

---
 drivers/video/fbdev/efifb.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/video/fbdev/efifb.c +6 -0
index 3946649b85c8..ba906876cc45 100644
@@ -42,6 +42,7 @@ struct bmp_dib_header {
 	u32 colors_important;
 } __packed;
 
+static bool use_bgrt = true;
 static bool request_mem_succeeded = false;
 static u64 mem_flags = EFI_MEMORY_WC | EFI_MEMORY_UC;
 
@@ -160,6 +161,9 @@ static void efifb_show_boot_graphics(struct fb_info *info)
 	void *bgrt_image = NULL;
 	u8 *dst = info->screen_base;
 
+	if (!use_bgrt)
+		return;
+
 	if (!bgrt_tab.image_address) {
 		pr_info("efifb: No BGRT, not showing boot graphics\n");
 		return;
@@ -290,6 +294,8 @@ static int efifb_setup(char *options)
 				screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0);
 			else if (!strcmp(this_opt, "nowc"))
 				mem_flags &= ~EFI_MEMORY_WC;
+			else if (!strcmp(this_opt, "nobgrt"))
+				use_bgrt = false;
 		}
 	}
 
Signature · 1 line
2.19.0.rc0
Reviewed-by on v1 1/1
#1 lore raw

Hi

Quoted 10 lines · Hans de Goede

In some setups restoring the BGRT logo is undesirable, allow passing videoïifb:nobgrt on the kernel commandline to disable it.

---
 drivers/video/fbdev/efifb.c | 6 ++++++
 1 file changed, 6 insertions(+)

Thanks a lot!
David

Quoted 34 lines
drivers/video/fbdev/efifb.c +6 -1
index 3946649b85c8..ba906876cc45 100644
@@ -42,6 +42,7 @@ struct bmp_dib_header {
        u32 colors_important;
 } __packed;
 
+static bool use_bgrt = true;
 static bool request_mem_succeeded = false;
 static u64 mem_flags = EFI_MEMORY_WC | EFI_MEMORY_UC;
 
@@ -160,6 +161,9 @@ static void efifb_show_boot_graphics(struct fb_info *info)
        void *bgrt_image = NULL;
        u8 *dst = info->screen_base;
 
+       if (!use_bgrt)
+               return;
+
        if (!bgrt_tab.image_address) {
                pr_info("efifb: No BGRT, not showing boot graphics\n");
                return;
@@ -290,6 +294,8 @@ static int efifb_setup(char *options)
                                screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0);
                        else if (!strcmp(this_opt, "nowc"))
                                mem_flags &= ~EFI_MEMORY_WC;
+                       else if (!strcmp(this_opt, "nobgrt"))
+                               use_bgrt = false;
                }
        }
 
--

2.19.0.rc0

#2 lore raw
Quoted 7 lines · David Herrmann

Hi

Quoted 4 lines · Hans de Goede

In some setups restoring the BGRT logo is undesirable, allow passing videoïifb:nobgrt on the kernel commandline to disable it.

Quoted 8 lines
Quoted 6 lines
---
 drivers/video/fbdev/efifb.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch queued for 4.19, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics