public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] video: mxc_ipuv3_fb: stash frame buffer pointer in global data.
Date: Tue, 29 Apr 2014 14:13:22 -0700	[thread overview]
Message-ID: <1398806002-25067-1-git-send-email-eric.nelson@boundarydevices.com> (raw)

This patch updates the i.MX video driver to store the
frame-buffer address in the fb_base field of the global
data structure *gd.

By doing this, you can find the frame buffer address
using the 'bdinfo' command:

	U-Boot > bdinfo
	arch_number = 0x00000EB9
	...
	FB base     = 0x4F35F1C0

This is very useful when debugging display connections.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
 drivers/video/mxc_ipuv3_fb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
index 3e21fb2..08a94c2 100644
--- a/drivers/video/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc_ipuv3_fb.c
@@ -10,9 +10,9 @@
  *
  * SPDX-License-Identifier:	GPL-2.0+
  */
-
 #include <common.h>
 #include <asm/errno.h>
+#include <asm/global_data.h>
 #include <linux/string.h>
 #include <linux/list.h>
 #include <linux/fb.h>
@@ -24,6 +24,8 @@
 #include "mxcfb.h"
 #include "ipu_regs.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 static int mxcfb_map_video_memory(struct fb_info *fbi);
 static int mxcfb_unmap_video_memory(struct fb_info *fbi);
 
@@ -415,6 +417,7 @@ static int mxcfb_map_video_memory(struct fb_info *fbi)
 
 	fbi->screen_size = fbi->fix.smem_len;
 
+	gd->fb_base = fbi->fix.smem_start;
 	/* Clear the screen */
 	memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);
 
-- 
1.9.1

             reply	other threads:[~2014-04-29 21:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29 21:13 Eric Nelson [this message]
2014-04-29 21:26 ` [U-Boot] [PATCH] video: mxc_ipuv3_fb: stash frame buffer pointer in global data Otavio Salvador
2014-04-29 21:34   ` Eric Nelson
2014-04-29 23:46   ` Marek Vasut
2014-04-29 21:37 ` [U-Boot] [PATCH V2] " Eric Nelson
2014-04-29 23:45   ` Marek Vasut
2014-04-30  9:19   ` Anatolij Gustschin

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=1398806002-25067-1-git-send-email-eric.nelson@boundarydevices.com \
    --to=eric.nelson@boundarydevices.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox