From a69214dc719862b8433608d7e914e51464dfd14c Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Tue, 29 Apr 2014 14:37:56 -0700 Subject: 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 Acked-by: Otavio Salvador Acked-by: Marek Vasut --- drivers/video/mxc_ipuv3_fb.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers') 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 #include +#include #include #include #include @@ -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); -- cgit v1.2.1 From 1161f98db687a1cb263cbacdc7eb548a0354218d Mon Sep 17 00:00:00 2001 From: "Wu, Josh" Date: Mon, 10 Mar 2014 16:40:41 +0800 Subject: 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 --- drivers/video/atmel_hlcdfb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') 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(®s->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(®s->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(®s->lcdc_lcdcfg3, value); /* Display size */ -- cgit v1.2.1