xfree86: Find primary entity when bus types are nominally different

As of server 1.13, systems with DRM and Udev will have BUS_PLATFORM as
their primary bus type. However, drivers not implementing a
platformProbe function will still create entities of type BUS_PCI. We
need to account for this when checking for the primary entity.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Acked-by: Tormod Volden <debian.tormod@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Connor Behan 2013-10-17 18:26:28 -07:00 committed by Keith Packard
parent b32a4c91cc
commit 04ab07ca19

View File

@ -266,7 +266,9 @@ xf86IsEntityPrimary(int entityIndex)
{
EntityPtr pEnt = xf86Entities[entityIndex];
if (primaryBus.type != pEnt->bus.type)
if (primaryBus.type == BUS_PLATFORM && pEnt->bus.type == BUS_PCI)
return MATCH_PCI_DEVICES(pEnt->bus.id.pci, primaryBus.id.plat->pdev);
else if (primaryBus.type != pEnt->bus.type)
return FALSE;
switch (pEnt->bus.type) {