1 /* 2 * VFIO display 3 * 4 * Copyright Red Hat, Inc. 2025 5 * 6 * SPDX-License-Identifier: GPL-2.0-or-later 7 */ 8 9 #ifndef HW_VFIO_VFIO_DISPLAY_H 10 #define HW_VFIO_VFIO_DISPLAY_H 11 12 #include "ui/console.h" 13 #include "hw/display/ramfb.h" 14 #include "hw/vfio/vfio-region.h" 15 16 typedef struct VFIODMABuf { 17 QemuDmaBuf *buf; 18 uint32_t pos_x, pos_y, pos_updates; 19 uint32_t hot_x, hot_y, hot_updates; 20 int dmabuf_id; 21 QTAILQ_ENTRY(VFIODMABuf) next; 22 } VFIODMABuf; 23 24 typedef struct VFIODisplay { 25 QemuConsole *con; 26 RAMFBState *ramfb; 27 struct vfio_region_info *edid_info; 28 struct vfio_region_gfx_edid *edid_regs; 29 uint8_t *edid_blob; 30 QEMUTimer *edid_link_timer; 31 struct { 32 VFIORegion buffer; 33 DisplaySurface *surface; 34 } region; 35 struct { 36 QTAILQ_HEAD(, VFIODMABuf) bufs; 37 VFIODMABuf *primary; 38 VFIODMABuf *cursor; 39 } dmabuf; 40 } VFIODisplay; 41 42 #endif /* HW_VFIO_VFIO_DISPLAY_H */ 43