• Laszlo Ersek's avatar
    drm: virtio: reinstate drm_virtio_set_busid() · c2cbc38b
    Laszlo Ersek authored
    Before commit a3257256 ("drm: Lobotomize set_busid nonsense for !pci
    drivers"), several DRM drivers for platform devices used to expose an
    explicit "drm_driver.set_busid" callback, invariably backed by
    drm_platform_set_busid().
    
    Commit a3257256 removed drm_platform_set_busid(), along with the
    referring .set_busid field initializations. This was justified because
    interchangeable functionality had been implemented in drm_dev_alloc() /
    drm_dev_init(), which DRM_IOCTL_SET_VERSION would rely on going forward.
    
    However, commit a3257256 also removed drm_virtio_set_busid(), for
    which the same consolidation was not appropriate: this .set_busid callback
    had been implemented with drm_pci_set_busid(), and not
    drm_platform_set_busid(). The error regressed Xorg/xserver on QEMU's
    "virtio-vga" card; the drmGetBusid() function from libdrm would no longer
    return stable PCI identifiers like "pci:0000:00:02.0", but rather unstable
    platform ones like "virtio0".
    
    Reinstate drm_virtio_set_busid() with judicious use of
    
      git checkout -p a3257256^ -- drivers/gpu/drm/virtio
    
    Cc: Daniel Vetter <daniel.vetter@intel.com>
    Cc: Emil Velikov <emil.l.velikov@gmail.com>
    Cc: Gerd Hoffmann <kraxel@redhat.com>
    Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
    Cc: Hans de Goede <hdegoede@redhat.com>
    Cc: Joachim Frieben <jfrieben@hotmail.com>
    Cc: stable@vger.kernel.org # v4.8
    Reported-by: default avatarJoachim Frieben <jfrieben@hotmail.com>
    Fixes: a3257256
    Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1366842Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
    Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    c2cbc38b
virtgpu_drv.c 4.83 KB