platform devices are probed before vt switch has occured
Submitted by Maarten Lankhorst
Assigned to Xorg Project Team
Description
Created attachment 97896 Calculate ODEV_ATTRIB_BUSID from the sysfs path instead of drmGetBusid.
When starting a new xserver from an existing xserver it will fail before it switches because the current vt is still on the old xserver. The drmSetInterfaceVersion from get_drm_info will fail, and no platform devices will be detected.
Additionally, unowned is not initialized, so in some circumstances a drm card can be found a second time after vt switching. Solve this by setting attribs->unowned to !xf86VTOwner.
In normal circumstances this bug is harmless because the fallback to PCI detection will still work, but it will fail when any GPU screens are in use. This race might also be triggered when switching from plymouth.
Patch 97896, "Calculate ODEV_ATTRIB_BUSID from the sysfs path instead of drmGetBusid.":
file_77889.txt