From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 8/8] video: efi_gop: add $global.bootm.earlycon fixup for framebuffer console
Date: Mon, 23 May 2022 11:25:26 +0200 [thread overview]
Message-ID: <20220523092526.791716-8-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20220523092526.791716-1-a.fatoum@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2022-05-23 10:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 9:25 [PATCH 1/8] console: add new $global.bootm.earlycon parameter Ahmad Fatoum
2022-05-23 9:25 ` [PATCH 2/8] serial: ns16550: add $global.bootm.earlycon fixup support Ahmad Fatoum
2022-05-23 9:25 ` [PATCH 3/8] serial: amba-pl011: " Ahmad Fatoum
2022-05-23 9:25 ` [PATCH 4/8] serial: atmel: " Ahmad Fatoum
2022-05-23 9:25 ` [PATCH 5/8] serial: imx: " Ahmad Fatoum
2022-05-23 11:04 ` Sascha Hauer
2022-05-23 11:10 ` Ahmad Fatoum
2022-05-23 11:25 ` Sascha Hauer
2022-05-24 7:35 ` Ahmad Fatoum
2022-06-09 9:25 ` Sascha Hauer
2022-05-23 9:25 ` [PATCH 6/8] serial: litex: add linux console/earlycon " Ahmad Fatoum
2022-05-23 9:25 ` [PATCH 7/8] serial: lpuart: add $global.bootm.earlycon " Ahmad Fatoum
2022-05-23 9:25 ` Ahmad Fatoum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220523092526.791716-8-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox