diff mbox

[U-Boot,V2] video: mxc_ipuv3_fb: stash frame buffer pointer in global data.

Message ID 1398807476-29867-1-git-send-email-eric.nelson@boundarydevices.com
State Accepted
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Eric Nelson April 29, 2014, 9:37 p.m. UTC
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>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
---
 drivers/video/mxc_ipuv3_fb.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Marek Vasut April 29, 2014, 11:45 p.m. UTC | #1
On Tuesday, April 29, 2014 at 11:37:56 PM, Eric Nelson wrote:
> 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>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
Anatolij Gustschin April 30, 2014, 9:19 a.m. UTC | #2
On Tue, 29 Apr 2014 14:37:56 -0700
Eric Nelson <eric.nelson@boundarydevices.com> wrote:

> 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>
> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  drivers/video/mxc_ipuv3_fb.c | 5 +++++
>  1 file changed, 5 insertions(+)

applied to u-boot-video/master. Thanks!

Anatolij
diff mbox

Patch

diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
index 3e21fb2..f75d770 100644
--- a/drivers/video/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc_ipuv3_fb.c
@@ -13,6 +13,7 @@ 
 
 #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 +25,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 +418,8 @@  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);