diff mbox

[U-Boot,v2,08/13] video: exynos: fimd: add support for various display color modes

Message ID 068e55e613fd9f077b4dbf9e5c41bf8f2a5d3546.1387390491.git.p.marczak@samsung.com
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Commit Message

Przemyslaw Marczak Dec. 18, 2013, 6:31 p.m. UTC
Now fimd BPP color mode depends on vl_bpp value in struct "panel_info".

There is only 16BPP mode check, default mode is 24BPP.
Other fimd modes are usually unneeded and also needs some fimd driver
modifications and tests.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>

---
Changes v2:
- check panel_info vl_bpix when setting fimd color mode
- move boards configs update to another commit.
---
 drivers/video/exynos_fimd.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

Comments

Donghwa Lee Dec. 19, 2013, 5:08 a.m. UTC | #1
Hi,

On 19 Dec, 2013 03:31, Przemyslaw Marczak wrote:
> Now fimd BPP color mode depends on vl_bpp value in struct "panel_info".
>
> There is only 16BPP mode check, default mode is 24BPP.
> Other fimd modes are usually unneeded and also needs some fimd driver
> modifications and tests.
>
> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
>
> ---
> Changes v2:
> - check panel_info vl_bpix when setting fimd color mode
> - move boards configs update to another commit.
> ---
>  drivers/video/exynos_fimd.c |   15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
> index f962c4f..cebbba7 100644
> --- a/drivers/video/exynos_fimd.c
> +++ b/drivers/video/exynos_fimd.c
> @@ -73,18 +73,19 @@ static void exynos_fimd_set_par(unsigned int win_id)
>  	/* DATAPATH is DMA */
>  	cfg |= EXYNOS_WINCON_DATAPATH_DMA;
>  
> -	if (pvid->logo_on) /* To get proprietary LOGO */
> -		cfg |= EXYNOS_WINCON_WSWP_ENABLE;
> -	else /* To get output console on LCD */
> -		cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
> +	cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
>  
>  	/* dma burst is 16 */
>  	cfg |= EXYNOS_WINCON_BURSTLEN_16WORD;
>  
> -	if (pvid->logo_on) /* To get proprietary LOGO */
> -		cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
> -	else /* To get output console on LCD */
> +	switch (pvid->vl_bpix) {
> +	case 4:
>  		cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
> +		break;
> +	default:
> +		cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
> +		break;
> +	}
>  
>  	writel(cfg, (unsigned int)&fimd_ctrl->wincon0 +
>  			EXYNOS_WINCON(win_id));

It looks good to me.
Acked-by: Donghwa Lee <dh09.lee@samsung.com>

BR,
Donghwa Lee.
diff mbox

Patch

diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
index f962c4f..cebbba7 100644
--- a/drivers/video/exynos_fimd.c
+++ b/drivers/video/exynos_fimd.c
@@ -73,18 +73,19 @@  static void exynos_fimd_set_par(unsigned int win_id)
 	/* DATAPATH is DMA */
 	cfg |= EXYNOS_WINCON_DATAPATH_DMA;
 
-	if (pvid->logo_on) /* To get proprietary LOGO */
-		cfg |= EXYNOS_WINCON_WSWP_ENABLE;
-	else /* To get output console on LCD */
-		cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
+	cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
 
 	/* dma burst is 16 */
 	cfg |= EXYNOS_WINCON_BURSTLEN_16WORD;
 
-	if (pvid->logo_on) /* To get proprietary LOGO */
-		cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
-	else /* To get output console on LCD */
+	switch (pvid->vl_bpix) {
+	case 4:
 		cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
+		break;
+	default:
+		cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
+		break;
+	}
 
 	writel(cfg, (unsigned int)&fimd_ctrl->wincon0 +
 			EXYNOS_WINCON(win_id));