[PATCH v2 06/17] qemu_capabilities: rename QEMU_CAPS_VIRTIO_GPU_VIRGL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We generally uses QEMU_CASP_DEVICE_$NAME to probe for existence of some
device and QEMU_CAPS_$NAME_$PROP to probe for existence of some property
of that device.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---

Changes in v2:
    - no it only renames the capability

 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_capabilities.h | 2 +-
 src/qemu/qemu_command.c      | 2 +-
 tests/qemuxml2argvtest.c     | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 0ce203b..616290d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1677,7 +1677,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsQxl[] = {
 };
 
 static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioGpu[] = {
-    { "virgl", QEMU_CAPS_DEVICE_VIRTIO_GPU_VIRGL },
+    { "virgl", QEMU_CAPS_VIRTIO_GPU_VIRGL },
 };
 
 static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsICH9[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 5351879..ff6ed34 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -329,7 +329,7 @@ typedef enum {
     /* 200 */
     QEMU_CAPS_INCOMING_DEFER, /* -incoming defer and migrate_incoming */
     QEMU_CAPS_DEVICE_VIRTIO_GPU, /* -device virtio-gpu-* & virtio-vga */
-    QEMU_CAPS_DEVICE_VIRTIO_GPU_VIRGL, /* -device virtio-gpu-*.virgl */
+    QEMU_CAPS_VIRTIO_GPU_VIRGL, /* -device virtio-gpu-*.virgl */
     QEMU_CAPS_VIRTIO_KEYBOARD, /* -device virtio-keyboard-{device,pci} */
     QEMU_CAPS_VIRTIO_MOUSE, /* -device virtio-mouse-{device,pci} */
 
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index cec7e98..43de08e 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4296,7 +4296,7 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
 
     if (video->accel && video->accel->accel3d == VIR_TRISTATE_SWITCH_ON) {
         if (video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO ||
-            !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU_VIRGL)) {
+            !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_VIRGL)) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("%s 3d acceleration is not supported"),
                            virDomainVideoTypeToString(video->type));
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 8bfc7b9..23bc38e 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1593,11 +1593,11 @@ mymain(void)
             QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
     DO_TEST("video-virtio-gpu-virgl",
             QEMU_CAPS_DEVICE_VIRTIO_GPU,
-            QEMU_CAPS_DEVICE_VIRTIO_GPU_VIRGL,
+            QEMU_CAPS_VIRTIO_GPU_VIRGL,
             QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
     DO_TEST("video-virtio-gpu-spice-gl",
             QEMU_CAPS_DEVICE_VIRTIO_GPU,
-            QEMU_CAPS_DEVICE_VIRTIO_GPU_VIRGL,
+            QEMU_CAPS_VIRTIO_GPU_VIRGL,
             QEMU_CAPS_SPICE,
             QEMU_CAPS_SPICE_GL,
             QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
-- 
2.10.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]