All of lore.kernel.org
 help / color / mirror / Atom feed
From: Donghwa Lee <dh09.lee@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 3/4] video: Modify exynos_fimd driver to support LCD console
Date: Fri, 21 Dec 2012 10:53:56 +0900	[thread overview]
Message-ID: <50D3C134.3050909@samsung.com> (raw)
In-Reply-To: <1356006906-31510-4-git-send-email-ajaykumar.rs@samsung.com>

On 2012? 12? 20? 21:35, Ajay Kumar 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_EXYNOS_LOGO for proprietary Logo, and if
> CONFIG_EXYNOS_LOGO is not defined you get output console on LCD.
> CONFIG_EXYNOS_LOGO is added to Trats configuration to keep
> existing logo feature intact in Trats.
>
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>   drivers/video/exynos_fb.c   |    5 ++++-
>   drivers/video/exynos_fimd.c |   10 ++++++++--
>   include/configs/trats.h     |    1 +
>   3 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
> index d9a3f9a..c111a09 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_EXYNOS_LOGO
>   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)
>   {
> @@ -142,12 +144,13 @@ void lcd_ctrl_init(void *lcdbase)
>   
>   void lcd_enable(void)
>   {
> +#ifdef CONFIG_EXYNOS_LOGO
>   	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..f2e4c27 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_EXYNOS_LOGO /* To get proprietary LOGO */
>   	cfg |= EXYNOS_WINCON_WSWP_ENABLE;
> +#else	/* To get output console on LCD */
> +	cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
> +#endif
>   
>   	/* dma burst is 16 */
>   	cfg |= EXYNOS_WINCON_BURSTLEN_16WORD;
>   
> -	/* pixel format is unpacked RGB888 */
> +#ifdef CONFIG_EXYNOS_LOGO /* 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));
> diff --git a/include/configs/trats.h b/include/configs/trats.h
> index a24e945..1573573 100644
> --- a/include/configs/trats.h
> +++ b/include/configs/trats.h
> @@ -252,6 +252,7 @@
>   #define CONFIG_EXYNOS_FB
>   #define CONFIG_LCD
>   #define CONFIG_CMD_BMP
> +#define CONFIG_EXYNOS_LOGO
>   #define CONFIG_BMP_32BPP
>   #define CONFIG_FB_ADDR		0x52504000
>   #define CONFIG_S6E8AX0
Hi,

How about use 'if (vid->logo_on)' instead of #ifdef CONFIG_EXYNOS_LOGO?
In the vidinfo_t structure, 'logo_on' flag already exist.

Thank you,
Donghwa Lee

  parent reply	other threads:[~2012-12-21  1:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20 12:35 [U-Boot] [PATCH V3 0/4] Add support for FIMD and DP on SMDK5250 Ajay Kumar
2012-12-20 12:35 ` [U-Boot] [PATCH RESEND V2 1/4] EXYNOS5: Change parent clock of FIMD to MPLL Ajay Kumar
2012-12-21  1:46   ` Donghwa Lee
2012-12-20 12:35 ` [U-Boot] [PATCH V3 2/4] EXYNOS: Add dummy definition to fix compilation dependency on CONFIG_EXYNOS_MIPI_DSIM Ajay Kumar
2012-12-20 20:40   ` Simon Glass
2012-12-21  1:47   ` Donghwa Lee
2012-12-20 12:35 ` [U-Boot] [PATCH V3 3/4] video: Modify exynos_fimd driver to support LCD console Ajay Kumar
2012-12-20 20:46   ` Simon Glass
2012-12-21  1:53   ` Donghwa Lee [this message]
2012-12-21  2:59     ` Minkyu Kang
2012-12-20 12:35 ` [U-Boot] [PATCH V3 4/4] EXYNOS5: Add support for FIMD and DP Ajay Kumar
2012-12-20 20:47   ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50D3C134.3050909@samsung.com \
    --to=dh09.lee@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.