diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2018-12-28 10:03:43 +0000 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2018-12-28 11:01:24 +0000 |
commit | b21b73b8c6e779752557977d2ce7e664a19516d5 (patch) | |
tree | 1efabb81007deecf873cb4070d336d0f670683ea /QemuVGADriver/src/QemuVga.h | |
parent | d4e7d7ac663fcb55f1b93575445fcbca372f17a7 (diff) | |
download | QemuMacDrivers-b21b73b8c6e779752557977d2ce7e664a19516d5.zip QemuMacDrivers-b21b73b8c6e779752557977d2ce7e664a19516d5.tar.gz QemuMacDrivers-b21b73b8c6e779752557977d2ce7e664a19516d5.tar.bz2 |
QemuVGADriver: add support for QEMU EDID data
Versions of QEMU >= 3.1 support passing of display information from host to guest
via an EDID blob accessible from the stdvga PCI MMIO BAR.
Whilst this feature is still in development, we can start by using the EDID data
to generate the list of supported guest resolutions as suggested by the host. As
EDID blob generation is currently disabled by default, it must be explicitly
enabled on the QEMU command line using "-device VGA,edid=on".
In the cases where the EDID data blob is not present, we fall back to using the
previous hard-coded set of guest resolutions.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'QemuVGADriver/src/QemuVga.h')
-rw-r--r-- | QemuVGADriver/src/QemuVga.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/QemuVGADriver/src/QemuVga.h b/QemuVGADriver/src/QemuVga.h index 69e80fa..f070bb7 100644 --- a/QemuVGADriver/src/QemuVga.h +++ b/QemuVGADriver/src/QemuVga.h @@ -45,6 +45,22 @@ #define VBE_DISPI_LFB_ENABLED 0x40 #define VBE_DISPI_NOCLEARMEM 0x80 +/* --- VModes */ + +struct _vMode { + UInt32 width; + UInt32 height; +}; + +struct vMode { + struct vMode *next; + struct _vMode *mode; +}; + +extern struct vMode *vModes; +extern struct _vMode defaultVModes[]; +extern struct _vMode *getVMode(UInt16 idx); + /* --- Internal APIs */ extern OSStatus QemuVga_Init(); @@ -56,6 +72,8 @@ extern OSStatus QemuVga_Close(); extern void QemuVga_EnableInterrupts(void); extern void QemuVga_DisableInterrupts(void); +extern UInt16 QemuVga_ReadEdidModes(void); + extern OSStatus QemuVga_SetDepth(UInt32 bpp); extern OSStatus QemuVga_SetColorEntry(UInt32 index, RGBColor *color); |