[PATCH 3/4] drm/virtio: remove drm_dev_set_unique workaround
Gerd Hoffmann
kraxel at redhat.com
Fri Apr 6 13:06:07 UTC 2018
Hi,
> What I could see as justified is a loud comment in drm_virtio_init(),
> just above the call to drm_dev_set_unique(), explaining why it is
> necessary to set "unique" manually. The reason is that virtio-vga
> technically has "virtio_bus", not "pci_bus_type", for bus type, and so
> the generic PCI BusID-setting will not cover it.
Yep, that sums up the underlying problem. You can also see that in
sysfs:
root at fedora ~# readlink /sys/class/drm/card0
../../devices/pci0000:00/0000:00:01.0/virtio0/drm/card0
^^^^^^^
extra level here.
That is the reason why drm_virtio_init() goes lookup the parent device,
checks if it happens to be pci, if so use the parent device to construct
the "pci:..." unique id for the virtio device (and also use the pci
device ressources to kick out the firmware framebuffer).
cheers,
Gerd
More information about the dri-devel
mailing list