mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00

Gather all VFIORegion related declarations and definitions into their own files to reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". They were introduced for 'vfio-platform' support in commitsdb0da029a1
("vfio: Generalize region support") anda664477db8
("hw/vfio/pci: Introduce VFIORegion"). To be noted that the 'vfio-platform' devices have been deprecated and will be removed in QEMU 10.2. Until then, make the declarations available externally for 'sysbus-fdt.c'. Cc: Eric Auger <eric.auger@redhat.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-12-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
42 lines
933 B
C
42 lines
933 B
C
/*
|
|
* VFIO display
|
|
*
|
|
* Copyright Red Hat, Inc. 2025
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#ifndef HW_VFIO_VFIO_DISPLAY_H
|
|
#define HW_VFIO_VFIO_DISPLAY_H
|
|
|
|
#include "ui/console.h"
|
|
#include "hw/display/ramfb.h"
|
|
#include "hw/vfio/vfio-region.h"
|
|
|
|
typedef struct VFIODMABuf {
|
|
QemuDmaBuf *buf;
|
|
uint32_t pos_x, pos_y, pos_updates;
|
|
uint32_t hot_x, hot_y, hot_updates;
|
|
int dmabuf_id;
|
|
QTAILQ_ENTRY(VFIODMABuf) next;
|
|
} VFIODMABuf;
|
|
|
|
typedef struct VFIODisplay {
|
|
QemuConsole *con;
|
|
RAMFBState *ramfb;
|
|
struct vfio_region_info *edid_info;
|
|
struct vfio_region_gfx_edid *edid_regs;
|
|
uint8_t *edid_blob;
|
|
QEMUTimer *edid_link_timer;
|
|
struct {
|
|
VFIORegion buffer;
|
|
DisplaySurface *surface;
|
|
} region;
|
|
struct {
|
|
QTAILQ_HEAD(, VFIODMABuf) bufs;
|
|
VFIODMABuf *primary;
|
|
VFIODMABuf *cursor;
|
|
} dmabuf;
|
|
} VFIODisplay;
|
|
|
|
#endif /* HW_VFIO_VFIO_DISPLAY_H */
|