2019-06-07 22:13:21 +08:00
|
|
|
#ifndef VIRTIO_VGA_H
|
|
|
|
#define VIRTIO_VGA_H
|
2019-05-24 21:09:45 +08:00
|
|
|
|
2019-05-24 21:09:46 +08:00
|
|
|
#include "hw/virtio/virtio-gpu-pci.h"
|
2019-05-24 21:09:45 +08:00
|
|
|
#include "vga_int.h"
|
2020-09-04 04:43:22 +08:00
|
|
|
#include "qom/object.h"
|
2019-05-24 21:09:45 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* virtio-vga-base: This extends VirtioPCIProxy.
|
|
|
|
*/
|
|
|
|
#define TYPE_VIRTIO_VGA_BASE "virtio-vga-base"
|
2020-09-04 04:43:22 +08:00
|
|
|
typedef struct VirtIOVGABase VirtIOVGABase;
|
|
|
|
typedef struct VirtIOVGABaseClass VirtIOVGABaseClass;
|
2020-09-01 05:07:33 +08:00
|
|
|
DECLARE_OBJ_CHECKERS(VirtIOVGABase, VirtIOVGABaseClass,
|
|
|
|
VIRTIO_VGA_BASE, TYPE_VIRTIO_VGA_BASE)
|
2019-05-24 21:09:45 +08:00
|
|
|
|
2020-09-04 04:43:22 +08:00
|
|
|
struct VirtIOVGABase {
|
2019-05-24 21:09:45 +08:00
|
|
|
VirtIOPCIProxy parent_obj;
|
|
|
|
|
|
|
|
VirtIOGPUBase *vgpu;
|
|
|
|
VGACommonState vga;
|
|
|
|
MemoryRegion vga_mrs[3];
|
2020-09-04 04:43:22 +08:00
|
|
|
};
|
2019-05-24 21:09:45 +08:00
|
|
|
|
2020-09-04 04:43:22 +08:00
|
|
|
struct VirtIOVGABaseClass {
|
2019-05-24 21:09:45 +08:00
|
|
|
VirtioPCIClass parent_class;
|
|
|
|
|
|
|
|
DeviceReset parent_reset;
|
2020-09-04 04:43:22 +08:00
|
|
|
};
|
2019-05-24 21:09:45 +08:00
|
|
|
|
2019-06-07 22:13:21 +08:00
|
|
|
#endif /* VIRTIO_VGA_H */
|