aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio/pci.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-03-12 13:37:29 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-03-12 13:37:29 +0000
commit46316f1dfffc6be72e94e89f7b0e9162e7dcdcf1 (patch)
tree6e0e6dc9e24d4e8696faf53ba8030cde536e6eba /hw/vfio/pci.c
parenta6d3c238034c8a90a0a2cee7814741ff1384e66f (diff)
parent8781c701445d83145ac1e69714e76a643f5525da (diff)
downloadqemu-46316f1dfffc6be72e94e89f7b0e9162e7dcdcf1.zip
qemu-46316f1dfffc6be72e94e89f7b0e9162e7dcdcf1.tar.gz
qemu-46316f1dfffc6be72e94e89f7b0e9162e7dcdcf1.tar.bz2
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20190311.0' into staging
VFIO updates 2019-03-11 - Resolution support for mdev displays supporting EDID interface (Gerd Hoffmann) # gpg: Signature made Mon 11 Mar 2019 19:17:39 GMT # gpg: using RSA key 239B9B6E3BB08B22 # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" [full] # gpg: aka "Alex Williamson <alex@shazbot.org>" [full] # gpg: aka "Alex Williamson <alwillia@redhat.com>" [full] # gpg: aka "Alex Williamson <alex.l.williamson@gmail.com>" [full] # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B 8A90 239B 9B6E 3BB0 8B22 * remotes/awilliam/tags/vfio-updates-20190311.0: vfio/display: delay link up event vfio/display: add xres + yres properties vfio/display: add edid support. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/vfio/pci.c')
-rw-r--r--hw/vfio/pci.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index dd12f36..504019c 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3068,6 +3068,16 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
error_setg(errp, "ramfb=on requires display=on");
goto out_teardown;
}
+ if (vdev->display_xres || vdev->display_yres) {
+ if (vdev->dpy == NULL) {
+ error_setg(errp, "xres and yres properties require display=on");
+ goto out_teardown;
+ }
+ if (vdev->dpy->edid_regs == NULL) {
+ error_setg(errp, "xres and yres properties need edid support");
+ goto out_teardown;
+ }
+ }
vfio_register_err_notifier(vdev);
vfio_register_req_notifier(vdev);
@@ -3182,6 +3192,8 @@ static Property vfio_pci_dev_properties[] = {
DEFINE_PROP_STRING("sysfsdev", VFIOPCIDevice, vbasedev.sysfsdev),
DEFINE_PROP_ON_OFF_AUTO("display", VFIOPCIDevice,
display, ON_OFF_AUTO_OFF),
+ DEFINE_PROP_UINT32("xres", VFIOPCIDevice, display_xres, 0),
+ DEFINE_PROP_UINT32("yres", VFIOPCIDevice, display_yres, 0),
DEFINE_PROP_UINT32("x-intx-mmap-timeout-ms", VFIOPCIDevice,
intx.mmap_timeout, 1100),
DEFINE_PROP_BIT("x-vga", VFIOPCIDevice, features,