[U-Boot] FW: [PATCH 06/10] video: exynos: fimd: always use 16bpp display mode.

Przemyslaw Marczak p.marczak at samsung.com
Tue Dec 10 09:15:36 CET 2013


Hello Donghwa,

On 12/10/2013 06:47 AM, Donghwa Lee wrote:
> Hi,
> 
> On 3 Dec 2013 18:03, Przemyslaw wrote:
>> This change updates exynos board files too.
>> 16 bpp mode is required by LCD console mode.
>>
>> Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
>> ---
>>   board/samsung/trats/trats.c              |    2 +-
>>   board/samsung/trats2/trats2.c            |    2 +-
>>   board/samsung/universal_c210/universal.c |    2 +-
>>   drivers/video/exynos_fimd.c              |   10 ++--------
>>   include/configs/s5pc210_universal.h      |    2 +-
>>   include/configs/trats.h                  |    2 +-
>>   include/configs/trats2.h                 |    2 +-
>>   7 files changed, 8 insertions(+), 14 deletions(-)
>>
>> diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
>> index ce4b41f..db527c7 100644
>> --- a/board/samsung/trats/trats.c
>> +++ b/board/samsung/trats/trats.c
>> @@ -739,7 +739,7 @@ vidinfo_t panel_info = {
>>   	.vl_hsp		= CONFIG_SYS_LOW,
>>   	.vl_vsp		= CONFIG_SYS_LOW,
>>   	.vl_dp		= CONFIG_SYS_LOW,
>> -	.vl_bpix	= 5,	/* Bits per pixel, 2^5 = 32 */
>> +	.vl_bpix	= 4,	/* Bits per pixel, 2^4 = 16 */
>>   
>>   	/* s6e8ax0 Panel infomation */
>>   	.vl_hspw	= 5,
>> diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
>> index 73b8cc1..6fa02c9 100644
>> --- a/board/samsung/trats2/trats2.c
>> +++ b/board/samsung/trats2/trats2.c
>> @@ -542,7 +542,7 @@ vidinfo_t panel_info = {
>>   	.vl_hsp		= CONFIG_SYS_LOW,
>>   	.vl_vsp		= CONFIG_SYS_LOW,
>>   	.vl_dp		= CONFIG_SYS_LOW,
>> -	.vl_bpix	= 5,	/* Bits per pixel, 2^5 = 32 */
>> +	.vl_bpix	= 4,	/* Bits per pixel, 2^4 = 16 */
>>   
>>   	/* s6e8ax0 Panel infomation */
>>   	.vl_hspw	= 5,
>> diff --git a/board/samsung/universal_c210/universal.c
>> b/board/samsung/universal_c210/universal.c
>> index 166d5ee..1ebea0f 100644
>> --- a/board/samsung/universal_c210/universal.c
>> +++ b/board/samsung/universal_c210/universal.c
>> @@ -446,7 +446,7 @@ vidinfo_t panel_info = {
>>   	.vl_vsp		= CONFIG_SYS_HIGH,
>>   	.vl_dp		= CONFIG_SYS_HIGH,
>>   
>> -	.vl_bpix	= 5,	/* Bits per pixel */
>> +	.vl_bpix	= 4,	/* Bits per pixel */
>>   
>>   	/* LD9040 LCD Panel */
>>   	.vl_hspw	= 2,
>> diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
>> index f962c4f..847fbe8 100644
>> --- a/drivers/video/exynos_fimd.c
>> +++ b/drivers/video/exynos_fimd.c
>> @@ -73,18 +73,12 @@ 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 */
>> -		cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
>> +	cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
>>   
> 
> Why does exynos fimd always use 16bpp display mode?

Good question. I switched fimd to 16BPP because of LCD framework which
supports in max 16BPP mode for LCD console. Leaving fimd 32BPP mode and
16BPP console is possible but it causes wrong setup of lcd console row
and columns, it also displays wrong size fonts.

> It could be used as other bpp modes in exynos.
> How do you use above vl_bpix variable in panel_info structure to check bpp mode?

Actually vl_bpix was never used to check BPP mode in fimd driver, it was
only used to set proper memory space. Fimd BPP mode was set by checking
logo_on in panel_info structure.
This is good reason to use vl_bpix in fimd driver to set proper BPP. I
will change this to something like this:

if (pvid->vl_bpix == 4)
	cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
else
	cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;

Do you agree?

> 
> 
> BR,
> Donghwa Lee.
> 

Thank you,
-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com


More information about the U-Boot mailing list