Re: [U-Boot] [PATCH 2/2] Moving mx3fb.c to CONFIG_VIDEO
On Tue, 20 Sep 2011 15:09:19 +0200 Stefano Babic sba...@denx.de wrote: Hi Anatolij, Hi Stefano, I'm not really ok with it as is. Currently we have video support for two boards in the tree using the mx3fb driver. Applying this patch as is will break the display support for qong and imx31_phycore. I'd prefer a patch fixing this, also e.g. fixing the defines in the affected board config files and adding the display configuration environment variables to CONFIG_EXTRA_ENV_SETTINGS. Currently I do not have access to the imx31 boards to test/fix this. Stefano, can you test this patch on qong board to ensure that at least on one board the display support is working with changed mx3fb driver? I tried, I cannot. We have not the LCD anymore for the QONG board ;-(( I have patched the QONG for fixing the build, but I cannot test it. now I see that we have a 240x320 display for pcm037 board in the lab. The display works in Linux, but doesn't seem to work in u-boot, still do not know were the issue is, I've just tested it with v2011.09-rc2. I'll try to test the patch on the imx31_phycore board with our display this week. Thanks, Anatolij -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Moving mx3fb.c to CONFIG_VIDEO
On 09/20/2011 03:09 PM, Stefano Babic wrote: I tried, I cannot. We have not the LCD anymore for the QONG board ;-(( I have patched the QONG for fixing the build, but I cannot test it. Best regards, Stefano I don't really know how to address this, but what if we simply insert a compile time warning into these board supports, like: warning: Display setup defined, but settings not tested!. Helmut -- Scanned by MailScanner. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Moving mx3fb.c to CONFIG_VIDEO
On 09/21/2011 10:02 AM, Helmut Raiger wrote: On 09/20/2011 03:09 PM, Stefano Babic wrote: I tried, I cannot. We have not the LCD anymore for the QONG board ;-(( I have patched the QONG for fixing the build, but I cannot test it. Best regards, Stefano I don't really know how to address this, but what if we simply insert a compile time warning into these board supports, like: warning: Display setup defined, but settings not tested!. I have nothing against this...it seems at the moment your board is the only one doing something with the framebuffer. We will not get a QONG with display, and the other one (imx31_phycore) has no maintainer anymore and is one of the orphaned boards. Best regards, Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Moving mx3fb.c to CONFIG_VIDEO
On 09/05/2011 01:47 PM, Helmut Raiger wrote: mx3fb.c was based on CONFIG_LCD and is moved by this patch to CONFIG_VIDEO, which has greater freedom in selecting videomodes even at runtime. Hi Anatolji, do you have some comments about this patch ? Is it ok for you if I put it in my IMX queue ? The driver is for iMX-only, and I would check if everything remains consistent. Thanks, Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Moving mx3fb.c to CONFIG_VIDEO
Hi Stefano, Helmut, On Tue, 20 Sep 2011 13:44:33 +0200 Stefano Babic sba...@denx.de wrote: On 09/05/2011 01:47 PM, Helmut Raiger wrote: mx3fb.c was based on CONFIG_LCD and is moved by this patch to CONFIG_VIDEO, which has greater freedom in selecting videomodes even at runtime. Hi Anatolji, do you have some comments about this patch ? Is it ok for you if I put it in my IMX queue ? The driver is for iMX-only, and I would check if everything remains consistent. I'm not really ok with it as is. Currently we have video support for two boards in the tree using the mx3fb driver. Applying this patch as is will break the display support for qong and imx31_phycore. I'd prefer a patch fixing this, also e.g. fixing the defines in the affected board config files and adding the display configuration environment variables to CONFIG_EXTRA_ENV_SETTINGS. Currently I do not have access to the imx31 boards to test/fix this. Stefano, can you test this patch on qong board to ensure that at least on one board the display support is working with changed mx3fb driver? Best regards, Anatolij -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Moving mx3fb.c to CONFIG_VIDEO
On 09/20/2011 02:36 PM, Anatolij Gustschin wrote: Hi Stefano, Helmut, Hi Anatolij, I'm not really ok with it as is. Currently we have video support for two boards in the tree using the mx3fb driver. Applying this patch as is will break the display support for qong and imx31_phycore. I'd prefer a patch fixing this, also e.g. fixing the defines in the affected board config files and adding the display configuration environment variables to CONFIG_EXTRA_ENV_SETTINGS. Currently I do not have access to the imx31 boards to test/fix this. Stefano, can you test this patch on qong board to ensure that at least on one board the display support is working with changed mx3fb driver? I tried, I cannot. We have not the LCD anymore for the QONG board ;-(( I have patched the QONG for fixing the build, but I cannot test it. Best regards, Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] Moving mx3fb.c to CONFIG_VIDEO
mx3fb.c was based on CONFIG_LCD and is moved by this patch to CONFIG_VIDEO, which has greater freedom in selecting videomodes even at runtime. This renders the accumulating list of display defines (CONFIG_DISPLAY_VBEST..., CONFIG_DISPLAY_C057...) obsolete as these may be setup through env variables: setenv mydisplay video=ctfb:x:240,y:320,depth:16,mode:0,pclk:185925, le:9,ri:17,up:7,lo:10,hs:1,vs:1,sync:100663296,vmode:0 setenv videomode mydisplay Signed-off-by: Helmut Raiger helmut.rai...@hale.at --- V2: - replace __REG() in mx3fb.c by readl()/writel() - cosmetic changes (newlines, multiline comments) - clock init and divider setup clarified - printf() instead of debug() for width and height coerces drivers/video/Makefile |2 +- drivers/video/cfb_console.c |7 + drivers/video/mx3fb.c | 449 +-- 3 files changed, 265 insertions(+), 193 deletions(-) diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 086dc05..2c0e500 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -34,7 +34,7 @@ COBJS-$(CONFIG_VIDEO_AMBA) += amba.o COBJS-$(CONFIG_VIDEO_CT69000) += ct69000.o videomodes.o COBJS-$(CONFIG_VIDEO_MB862xx) += mb862xx.o videomodes.o COBJS-$(CONFIG_VIDEO_MB86R0xGDC) += mb86r0xgdc.o videomodes.o -COBJS-$(CONFIG_VIDEO_MX3) += mx3fb.o +COBJS-$(CONFIG_VIDEO_MX3) += mx3fb.o videomodes.o COBJS-$(CONFIG_VIDEO_MX5) += mxc_ipuv3_fb.o ipu_common.o ipu_disp.o COBJS-$(CONFIG_VIDEO_SED13806) += sed13806.o COBJS-$(CONFIG_SED156X) += sed156x.o diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 3a93b64..4e653b8 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -161,6 +161,13 @@ #endif /* + * Defines for the i.MX31 driver (mx3fb.c) + */ +#ifdef CONFIG_VIDEO_MX3 +#define VIDEO_FB_16BPP_WORD_SWAP +#endif + +/* * Include video_fb.h after definitions of VIDEO_HW_RECTFILL etc. */ #include video_fb.h diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c index 0c925a0..0f33847 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c @@ -1,6 +1,8 @@ /* * Copyright (C) 2009 * Guennadi Liakhovetski, DENX Software Engineering, l...@denx.de + * Copyright (C) 2011 + * HALE electronic GmbH, helmut.rai...@hale.at * * See file CREDITS for list of people who contributed to this * project. @@ -21,100 +23,20 @@ * MA 02111-1307 USA */ #include common.h -#include lcd.h -#include asm/arch/clock.h +#include malloc.h +#include video_fb.h + #include asm/arch/imx-regs.h +#include asm/arch/clock.h #include asm/errno.h +#include asm/io.h -DECLARE_GLOBAL_DATA_PTR; - -void *lcd_base;/* Start of framebuffer memory */ -void *lcd_console_address; /* Start of console buffer */ - -int lcd_line_length; -int lcd_color_fg; -int lcd_color_bg; - -short console_col; -short console_row; - -void lcd_initcolregs(void) -{ -} - -void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue) -{ -} - -void lcd_disable(void) -{ -} - -void lcd_panel_disable(void) -{ -} +#include videomodes.h -#define msleep(a) udelay(a * 1000) - -#if defined(CONFIG_DISPLAY_VBEST_VGG322403) -#define XRES 320 -#define YRES 240 -#define PANEL_TYPE IPU_PANEL_TFT -#define PIXEL_CLK 156000 -#define PIXEL_FMT IPU_PIX_FMT_RGB666 -#define H_START_WIDTH 20 /* left_margin */ -#define H_SYNC_WIDTH 30 /* hsync_len */ -#define H_END_WIDTH(38 + 30) /* right_margin + hsync_len */ -#define V_START_WIDTH 7 /* upper_margin */ -#define V_SYNC_WIDTH 3 /* vsync_len */ -#define V_END_WIDTH(26 + 3)/* lower_margin + vsync_len */ -#define SIG_POL(DI_D3_DRDY_SHARP_POL | DI_D3_CLK_POL) +/* this might need panel specific set-up as-well */ #define IF_CONF0 -#define IF_CLK_DIV 0x175 -#elif defined(CONFIG_DISPLAY_COM57H5M10XRC) -#define XRES 640 -#define YRES 480 -#define PANEL_TYPE IPU_PANEL_TFT -#define PIXEL_CLK 4 -#define PIXEL_FMT IPU_PIX_FMT_RGB666 -#define H_START_WIDTH 120 /* left_margin */ -#define H_SYNC_WIDTH 30 /* hsync_len */ -#define H_END_WIDTH(10 + 30) /* right_margin + hsync_len */ -#define V_START_WIDTH 35 /* upper_margin */ -#define V_SYNC_WIDTH 3 /* vsync_len */ -#define V_END_WIDTH(7 + 3) /* lower_margin + vsync_len */ -#define SIG_POL(DI_D3_DRDY_SHARP_POL | DI_D3_CLK_POL) -#define IF_CONF0 -#define IF_CLK_DIV 0x55 -#else -#define XRES 240 -#define YRES 320 -#define PANEL_TYPE IPU_PANEL_TFT -#define PIXEL_CLK 185925 -#define PIXEL_FMT IPU_PIX_FMT_RGB666 -#define H_START_WIDTH 9 /* left_margin */ -#define H_SYNC_WIDTH 1 /* hsync_len */ -#define H_END_WIDTH(16 + 1)/* right_margin +