All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/5] efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD
Date: Sat, 24 Jun 2017 19:05:22 -0400	[thread overview]
Message-ID: <20170624230523.2327-5-robdclark@gmail.com> (raw)
In-Reply-To: <20170624230523.2327-1-robdclark@gmail.com>

Signed-off-by: Rob Clark <robdclark@gmail.com>
Cc: Alexander Graf <agraf@suse.de>
---
 cmd/bootefi.c            | 2 +-
 lib/efi_loader/Makefile  | 1 +
 lib/efi_loader/efi_gop.c | 7 ++++++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index a6598df..4f11682 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -280,7 +280,7 @@ static unsigned long do_bootefi_exec(void *efi, void *fdt)
 #ifdef CONFIG_PARTITIONS
 	efi_disk_register();
 #endif
-#ifdef CONFIG_LCD
+#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
 	efi_gop_register();
 #endif
 #ifdef CONFIG_NET
diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile
index fa8b91a..3c230ac 100644
--- a/lib/efi_loader/Makefile
+++ b/lib/efi_loader/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o
 obj-y += efi_image_loader.o efi_boottime.o efi_runtime.o efi_console.o
 obj-y += efi_memory.o
 obj-$(CONFIG_LCD) += efi_gop.o
+obj-$(CONFIG_DM_VIDEO) += efi_gop.o
 obj-$(CONFIG_PARTITIONS) += efi_disk.o
 obj-$(CONFIG_NET) += efi_net.o
 obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += efi_smbios.o
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 286ad83..b8b0d5e 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -28,6 +28,7 @@ struct efi_gop_obj {
 	struct efi_gop_mode mode;
 	/* Fields we only have acces to during init */
 	u32 bpix;
+	void *fb;
 };
 
 static efi_status_t EFIAPI gop_query_mode(struct efi_gop *this, u32 mode_number,
@@ -71,7 +72,7 @@ static efi_status_t EFIAPI gop_blt(struct efi_gop *this, void *buffer,
 	if (operation != EFI_BLT_BUFFER_TO_VIDEO)
 		return EFI_EXIT(EFI_INVALID_PARAMETER);
 
-	fb = (void*)gd->fb_base;
+	fb = gopobj->fb;
 	line_len16 = gopobj->info.width * sizeof(u16);
 	line_len32 = gopobj->info.width * sizeof(u32);
 
@@ -130,6 +131,7 @@ int efi_gop_register(void)
 	struct efi_gop_obj *gopobj;
 	u32 bpix, col, row;
 	u64 fb_base, fb_size;
+	void *fb;
 
 #ifdef CONFIG_DM_VIDEO
 	struct udevice *vdev;
@@ -144,6 +146,7 @@ int efi_gop_register(void)
 	row = video_get_ysize(vdev);
 	fb_base = (uintptr_t)priv->fb;
 	fb_size = priv->fb_size;
+	fb = priv->fb;
 #else
 	int line_len;
 
@@ -152,6 +155,7 @@ int efi_gop_register(void)
 	row = panel_info.vl_row;
 	fb_base = gd->fb_base;
 	fb_size = lcd_get_size(&line_len);
+	fb = gd->fb_base;
 #endif
 
 	switch (bpix) {
@@ -200,6 +204,7 @@ int efi_gop_register(void)
 	gopobj->info.pixels_per_scanline = col;
 
 	gopobj->bpix = bpix;
+	gopobj->fb = fb;
 
 	/* Hook up to the device list */
 	list_add_tail(&gopobj->parent.link, &efi_obj_list);
-- 
2.9.4

  parent reply	other threads:[~2017-06-24 23:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-24 23:05 [U-Boot] [PATCH 0/5] db410c: updates for grub + gfxterm Rob Clark
2017-06-24 23:05 ` [U-Boot] [PATCH 1/5] board/db410c: use fdt passed from lk Rob Clark
2017-07-07 15:17   ` Tom Rini
2017-06-24 23:05 ` [U-Boot] [PATCH 2/5] dm: core: also parse chosen node Rob Clark
2017-06-24 23:05 ` [U-Boot] [PATCH 3/5] video: simplefb Rob Clark
2017-06-24 23:05 ` Rob Clark [this message]
2017-07-12 12:52   ` [U-Boot] [PATCH 4/5] efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD Alexander Graf
2017-07-18 14:00     ` Simon Glass
2017-07-18 14:47       ` Alexander Graf
2017-07-18 14:54         ` Simon Glass
2017-07-18 15:06           ` Alexander Graf
2017-07-18 17:07             ` Tom Rini
2017-07-19 10:02               ` Wenyou.Yang at microchip.com
2017-07-19 16:24             ` Rob Clark
2017-07-21 10:48               ` Simon Glass
2017-07-21 15:58                 ` Tom Rini
2017-07-21 17:54                   ` Rob Clark
2017-07-21 10:47             ` Rob Clark
2017-06-24 23:05 ` [U-Boot] [PATCH 5/5] configs: db410c: config updates Rob Clark
2017-07-06 12:02 ` [U-Boot] [PATCH 0/5] db410c: updates for grub + gfxterm Mateusz Kulikowski
2017-07-19 16:49   ` Rob Clark
2017-07-19 17:54     ` Rob Clark

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=20170624230523.2327-5-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.