[U-Boot] U-boot VESA driver Initialization

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' I understand that the Linux kernel expects the underlying boot loader to setup some initialization which is missing in this case.
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.
Mit Freundlichen Grüßen VinothKumar +49 1798909072

On Mon, Jun 13, 2016 at 5:41 PM, vinoth eswaran evinoth1206@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.
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.
Regards, Bin

Hello Bin,
On Tue, Jun 14, 2016 at 4:04 AM, Bin Meng bmeng.cn@gmail.com wrote:
On Mon, Jun 13, 2016 at 5:41 PM, vinoth eswaran evinoth1206@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
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.
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.
Regards, Bin
Regards, Vinothkumar

On Tue, Jun 14, 2016 at 2:57 PM, vinoth eswaran evinoth1206@gmail.com wrote:
Hello Bin,
On Tue, Jun 14, 2016 at 4:04 AM, Bin Meng bmeng.cn@gmail.com wrote:
On Mon, Jun 13, 2016 at 5:41 PM, vinoth eswaran evinoth1206@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

On Tue, Jun 14, 2016 at 11:13 AM, Bin Meng bmeng.cn@gmail.com wrote:
On Tue, Jun 14, 2016 at 2:57 PM, vinoth eswaran evinoth1206@gmail.com wrote:
Hello Mr.Bin,
On Tue, Jun 14, 2016 at 4:04 AM, Bin Meng bmeng.cn@gmail.com wrote:
On Mon, Jun 13, 2016 at 5:41 PM, vinoth eswaran evinoth1206@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'?
Weston is a display compositor based on wayland protocol. I am using this to run the camera (Video for Linux - weston client) application. For more information you can refer to, https://wayland.freedesktop.org/
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

On Tue, Jun 14, 2016 at 5:29 PM, vinoth eswaran evinoth1206@gmail.com wrote:
On Tue, Jun 14, 2016 at 11:13 AM, Bin Meng bmeng.cn@gmail.com wrote:
On Tue, Jun 14, 2016 at 2:57 PM, vinoth eswaran evinoth1206@gmail.com wrote:
Hello Mr.Bin,
On Tue, Jun 14, 2016 at 4:04 AM, Bin Meng bmeng.cn@gmail.com wrote:
On Mon, Jun 13, 2016 at 5:41 PM, vinoth eswaran evinoth1206@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'?
Weston is a display compositor based on wayland protocol. I am
using this to run the camera (Video for Linux - weston client) application. For more information you can refer to, https://wayland.freedesktop.org/
Thanks for the info.
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.
With vgabios not run by U-Boot, I got:
/ # dmesg | grep i915 [ 2.736902] [drm] Initialized i915 1.6.0 20150130 for 0000:00:02.0 on minor 0 [ 2.812898] [drm] GMBUS [i915 gmbus dpb] timed out, falling back to bit banging on pin 5 [ 2.813219] i915 0000:00:02.0: No connectors reported connected with modes [ 3.075881] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device [ 3.082817] i915 0000:00:02.0: registered panic notifier
With vgabios run by U-Boot, I got:
/ # dmesg | grep i915 [ 2.725559] [drm] Initialized i915 1.6.0 20150130 for 0000:00:02.0 on minor 0 [ 2.880613] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2 [ 4.644419] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device [ 4.644422] i915 0000:00:02.0: registered panic notifier
So it looks that when vgabios is not run, the kernel i915 driver is using wrong interface(?) dpb (I am not sure what this stands for). But when vgabios is initialized by U-Boot, the kernel i915 driver is using interface 'vga', and there is no message "No connectors reported connected with modes".
You may consult someone who is familiar with this driver, or you can continue debugging this.
Regards, Bin
participants (2)
-
Bin Meng
-
vinoth eswaran