summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-05-23 11:25:26 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-06-09 11:24:13 +0200
commiteb2b2ae07f074fdad79840f78d3dcd88105a5fb1 (patch)
tree1034d1dbfd4c901de1848b97b71e4564f3b11b83 /drivers/video
parenteb58e266f71947f4ff45f9520edf133ee016b21e (diff)
downloadbarebox-eb2b2ae07f074fdad79840f78d3dcd88105a5fb1.tar.gz
barebox-eb2b2ae07f074fdad79840f78d3dcd88105a5fb1.tar.xz
video: efi_gop: add $global.bootm.earlycon fixup for framebuffer console
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220523092526.791716-8-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/efi_gop.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/video/efi_gop.c b/drivers/video/efi_gop.c
index 52387f30dc..5e9bc406e1 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;