Commit 66c8ef90 authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm/qxl: don't take vga ports on rev5+

qemu 5.0 introduces a new qxl hardware revision 5.  Unlike revision 4
(and below) the device doesn't switch back into vga compatibility mode
when someone touches the vga ports.  So we don't have to reserve the
vga ports any more to avoid that happening.
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20200807105501.24599-1-kraxel@redhat.com
parent 51c3b0cc
...@@ -96,7 +96,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -96,7 +96,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (ret) if (ret)
goto disable_pci; goto disable_pci;
if (is_vga(pdev)) { if (is_vga(pdev) && pdev->revision < 5) {
ret = vga_get_interruptible(pdev, VGA_RSRC_LEGACY_IO); ret = vga_get_interruptible(pdev, VGA_RSRC_LEGACY_IO);
if (ret) { if (ret) {
DRM_ERROR("can't get legacy vga ioports\n"); DRM_ERROR("can't get legacy vga ioports\n");
...@@ -127,7 +127,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -127,7 +127,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
unload: unload:
qxl_device_fini(qdev); qxl_device_fini(qdev);
put_vga: put_vga:
if (is_vga(pdev)) if (is_vga(pdev) && pdev->revision < 5)
vga_put(pdev, VGA_RSRC_LEGACY_IO); vga_put(pdev, VGA_RSRC_LEGACY_IO);
disable_pci: disable_pci:
pci_disable_device(pdev); pci_disable_device(pdev);
...@@ -155,7 +155,7 @@ qxl_pci_remove(struct pci_dev *pdev) ...@@ -155,7 +155,7 @@ qxl_pci_remove(struct pci_dev *pdev)
drm_dev_unregister(dev); drm_dev_unregister(dev);
drm_atomic_helper_shutdown(dev); drm_atomic_helper_shutdown(dev);
if (is_vga(pdev)) if (is_vga(pdev) && pdev->revision < 5)
vga_put(pdev, VGA_RSRC_LEGACY_IO); vga_put(pdev, VGA_RSRC_LEGACY_IO);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment