diff mbox

[U-Boot,10/23] x86: bootstage: Add time measurement for vesa start-up

Message ID 1422321801-6743-11-git-send-email-sjg@chromium.org
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Jan. 27, 2015, 1:23 a.m. UTC
Since we must run a PCI BIOS ROM, and this can take a calamitous amount of
time, measure it using bootstage.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/vesa_fb.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bin Meng Jan. 27, 2015, 10:42 a.m. UTC | #1
On Tue, Jan 27, 2015 at 9:23 AM, Simon Glass <sjg@chromium.org> wrote:
> Since we must run a PCI BIOS ROM, and this can take a calamitous amount of
> time, measure it using bootstage.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  drivers/video/vesa_fb.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/vesa_fb.c b/drivers/video/vesa_fb.c
> index 9164f8d..47f824a 100644
> --- a/drivers/video/vesa_fb.c
> +++ b/drivers/video/vesa_fb.c
> @@ -42,8 +42,10 @@ void *video_hw_init(void)
>                         printf("no card detected\n");
>                         return NULL;
>                 }
> +               bootstage_start(BOOTSTAGE_ID_ACCUM_LCD, "vesa display");
>                 ret = pci_run_vga_bios(dev, NULL, PCI_ROM_USE_NATIVE |
>                                        PCI_ROM_ALLOW_FALLBACK);
> +               bootstage_accum(BOOTSTAGE_ID_ACCUM_LCD);
>                 if (ret) {
>                         printf("failed to run video BIOS: %d\n", ret);
>                         return NULL;
> --

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox

Patch

diff --git a/drivers/video/vesa_fb.c b/drivers/video/vesa_fb.c
index 9164f8d..47f824a 100644
--- a/drivers/video/vesa_fb.c
+++ b/drivers/video/vesa_fb.c
@@ -42,8 +42,10 @@  void *video_hw_init(void)
 			printf("no card detected\n");
 			return NULL;
 		}
+		bootstage_start(BOOTSTAGE_ID_ACCUM_LCD, "vesa display");
 		ret = pci_run_vga_bios(dev, NULL, PCI_ROM_USE_NATIVE |
 				       PCI_ROM_ALLOW_FALLBACK);
+		bootstage_accum(BOOTSTAGE_ID_ACCUM_LCD);
 		if (ret) {
 			printf("failed to run video BIOS: %d\n", ret);
 			return NULL;