OSDN Git Service

xf86drm: fix subsystem type lookup for virtio mmio-based devices
authorVasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
Wed, 29 Jan 2020 15:08:41 +0000 (16:08 +0100)
committerKristian H. Kristensen <hoegsberg@gmail.com>
Mon, 24 Feb 2020 21:53:41 +0000 (21:53 +0000)
commit8a73372e62a73fe8d874aa39458c508cdb5bb6f4
tree4975f92226358647ae82b611d708d5d9d358a645
parentc4eae71d7e44df2c1f89fb3460b1f7f8feaff0df
xf86drm: fix subsystem type lookup for virtio mmio-based devices

Currently the code assumes that a virtio based device is always located
on the PCI bus.

Modify the parser to make it check the device's parent directory to
determine on which bus it is located.

Output for virtio-pci is the PCI bus.
Output for virtio-mmio is the Platform bus.

Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
Signed-off-by: Mikhail Golubev <Mikhail.Golubev@opensynergy.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
xf86drm.c