[U-Boot] [PATCH 5/6] sunxi: video: Add simplefb support

Hans de Goede
2014-11-15T14:58:29Z

Hi,

On 11/14/2014 11:22 PM, Anatolij Gustschin wrote:
> On Fri, 14 Nov 2014 17:54:47 +0100
> Hans de Goede <hdegoede@redhat.com> wrote:
> ...
>> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
>> index 532fdb7..d7d8571 100644
>> --- a/include/configs/sunxi-common.h
>> +++ b/include/configs/sunxi-common.h
>> @@ -204,6 +204,9 @@
>> */
>> #define CONFIG_SUNXI_FB_SIZE (8 << 20)
>>
>> +/* Do we want to initialize a simple FB? */
>> +#define CONFIG_VIDEO_DT_SIMPLEFB
>> +
>> #define CONFIG_VIDEO_SUNXI
>>
>> #define CONFIG_CFB_CONSOLE
>> @@ -219,6 +222,11 @@
>>
>> #define CONFIG_SYS_MEM_TOP_HIDE ((CONFIG_SUNXI_FB_SIZE + 0xFFF) & ~0xFFF)
>>
>> +/* To be able to hook simplefb into dt */
>> +#ifdef CONFIG_VIDEO_DT_SIMPLEFB
>> +#define CONFIG_OF_BOARD_SETUP
>> +#endif
>
> defining CONFIG_OF_BOARD_SETUP should be independent of defining
> CONFIG_VIDEO or CONFIG_VIDEO_DT_SIMPLEFB. DT fixup by board setup
> code is often done i.e. for auto-detected memory size, adjusting
> different node properties or adding/deleting whole nodes. If
> someone defines CONFIG_OF_BOARD_SETUP for these purposes and also
> defines CONFIG_VIDEO_DT_SIMPLEFB, the "already defined" warnings
> will appear. This can be left as is for now, but should be addressed
> in the long term.

Currently the only thing we need CONFIG_OF_BOARD_SETUP for on sunxi
is CONFIG_VIDEO_DT_SIMPLEFB, so for now this makes sense, but your 100%
right that long term we probably want to do this differently.

Regards,

Hans