From: Emil Velikov <emil.veli...@collabora.com>

Ealier commit a325725633c26aa66ab940f762a6b0778edf76c0 did not attribute
that virtio can be either PCI or a platform device and removed the
.set_busid hook. Whereas only the "platform" instance should have been
removed.

Since then, two things have happened:
 - the driver manually calls drm_dev_set_unique, addressing the Xserver
regression - see commit 9785b4321b0bd701f8d21d3d3c676a7739a5cf22
 - core itself calls drm_pci_set_busid, on drm_set_busid IOCTL setting
the busid, so we don't need to fallback to dev->unique - see commit
5c484cee7ef9c4fd29fa0ba09640d55960977145

With that in place we can remove the local workaround.

Cc: Daniel Vetter <daniel.vet...@ffwll.ch>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Hans de Goede <hdego...@redhat.com>
Cc: Laszlo Ersek <ler...@redhat.com>
Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
---
Gents, can someone double-check this please? Just in case.
---
 drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c 
b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
index 7df8d0c9026a..19fd7c661b8a 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
+++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
@@ -62,7 +62,6 @@ int drm_virtio_init(struct drm_driver *driver, struct 
virtio_device *vdev)
                struct pci_dev *pdev = to_pci_dev(vdev->dev.parent);
                const char *pname = dev_name(&pdev->dev);
                bool vga = (pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA;
-               char unique[20];
 
                DRM_INFO("pci: %s detected at %s\n",
                         vga ? "virtio-vga" : "virtio-gpu-pci",
@@ -70,12 +69,6 @@ int drm_virtio_init(struct drm_driver *driver, struct 
virtio_device *vdev)
                dev->pdev = pdev;
                if (vga)
                        virtio_pci_kick_out_firmware_fb(pdev);
-
-               snprintf(unique, sizeof(unique), "pci:%s", pname);
-               ret = drm_dev_set_unique(dev, unique);
-               if (ret)
-                       goto err_free;
-
        }
 
        ret = drm_dev_register(dev, 0);
-- 
2.16.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to