From a69214dc719862b8433608d7e914e51464dfd14c Mon Sep 17 00:00:00 2001
From: Eric Nelson <eric.nelson@boundarydevices.com>
Date: Tue, 29 Apr 2014 14:37:56 -0700
Subject: [PATCH 1/4] 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.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Marek Vasut <marex@denx.de>
---
 drivers/video/mxc_ipuv3_fb.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
index 3e21fb2306..f75d77064e 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);
 

From e1ae71d8f4dd8e3f366f341e8a309e95e79945a0 Mon Sep 17 00:00:00 2001
From: Thomas Diener <dietho@gmx.de>
Date: Wed, 23 Apr 2014 07:52:45 +0200
Subject: [PATCH 2/4] logos: Update of the syteco company logo

Signed-off-by: Thomas Diener <dietho@gmx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 tools/logos/syteco.bmp | Bin 11414 -> 11414 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/tools/logos/syteco.bmp b/tools/logos/syteco.bmp
index 9a994fe3e3812bdc2d63f7045d2740d931b2a42a..14031f2c8c5eaee2e961a89b684ac3c986329673 100644
GIT binary patch
literal 11414
zcmeI0OOD(i5Qb^bSc;U3%p&U?AnW81xk)eQ1UXONtWyOB*Nc}y-K~+4JO&D=kDmh5
z^Xt#QAI_(r@6LTd?h~Hh@Lb$CUypzOeh&{+q5;$0xhp*P`}KOg-)^@%rcjTz^Eov*
zW8kaC!1^lb(wNp&Hk>>IIef1C2#}>Ec@Wlcz9MY+T;T+f%AAT2MYgDf{X{C4<<Y^K
z{5=<Becw{zY0Sia@NVlN=gHNFVc^>q(wd-%lT4O19R|VCB879E9D7IX+K{q}aEuX-
zArOJ#7AAIPLAGjWO7(DW4SMKf%EySraLZEmO|6pS_|hnhL5_n<qcKJ~4uKdL!yE@<
z#KIWn=#LQ-V**F#(%^x`c3miR?U!{mM(9)oIMg8YxHmRB-Lsg7<3bJLD|*fmgM(t=
zM<32$eGeco(Vd!5G?d?Abj`srav%nWQnu_rSv`p2kQf;di$j7WPn8UUNDhtR?_+9d
zOb!83ale~kbirX^SRlCDW7@|PgHb~{-^hVCRIW&tg9dBaH?y|sp%t0U0Z?=XaE@k@
zP~>SGVrd@6!B)>G#2|%tw1z5jv_?bQ+g_Ji--mG!N0n?uRv*l0XnSY$s5mF)=;q`I
zqMUk=;D9V1EtsAiAO6&T367x1^YsXdyaER*GLs`+i0OxnhovfoFEmCf`L<vdtJ)Jg
zPt(nuap=2%yca<W@HmeHu3g*o=(IHlc;y$g0Mb5t-ID2n!+Wn4J#hMyK?KJJQsuBg
zsET^Z#Tv;GK<XSO2-`D7x5}tEJV*nF0Rp{9tSVQ<3fgnqYWVw#Ds04Q2qF<9;tVOe
zRYt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#USJV*tH0RpQ?tSVR84!UwXYWVjRRoIBr5JVzIL=MTiRfCLU2dUx^iU^FJ
z{1KDSt&W3%NQ^#?xSH;Z($MZ;!O@pbG0K9I29A9yiP6K5&8&OnTX<urac$YB3XG_%
zc4_xmAdMW7Ahd0F>0Se*g#-Qz+~i0*OpRzmO&p8Kk#d&nS0HU1i=ju(U3yG{baTYZ
zbK0dnB0zdMFzwrpO1&JUlOuePN-phj2GYk7Fh(fS#St;if{=@D566LV9^}}v+N=(L
v-!AOjQj8HG2a<6m=FVaZmJGf;QwXdp^U*bbS~I1ozV-x>`b|atPencepjJ52


From 264e0e591bbd1c66d6bd5fb8f2438f17c3ba17ea Mon Sep 17 00:00:00 2001
From: Stephen Warren <swarren@nvidia.com>
Date: Fri, 18 Apr 2014 11:15:55 -0600
Subject: [PATCH 3/4] config: enable CMD_BMP when API+LCD is enabled

When both CONFIG_API and CONFIG_LCD are enabled, the API code calls
lcd_display_bitmap(). That isn't compiled unless either CONFIG_CMD_BMP
or CONFIG_SPLASH_SCREEN is enabled. In order to prevent build problems,
have config_fallbacks.h enable CONFIG_CMD_BMP when both API and LCD are
enabled.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
 include/config_fallbacks.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index e6fb47be0b..b304a4103d 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -71,6 +71,10 @@
 #define CONFIG_LIB_RAND
 #endif
 
+#if defined(CONFIG_API) && defined(CONFIG_LCD)
+#define CONFIG_CMD_BMP
+#endif
+
 #ifndef CONFIG_SYS_PROMPT
 #define CONFIG_SYS_PROMPT	"=> "
 #endif

From 1161f98db687a1cb263cbacdc7eb548a0354218d Mon Sep 17 00:00:00 2001
From: "Wu, Josh" <Josh.wu@atmel.com>
Date: Mon, 10 Mar 2014 16:40:41 +0800
Subject: [PATCH 4/4] at91: video: atmel_hlcdfb.c: fix bad timing configuration

The right correspondance between LCD margins and LCD timings is:
    * upper margin -> vertical back porch
    * lower margin -> vertical front porch
    * left  margin -> horizontal back porch
    * right margin -> horizontal front porch

Signed-off-by: Josh Wu <josh.wu@atmel.com>
---
 drivers/video/atmel_hlcdfb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 853303b5e5..bb4d7d8c14 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -128,12 +128,12 @@ void lcd_ctrl_init(void *lcdbase)
 	value |= LCDC_LCDCFG1_HSPW(panel_info.vl_hsync_len - 1);
 	lcdc_writel(&regs->lcdc_lcdcfg1, value);
 
-	value = LCDC_LCDCFG2_VBPW(panel_info.vl_lower_margin);
-	value |= LCDC_LCDCFG2_VFPW(panel_info.vl_upper_margin - 1);
+	value = LCDC_LCDCFG2_VBPW(panel_info.vl_upper_margin);
+	value |= LCDC_LCDCFG2_VFPW(panel_info.vl_lower_margin - 1);
 	lcdc_writel(&regs->lcdc_lcdcfg2, value);
 
-	value = LCDC_LCDCFG3_HBPW(panel_info.vl_right_margin - 1);
-	value |= LCDC_LCDCFG3_HFPW(panel_info.vl_left_margin - 1);
+	value = LCDC_LCDCFG3_HBPW(panel_info.vl_left_margin - 1);
+	value |= LCDC_LCDCFG3_HFPW(panel_info.vl_right_margin - 1);
 	lcdc_writel(&regs->lcdc_lcdcfg3, value);
 
 	/* Display size */