[PATCH RESEND] xfree86: Find primary entity when bus types are nominally different

Tormod Volden lists.tormod at gmail.com
Fri Oct 25 19:41:01 CEST 2013


On Fri, Oct 18, 2013 at 3:26 AM, Connor Behan wrote:
> 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 at gmail.com>
> ---
>  hw/xfree86/common/xf86Bus.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
> index e101537..329d0b3 100644
> --- a/hw/xfree86/common/xf86Bus.c
> +++ b/hw/xfree86/common/xf86Bus.c
> @@ -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) {
> --
> 1.8.4

Acked-by: Tormod Volden <debian.tormod at gmail.com>


More information about the xorg-devel mailing list