Skip to contentSkip to conversation

video: mxc_ipuv3_fb: stash frame buffer pointer in global data.

PATCH New Eric Nelson 4 participants 7 messages Apr 29, 2014 – Apr 30, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: mxc_ipuv3_fb: stash frame buffer pointer in global data.

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.

---
 drivers/video/mxc_ipuv3_fb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/video/mxc_ipuv3_fb.c +4 -1
index 3e21fb2..08a94c2 100644
@@ -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);
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 video: mxc_ipuv3_fb: stash frame buffer pointer in global data.

Hello Eric,

Quoted 24 lines · Eric Nelson

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.

---
 drivers/video/mxc_ipuv3_fb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/video/mxc_ipuv3_fb.c +0 -0
index 3e21fb2..08a94c2 100644

drivers/video/mxc_ipuv3_fb.c line 13

Quoted 4 lines
drivers/video/mxc_ipuv3_fb.c +0 -1
@@ -10,9 +10,9 @@
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
-

Don't remove lines.

Quoted 16 lines
drivers/video/mxc_ipuv3_fb.c +3 -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);
 

drivers/video/mxc_ipuv3_fb.c static int mxcfb_map_video_memory(struct fb_info *fbi) · line 420

Quoted 4 lines
drivers/video/mxc_ipuv3_fb.c +1 -0
@@ -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;

I would add a new line after this. It looks ugly too close of the comment and memset.

drivers/video/mxc_ipuv3_fb.c static int mxcfb_map_video_memory(struct fb_info *fbi) · line 422

Quoted 2 lines
drivers/video/mxc_ipuv3_fb.c +0 -0
        /* Clear the screen */
        memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);

Apart from that, please add my Acked-by.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#2 lore raw

PATCH 1/1 video: mxc_ipuv3_fb: stash frame buffer pointer in global data.

Hi Otavio,

Quoted 23 lines · Otavio Salvador

Hello Eric,

Quoted 19 lines · Eric Nelson

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.

---
  drivers/video/mxc_ipuv3_fb.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
Quoted 12 lines

drivers/video/mxc_ipuv3_fb.c line 13

Quoted 9 lines
drivers/video/mxc_ipuv3_fb.c +0 -1
index 3e21fb2..08a94c2 100644
@@ -10,9 +10,9 @@
   *
   * SPDX-License-Identifier:    GPL-2.0+
   */
-

Don't remove lines.

Oops. That's where my "#define DEBUG" lived...

Quoted 15 lines
Quoted 15 lines
drivers/video/mxc_ipuv3_fb.c +3 -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);
 
Quoted 9 lines

drivers/video/mxc_ipuv3_fb.c static int mxcfb_map_video_memory(struct fb_info *fbi) · line 420

Quoted 5 lines
drivers/video/mxc_ipuv3_fb.c +1 -0
@@ -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;

I would add a new line after this. It looks ugly too close of the comment and memset.

This is the part that keeps me from thinking I can ever get a patch V1 right...

Quoted 5 lines

drivers/video/mxc_ipuv3_fb.c static int mxcfb_map_video_memory(struct fb_info *fbi) · line 422

Quoted 2 lines
drivers/video/mxc_ipuv3_fb.c +0 -0
         /* Clear the screen */
         memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);

Apart from that, please add my Acked-by.

Will do in V2.

Regards,

Eric

#3 lore raw

PATCH 1/1 video: mxc_ipuv3_fb: stash frame buffer pointer in global data.

In reply to Otavio Salvador

On Tuesday, April 29, 2014 at 11:26:41 PM, Otavio Salvador wrote:

[...]

Quoted 4 lines
Quoted 2 lines
        /* Clear the screen */
        memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);

Apart from that, please add my Acked-by.

Please add proper tags, otherwise patchwork cannot pick this automatically and you are only adding work onto others' shoulders .

Best regards,
Marek Vasut

#4 lore raw

PATCH v2 1/1 video: mxc_ipuv3_fb: stash frame buffer pointer in global data.

In reply to Eric Nelson

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.

---
 drivers/video/mxc_ipuv3_fb.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/video/mxc_ipuv3_fb.c +5 -0
index 3e21fb2..f75d770 100644
@@ -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);
 
Signature · 1 line
1.9.1
#5 lore raw

PATCH v2 1/1 video: mxc_ipuv3_fb: stash frame buffer pointer in global data.

Quoted 7 lines · Eric Nelson

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:

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

This is very useful when debugging display connections.

Best regards,
Marek Vasut

#6 lore raw

PATCH v2 1/1 video: mxc_ipuv3_fb: stash frame buffer pointer in global data.

In reply to Eric Nelson
Quoted 12 lines · On Tue, 29 Apr 2014 14:37:56 -0700 Eric Nelson…

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
Quoted 7 lines

This is very useful when debugging display connections.

---
 drivers/video/mxc_ipuv3_fb.c | 5 +++++
 1 file changed, 5 insertions(+)

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

Anatolij