target/arm: Use TRANS_FEAT for RAX1
[qemu/ar7.git] / hw / display / virtio-gpu-pci-gl.c
blob99b14a07185ea6b3a2a2f99f167f84c60fea2f0c
1 /*
2 * Virtio video device
4 * Copyright Red Hat
6 * Authors:
7 * Dave Airlie
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
14 #include "qemu/osdep.h"
15 #include "qapi/error.h"
16 #include "qemu/module.h"
17 #include "hw/pci/pci.h"
18 #include "hw/qdev-properties.h"
19 #include "hw/virtio/virtio.h"
20 #include "hw/virtio/virtio-bus.h"
21 #include "hw/virtio/virtio-gpu-pci.h"
22 #include "qom/object.h"
24 #define TYPE_VIRTIO_GPU_GL_PCI "virtio-gpu-gl-pci"
25 typedef struct VirtIOGPUGLPCI VirtIOGPUGLPCI;
26 DECLARE_INSTANCE_CHECKER(VirtIOGPUGLPCI, VIRTIO_GPU_GL_PCI,
27 TYPE_VIRTIO_GPU_GL_PCI)
29 struct VirtIOGPUGLPCI {
30 VirtIOGPUPCIBase parent_obj;
31 VirtIOGPUGL vdev;
34 static void virtio_gpu_gl_initfn(Object *obj)
36 VirtIOGPUGLPCI *dev = VIRTIO_GPU_GL_PCI(obj);
38 virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
39 TYPE_VIRTIO_GPU_GL);
40 VIRTIO_GPU_PCI_BASE(obj)->vgpu = VIRTIO_GPU_BASE(&dev->vdev);
43 static const VirtioPCIDeviceTypeInfo virtio_gpu_gl_pci_info = {
44 .generic_name = TYPE_VIRTIO_GPU_GL_PCI,
45 .parent = TYPE_VIRTIO_GPU_PCI_BASE,
46 .instance_size = sizeof(VirtIOGPUGLPCI),
47 .instance_init = virtio_gpu_gl_initfn,
49 module_obj(TYPE_VIRTIO_GPU_GL_PCI);
51 static void virtio_gpu_gl_pci_register_types(void)
53 virtio_pci_types_register(&virtio_gpu_gl_pci_info);
56 type_init(virtio_gpu_gl_pci_register_types)
58 module_dep("hw-display-virtio-gpu-pci");