diff mbox

[U-Boot,5/5] video: Modify exynos_fimd driver to support LCD console.

Message ID 1355223686-13718-5-git-send-email-ajaykumar.rs@samsung.com
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Commit Message

Ajay Kumar Dec. 11, 2012, 11:01 a.m. UTC
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.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
 drivers/video/exynos_fimd.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

Comments

Simon Glass Dec. 12, 2012, 2:46 p.m. UTC | #1
On Tue, Dec 11, 2012 at 3:01 AM, Ajay Kumar <ajaykumar.rs@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.
>
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>

Eventual FDT support should help to remove these ifdefs. But even in
the meantime, would it not be better to create a new
CONFIG_EXYNOS_FIMD_... option to select the behavior and then put the
option in the board config file?

Regards,
Simon

> ---
>  drivers/video/exynos_fimd.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
> index 06eae2e..8a12c30 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_TIZEN /* Tizen uses Proprietary LOGO */
>         cfg |= EXYNOS_WINCON_WSWP_ENABLE;
> +#else  /* Other boards must use 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_TIZEN /* Tizen uses Proprietary LOGO */
>         cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
> +#else  /* Other boards must use 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
>
diff mbox

Patch

diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
index 06eae2e..8a12c30 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_TIZEN /* Tizen uses Proprietary LOGO */
 	cfg |= EXYNOS_WINCON_WSWP_ENABLE;
+#else	/* Other boards must use 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_TIZEN /* Tizen uses Proprietary LOGO */
 	cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
+#else	/* Other boards must use output console on LCD */
+	cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
+#endif
 
 	writel(cfg, (unsigned int)&fimd_ctrl->wincon0 +
 			EXYNOS_WINCON(win_id));