[U-Boot] [PATCH V2 3/4] video: Modify exynos_fimd driver to support LCD console

Simon Glass sjg at chromium.org
Fri Dec 14 23:38:23 CET 2012


Hi Ajay,

On Thu, Dec 13, 2012 at 3:29 AM, Ajay Kumar <ajaykumar.rs at samsung.com> wrote:
> Currently, exynos FIMD driver is being used to support only TIZEN LOGOs.
> In order to get LCD console, we need to enable half word swap feature
> of FIMD and use 16 BPP.
> LCD console and proprietary Logo cannot be used simultaneously.
> You should define CONFIG_CMD_BMP for proprietary Logo, and if
> CONFIG_CMD_BMP is not defined you get output console on LCD.
>
> Signed-off-by: Ajay Kumar <ajaykumar.rs at samsung.com>
> ---
>  drivers/video/exynos_fb.c   |    5 ++++-
>  drivers/video/exynos_fimd.c |   10 ++++++++--
>  2 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
> index 39d3b74..cb19192 100644
> --- a/drivers/video/exynos_fb.c
> +++ b/drivers/video/exynos_fb.c
> @@ -65,6 +65,7 @@ static void exynos_lcd_init(vidinfo_t *vid)
>         exynos_fimd_lcd_init(vid);
>  }
>
> +#ifdef CONFIG_CMD_BMP
>  static void draw_logo(void)
>  {
>         int x, y;
> @@ -87,6 +88,7 @@ static void draw_logo(void)
>         addr = panel_info.logo_addr;
>         bmp_display(addr, x, y);
>  }
> +#endif
>
>  static void lcd_panel_on(vidinfo_t *vid)
>  {
> @@ -146,12 +148,13 @@ void lcd_ctrl_init(void *lcdbase)
>
>  void lcd_enable(void)
>  {
> +#ifdef CONFIG_CMD_BMP
>         if (panel_info.logo_on) {
>                 memset(lcd_base, 0, panel_width * panel_height *
>                                 (NBITS(panel_info.vl_bpix) >> 3));
>                 draw_logo();
>         }
> -
> +#endif
>         lcd_panel_on(&panel_info);
>  }
>
> diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
> index 06eae2e..0776b6d 100644
> --- a/drivers/video/exynos_fimd.c
> +++ b/drivers/video/exynos_fimd.c
> @@ -88,14 +88,20 @@ static void exynos_fimd_set_par(unsigned int win_id)
>         /* DATAPATH is DMA */
>         cfg |= EXYNOS_WINCON_DATAPATH_DMA;
>
> -       /* bpp is 32 */
> +#ifdef CONFIG_CMD_BMP /* To get proprietary LOGO */
>         cfg |= EXYNOS_WINCON_WSWP_ENABLE;
> +#else  /* To get output console on LCD */
> +       cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
> +#endif

It seems like you should use CONFIG_LCD_LOGO instead of
CONFIG_CMD_BMP, since people might want that command for other
reasons. Or do want a specific CONFIG for this feature?

>
>         /* dma burst is 16 */
>         cfg |= EXYNOS_WINCON_BURSTLEN_16WORD;
>
> -       /* pixel format is unpacked RGB888 */
> +#ifdef CONFIG_CMD_BMP /* To get proprietary LOGO */
>         cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
> +#else  /* To get output console on LCD */
> +       cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
> +#endif
>
>         writel(cfg, (unsigned int)&fimd_ctrl->wincon0 +
>                         EXYNOS_WINCON(win_id));
> --
> 1.7.1
>

Regards,
Simon


More information about the U-Boot mailing list