x86: video: Allow video ROM execution to fall back to the other method

If the BIOS emulator is not available, allow use of native execution if
available, and vice versa. This can be controlled by the caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2015-01-27 22:13:34 -07:00
parent 2d934e5703
commit bc17d8f4ac
4 changed files with 43 additions and 13 deletions

View File

@@ -42,8 +42,8 @@ void *video_hw_init(void)
printf("no card detected\n");
return NULL;
}
printf("bdf %x\n", dev);
ret = pci_run_vga_bios(dev, NULL, true);
ret = pci_run_vga_bios(dev, NULL, PCI_ROM_USE_NATIVE |
PCI_ROM_ALLOW_FALLBACK);
if (ret) {
printf("failed to run video BIOS: %d\n", ret);
return NULL;
@@ -59,7 +59,7 @@ void *video_hw_init(void)
sprintf(gdev->modeIdent, "%dx%dx%d", gdev->winSizeX, gdev->winSizeY,
bits_per_pixel);
printf("%s\n", gdev->modeIdent);
debug("Framex buffer at %x\n", gdev->pciBase);
debug("Frame buffer at %x\n", gdev->pciBase);
return (void *)gdev;
}