diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-03-19 11:48:04 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-05-15 10:11:48 +0200 |
commit | 2f87fe393cd48327c4c0d5614bdef8f00d63012a (patch) | |
tree | d4ffe983119af7b23c3dafe205fb83121e6b1959 /vgasrc | |
parent | 083801db10b08d6d4e569d84f99a1398044eb483 (diff) | |
download | seabios-2f87fe393cd48327c4c0d5614bdef8f00d63012a.tar.gz |
bochsdisplay: add edid support.
Read EDID blob from mmio bar, store in VBE_edid.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'vgasrc')
-rw-r--r-- | vgasrc/bochsdisplay.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vgasrc/bochsdisplay.c b/vgasrc/bochsdisplay.c index 6a75f378..38891b5f 100644 --- a/vgasrc/bochsdisplay.c +++ b/vgasrc/bochsdisplay.c @@ -4,6 +4,7 @@ #include "bochsvga.h" // VBE_BOCHS_* #include "hw/pci.h" // pci_config_readl #include "hw/pci_regs.h" // PCI_BASE_ADDRESS_0 +#include "vgabios.h" // SET_VGA #include "vgautil.h" // VBE_total_memory #define FRAMEBUFFER_WIDTH 1024 @@ -40,7 +41,12 @@ bochs_display_setup(void) if (id != VBE_DISPI_ID5) return -1; - dprintf(1, "bochs-display: using %dx%d, %d bpp (%d stride)\n" + int i; + u8 *edid = (void*)(io_addr); + for (i = 0; i < sizeof(VBE_edid); i++) + SET_VGA(VBE_edid[i], readb(edid + i)); + + dprintf(1, "bochs-display: using %dx%d, %d bpp (%d stride)\n" , FRAMEBUFFER_WIDTH, FRAMEBUFFER_HEIGHT , FRAMEBUFFER_BPP * 8, FRAMEBUFFER_STRIDE); |