aboutsummaryrefslogtreecommitdiff
path: root/hw/display/virtio-vga.h
blob: 2d3b765bf9845b8b8adbd4d15b926c92b6df651f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef VIRTIO_VGA_H
#define VIRTIO_VGA_H

#include "hw/virtio/virtio-gpu-pci.h"
#include "vga_int.h"
#include "qom/object.h"

/*
 * virtio-vga-base: This extends VirtioPCIProxy.
 */
#define TYPE_VIRTIO_VGA_BASE "virtio-vga-base"
typedef struct VirtIOVGABase VirtIOVGABase;
typedef struct VirtIOVGABaseClass VirtIOVGABaseClass;
#define VIRTIO_VGA_BASE(obj)                                \
    OBJECT_CHECK(VirtIOVGABase, (obj), TYPE_VIRTIO_VGA_BASE)
#define VIRTIO_VGA_BASE_GET_CLASS(obj)                      \
    OBJECT_GET_CLASS(VirtIOVGABaseClass, obj, TYPE_VIRTIO_VGA_BASE)
#define VIRTIO_VGA_BASE_CLASS(klass)                        \
    OBJECT_CLASS_CHECK(VirtIOVGABaseClass, klass, TYPE_VIRTIO_VGA_BASE)

struct VirtIOVGABase {
    VirtIOPCIProxy parent_obj;

    VirtIOGPUBase *vgpu;
    VGACommonState vga;
    MemoryRegion vga_mrs[3];
};

struct VirtIOVGABaseClass {
    VirtioPCIClass parent_class;

    DeviceReset parent_reset;
};

#endif /* VIRTIO_VGA_H */