mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: move validation of video accel to qemu_domain.c
Continue consolidation of video device validation started in previous patch. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
425310d1c8
commit
42cc3eb912
@ -5806,6 +5806,15 @@ qemuDomainDeviceDefValidateVideo(const virDomainVideoDef *video,
|
|||||||
_("this QEMU does not support 'vhost-user' video device"));
|
_("this QEMU does not support 'vhost-user' video device"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
} else if (video->accel) {
|
||||||
|
if (video->accel->accel3d == VIR_TRISTATE_SWITCH_ON &&
|
||||||
|
(video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO ||
|
||||||
|
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_VIRGL))) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
_("%s 3d acceleration is not supported"),
|
||||||
|
virDomainVideoTypeToString(video->type));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -5242,17 +5242,6 @@ qemuProcessStartValidateVideo(virDomainObjPtr vm,
|
|||||||
virDomainVideoTypeToString(video->type));
|
virDomainVideoTypeToString(video->type));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (video->accel) {
|
|
||||||
if (video->accel->accel3d == VIR_TRISTATE_SWITCH_ON &&
|
|
||||||
(video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO ||
|
|
||||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_VIRGL))) {
|
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
|
||||||
_("%s 3d acceleration is not supported"),
|
|
||||||
virDomainVideoTypeToString(video->type));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user