diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-09-27 18:57:47 +0400 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-09-29 10:08:25 +0200 |
commit | fd36eade0187a4efe0507b41fae22277300d1c7a (patch) | |
tree | 02357862c1df0ef7e58f11ace0789600ae680103 /include | |
parent | 6c8f847ac1356387692f224b48c7a83ac5918b5d (diff) | |
download | qemu-fd36eade0187a4efe0507b41fae22277300d1c7a.zip qemu-fd36eade0187a4efe0507b41fae22277300d1c7a.tar.gz qemu-fd36eade0187a4efe0507b41fae22277300d1c7a.tar.bz2 |
edid: use physical dimensions if available
Replace dpi with width_mm/height_mm in qemu_edid_info.
Use it when set (non-zero) to compute the DPI and generate the EDID.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20200927145751.365446-3-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/display/edid.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/hw/display/edid.h b/include/hw/display/edid.h index 5b1de57..1f8fc9b 100644 --- a/include/hw/display/edid.h +++ b/include/hw/display/edid.h @@ -5,7 +5,8 @@ typedef struct qemu_edid_info { const char *vendor; /* http://www.uefi.org/pnp_id_list */ const char *name; const char *serial; - uint32_t dpi; + uint16_t width_mm; + uint16_t height_mm; uint32_t prefx; uint32_t prefy; uint32_t maxx; @@ -18,6 +19,8 @@ size_t qemu_edid_size(uint8_t *edid); void qemu_edid_region_io(MemoryRegion *region, Object *owner, uint8_t *edid, size_t size); +uint32_t qemu_edid_dpi_to_mm(uint32_t dpi, uint32_t res); + #define DEFINE_EDID_PROPERTIES(_state, _edid_info) \ DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0), \ DEFINE_PROP_UINT32("yres", _state, _edid_info.prefy, 0), \ |