diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-09-25 09:56:42 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-09-27 08:07:51 +0200 |
commit | 72d277a70e8b2d4eb1b3667ab934fb1fecf41410 (patch) | |
tree | 14f8fa96ede6c8b499a645d88c45c0c5d8f83b06 /include | |
parent | c5e4e49258e9b89cb34c085a419dd9f862935c48 (diff) | |
download | qemu-72d277a70e8b2d4eb1b3667ab934fb1fecf41410.zip qemu-72d277a70e8b2d4eb1b3667ab934fb1fecf41410.tar.gz qemu-72d277a70e8b2d4eb1b3667ab934fb1fecf41410.tar.bz2 |
display/edid: add edid generator to qemu.
EDID is a metadata format to describe monitors. On physical hardware
the monitor has an eeprom with that data block which can be read over
i2c bus.
On a linux system you can usually find the EDID data block in
/sys/class/drm/$card/$connector/edid. xorg ships a edid-decode utility
which you can use to turn the blob into readable form.
I think it would be a good idea to use EDID for virtual displays too.
Needs changes in both qemu and guest kms drivers. This patch is the
first step, it adds an generator for EDID blobs to qemu. Comes with a
qemu-edid test tool included.
With EDID we can pass more information to the guest. Names and serial
numbers, so the guests display configuration has no boring "Unknown
Monitor". List of video modes. Display resolution, pretty important
in case we want add HiDPI support some day.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180925075646.25114-2-kraxel@redhat.com
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/display/edid.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/hw/display/edid.h b/include/hw/display/edid.h new file mode 100644 index 0000000..63b6001 --- /dev/null +++ b/include/hw/display/edid.h @@ -0,0 +1,18 @@ +#ifndef EDID_H +#define EDID_H + +typedef struct qemu_edid_info { + const char *vendor; + const char *name; + const char *serial; + uint32_t dpi; + uint32_t prefx; + uint32_t prefy; + uint32_t maxx; + uint32_t maxy; +} qemu_edid_info; + +void qemu_edid_generate(uint8_t *edid, size_t size, + qemu_edid_info *info); + +#endif /* EDID_H */ |