vfio/display: add edid support.

This patch adds EDID support to the vfio display (aka vgpu) code.
When supported by the mdev driver qemu will generate a EDID blob
and pass it on using the new vfio edid region.  The EDID blob will
be updated on UI changes (i.e. window resize), so the guest can
adapt.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
[remove control flow via macro, use unsigned format specifier]
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
Gerd Hoffmann 2019-03-11 11:14:39 -06:00 committed by Alex Williamson
parent 2e35c7738e
commit 08479114b0
3 changed files with 151 additions and 0 deletions

View file

@ -148,6 +148,9 @@ typedef struct VFIODMABuf {
typedef struct VFIODisplay {
QemuConsole *con;
RAMFBState *ramfb;
struct vfio_region_info *edid_info;
struct vfio_region_gfx_edid *edid_regs;
uint8_t *edid_blob;
struct {
VFIORegion buffer;
DisplaySurface *surface;