1 #ifndef EDID_H 2 #define EDID_H 3 4 #include "qom/object.h" 5 #include "hw/qdev-properties.h" 6 7 typedef struct qemu_edid_info { 8 const char *vendor; /* http://www.uefi.org/pnp_id_list */ 9 const char *name; 10 const char *serial; 11 uint32_t dpi; 12 uint32_t prefx; 13 uint32_t prefy; 14 uint32_t maxx; 15 uint32_t maxy; 16 } qemu_edid_info; 17 18 void qemu_edid_generate(uint8_t *edid, size_t size, 19 qemu_edid_info *info); 20 size_t qemu_edid_size(uint8_t *edid); 21 void qemu_edid_region_io(MemoryRegion *region, Object *owner, 22 uint8_t *edid, size_t size); 23 24 #define DEFINE_EDID_PROPERTIES(_state, _edid_info) \ 25 DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0), \ 26 DEFINE_PROP_UINT32("yres", _state, _edid_info.prefy, 0), \ 27 DEFINE_PROP_UINT32("xmax", _state, _edid_info.maxx, 0), \ 28 DEFINE_PROP_UINT32("ymax", _state, _edid_info.maxy, 0) 29 30 #endif /* EDID_H */ 31