[U-Boot] U-boot VESA driver Initialization

Bin Meng bmeng.cn at gmail.com
Tue Jun 14 11:13:54 CEST 2016


On Tue, Jun 14, 2016 at 2:57 PM, vinoth eswaran <evinoth1206 at gmail.com> wrote:
> Hello Bin,
>
> On Tue, Jun 14, 2016 at 4:04 AM, Bin Meng <bmeng.cn at gmail.com> wrote:
>> On Mon, Jun 13, 2016 at 5:41 PM, vinoth eswaran <evinoth1206 at gmail.com> wrote:
>>> Hello Mr.Bin,
>>> Hello Mr.George McCollister,
>>>
>>>  I am working on an embedded project to optimize Linux boot up time. I have
>>> a camera application, which I need to run as fast as possible after powering
>>> up the board.
>>>
>>> For this currently I am analyzing how can I optimize the U-boot. As of now,
>>> u-boot takes around 3 to 4 seconds and most of the time is spent, around 2
>>> secs in initializing the VESA display.
>>>
>>> I have analyzed the sequence of VESA initialization flow and I have
>>> identified that realmode_call under the function bios_run_on_x86() takes
>>> more time -- around 1.7 Sec,
>>>
>>>     realmode_call(addr + 0x0003, num_dev, 0xffff, 0x0000, 0xffff, 0x0,
>>>               0x0);
>>>
>>> Do you have any idea why this is happening?
>>>
>>> I tried removing the VIDEO configuration from u-boot, though the boot up is
>>> fast , the i915 driver from Linux is reporting an error -- 'i915
>>> 0000:00:02.0: Invalid ROM contents'
>>
>> Can you point out which file in the kernel source that reports this? I
>> cannot find such message in latest kernel source tree.
>>
>      In U-boot I removed the VESA driver support by doing the following changes,
>
> In Minnowmax_defconfig:
> CONFIG_VIDEO_VESA=n
> CONFIG_FRAMEBUFFER_SET_VESA_MODE=n
> CONFIG_FRAMEBUFFER_VESA_MODE_11A=n
>
> In X86-common.h I commented out the macros defining the VIDEO Configuration,
>
> /*
> #define CONFIG_VIDEO
> #define CONFIG_VIDEO_SW_CURSOR
> #define VIDEO_FB_16BPP_WORD_SWAP
> #define CONFIG_VGA_AS_SINGLE_DEVICE
> #define CONFIG_CFB_CONSOLE
> #define CONFIG_CONSOLE_SCROLL_LINES 5
> */
>
> After these changes in the Linux Kernel start up, I am seeing that the
> i915 driver is not getting properly initialized. I have attached the
> dmesg logs for your reference.
>
> [    0.256735] i915 0000:00:02.0: Invalid ROM contents
> [    0.262230] [drm] failed to find VBIOS tables

You can try u-boot-x86/pci-working branch, which provides you
possibility to load the oprom without running. So that you won't see
"Invalid ROM contents" and "failed to find VBIOS tables" anymore.

>
> The PCI bus its reporting error corresponds to INTEL VGA controller.
> 00:02.0 VGA compatible controller: Intel Corporation Atom Processor
> Z36xxx/Z37xxx Series Graphics & Display (rev 11)
>
> The error message is in the Linux source tree:
> /drivers/pci/rom.c:            dev_err(&pdev->dev, "Invalid ROM contents\n");
>
> Though I am seeing i915 init_call  returning 0
>
> [    0.720522] initcall i915_init+0x0/0x99 returned 0 after 456068 usecs.
>
> I am seeing the weston is not starting up properly. Please let me know
> if you find any odd behaviour.
>

What is 'weston'?

>>> I understand that the Linux kernel expects the underlying boot loader to
>>> setup some initialization which is missing in this case.
>>>
>>
>> My understanding is that if we have native graphics driver in the
>> kernel, then the bootloader does not need initialize the graphics
>> hardware.
>>
>>> Do you know any methods by which I can speed up the video driver
>>> initialization phase in u-boot. Please note that I don't need video support
>>> during u-boot phase,I am not going to use any splash images.

I've tested with the patchset mentioned above, and it looks that the
Intel i915 driver may still require vbios to be already run. I am not
familiar with the i915 driver at all, but I am trying to investigate.

Regards,
Bin


More information about the U-Boot mailing list