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

Minkyu Kang mk7.kang at samsung.com
Fri Dec 21 03:59:34 CET 2012


Dear Ajay,

On 21/12/12 10:53, Donghwa Lee wrote:
> 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 at 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.

I agreed with Donghwa.
Ajay, please check it.

> 
> Thank you,
> Donghwa Lee
> 

Thanks.
Minkyu Kang.



More information about the U-Boot mailing list