Re: [PATCH 3/4] drm/virtio: remove drm_dev_set_unique workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  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@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

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux