[U-Boot-Users] [RFC] Splash image

Wolfgang Grandegger wg at grandegger.com
Thu Jul 19 16:41:49 CEST 2007


Rodolfo Giometti wrote:
> On Thu, Jul 19, 2007 at 11:52:40AM +0200, Rodolfo Giometti wrote:
>> On Thu, Jul 19, 2007 at 11:47:59AM +0200, Wolfgang Grandegger wrote:
>>> Rodolfo Giometti wrote:
>>>> On Wed, Jul 18, 2007 at 06:17:12PM +0200, Wolfgang Grandegger wrote:
>>>>> Rodolfo Giometti wrote:
>>>>>> On Wed, Jul 18, 2007 at 06:03:54PM +0200, Wolfgang Grandegger wrote:
>>>>>>> What color format do you want to support?
>>>>>> 16 bpp
>>>>> Then use "drivers/cfb_console.c" as it already supports that format. 
>>>>> Adapting the interface to pxafb should not be a big deal.
>>>> In order to adapt pxafb support to "drivers/cfb_console.c" I think I
>>>> should move cpu/pxa/pxafb.c to drivers/pxafb.c adapting the internal
>>>> functions to use video_hw_init() and video_set_lut(). Is that right?
>>> I think so and drivers is also the correct place for pxafb.c.
>> Ok, I'll propose a patch ASAP. However, simply moving the file from
>> cpu/pxa/ to drivers/ shouldn't break any code but modifying it in
>> order to support cfb_console.c will do.
>>
>> What do you suggest in order to do the right steps? Maybe should I
>> remove lcd.c support before doing my modifications?
> 
> Just to gain some time and doing some tests I did the modifications in
> order to support splash screen into cfb_console for PXAFB.
> 
> I noticed that I have to disable some code regarding LCD otherwise
> there are doubled code execution and several incongruences, see here:
> 
>    static int bmp_display(ulong addr, int x, int y)
>    {
>    #if defined(CONFIG_LCD)
>            extern int lcd_display_bitmap (ulong, int, int);
> 
>            return (lcd_display_bitmap (addr, x, y));
>    #elif defined(CONFIG_VIDEO)
>            extern int video_display_bitmap (ulong, int, int);
>            return (video_display_bitmap (addr, x, y));
>    #else
>    # error bmp_display() requires CONFIG_LCD or CONFIG_VIDEO
>    #endif
>    }
> 
> This code seems OK but if you doesn't define CONFIG_LCD you cannot get
> framebuffer memory here (lib_arm/board.c):
> 
>    #ifdef CONFIG_LCD
>    #       ifndef PAGE_SIZE
>    #         define PAGE_SIZE 4096
>    #       endif
>            /*
>             * reserve memory for LCD display (always full pages)
>             */
>            /* bss_end is defined in the board-specific linker script */
>            addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
>            size = lcd_setmem (addr);
>            gd->fb_base = addr;
>    #endif /* CONFIG_LCD */
> 
> Ok, I can add a defined() but this is not the right solution IMHO.

OK, why not.

> I wish to remove LCD support at all... are you agree? Any suggestions
> in order to which steps I should do for better result?

Well, removing LCD support means that you provide a working alternative. 
My proposal is to re-write a unified display driver for u-boot-v2 and do 
_not_ waste too much time with the old drivers.

Wolfgang.

> Thanks in advance,
> 
> Rodolfo
> 





More information about the U-Boot mailing list