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