[PATCH 8/8] video: efi_gop: add $global.bootm.earlycon fixup for framebuffer console
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon May 23 02:25:26 PDT 2022
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/video/efi_gop.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/drivers/video/efi_gop.c b/drivers/video/efi_gop.c
index 52387f30dcd0..5e9bc406e1b6 100644
--- a/drivers/video/efi_gop.c
+++ b/drivers/video/efi_gop.c
@@ -238,11 +238,23 @@ static int efi_gop_probe(struct efi_device *efidev)
priv->fb.current_mode = priv->mode;
ret = register_framebuffer(&priv->fb);
- if (!ret) {
- priv->dev->priv = &priv->fb;
- return 0;
+ if (ret)
+ goto free_modes;
+
+ priv->dev->priv = &priv->fb;
+
+ if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE)) {
+ struct console_device *cdev;
+
+ cdev = console_get_by_dev(&priv->fb.dev);
+ if (cdev)
+ dev_add_param_fixed(&cdev->class_dev, "linux.bootargs.earlycon",
+ "earlycon=efifb");
}
+ return 0;
+
+free_modes:
if (priv->fb.modes.modes) {
int i;
--
2.30.2
More information about the barebox
mailing list