summaryrefslogtreecommitdiffstats
path: root/drivers/video/efi_gop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/efi_gop.c')
-rw-r--r--drivers/video/efi_gop.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/drivers/video/efi_gop.c b/drivers/video/efi_gop.c
index 7c083e4fb3..cd2506c04b 100644
--- a/drivers/video/efi_gop.c
+++ b/drivers/video/efi_gop.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2011 Intel Corporation; author Matt Fleming
* Copyright (c) 2017 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
- *
- * GPL v2
*/
#include <common.h>
@@ -13,7 +12,7 @@
#include <errno.h>
#include <gui/graphic_utils.h>
#include <efi.h>
-#include <efi/efi.h>
+#include <efi/efi-payload.h>
#include <efi/efi-device.h>
#define PIXEL_RGB_RESERVED_8BIT_PER_COLOR 0
@@ -64,7 +63,7 @@ struct efi_graphics_output_protocol {
};
struct efi_gop_priv {
- struct device_d *dev;
+ struct device *dev;
struct fb_info fb;
uint32_t mode;
@@ -239,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;