From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/5] efi_loader: gop: Expose fb when 32bpp
Date: Tue, 7 Jun 2016 00:57:05 +0200 [thread overview]
Message-ID: <1465253827-126767-4-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1465253827-126767-1-git-send-email-agraf@suse.de>
When we're running in 32bpp mode, expose the frame buffer address
to our payloads so that Linux efifb can pick it up.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
lib/efi_loader/efi_gop.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 33a3d71..286ad83 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -129,6 +129,7 @@ int efi_gop_register(void)
{
struct efi_gop_obj *gopobj;
u32 bpix, col, row;
+ u64 fb_base, fb_size;
#ifdef CONFIG_DM_VIDEO
struct udevice *vdev;
@@ -141,11 +142,16 @@ int efi_gop_register(void)
bpix = priv->bpix;
col = video_get_xsize(vdev);
row = video_get_ysize(vdev);
+ fb_base = (uintptr_t)priv->fb;
+ fb_size = priv->fb_size;
#else
+ int line_len;
bpix = panel_info.vl_bpix;
col = panel_info.vl_col;
row = panel_info.vl_row;
+ fb_base = gd->fb_base;
+ fb_size = lcd_get_size(&line_len);
#endif
switch (bpix) {
@@ -177,6 +183,16 @@ int efi_gop_register(void)
gopobj->mode.info = &gopobj->info;
gopobj->mode.info_size = sizeof(gopobj->info);
+#ifdef CONFIG_DM_VIDEO
+ if (bpix == VIDEO_BPP32) {
+#else
+ if (bpix == LCD_COLOR32) {
+#endif
+ /* With 32bit color space we can directly expose the fb */
+ gopobj->mode.fb_base = fb_base;
+ gopobj->mode.fb_size = fb_size;
+ }
+
gopobj->info.version = 0;
gopobj->info.width = col;
gopobj->info.height = row;
--
1.8.5.6
next prev parent reply other threads:[~2016-06-06 22:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 22:57 [U-Boot] [PATCH v2 0/5] Raspberry Pi EFI enablement Alexander Graf
2016-06-06 22:57 ` [U-Boot] [PATCH v2 1/5] efi_loader: Allow boards to implement get_time and reset_system Alexander Graf
2016-06-06 22:57 ` [U-Boot] [PATCH v2 2/5] ARM: bcm283x: Implement EFI RTS reset_system Alexander Graf
2016-11-14 9:23 ` [U-Boot] [U-Boot, v2, " Alexander Graf
2016-06-06 22:57 ` Alexander Graf [this message]
2016-10-13 14:34 ` [U-Boot] [U-Boot,v2,3/5] efi_loader: gop: Expose fb when 32bpp Alexander Graf
2016-06-06 22:57 ` [U-Boot] [PATCH v2 4/5] bcm2835 video: Map frame buffer as 32bpp Alexander Graf
2016-11-14 9:23 ` [U-Boot] [U-Boot, v2, " Alexander Graf
2016-11-14 9:25 ` Alexander Graf
2016-06-06 22:57 ` [U-Boot] [PATCH v2 5/5] bcm2835: Reserve the spin table in efi memory map Alexander Graf
2016-11-14 9:23 ` [U-Boot] [U-Boot, v2, " Alexander Graf
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=1465253827-126767-4-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox