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

Laércio de Sousa lbsousajr at gmail.com
Tue Oct 1 03:58:28 PDT 2013


Hi Connor!

Is this related?

https://bugs.freedesktop.org/show_bug.cgi?id=66851

CANTATE DOMINO CANTICUM NOVUM
QUIA MIRABILIA FECIT

Laércio


2013/9/30 Connor Behan <connor.behan at gmail.com>

> 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
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20131001/349cd634/attachment.html>


More information about the xorg-devel mailing list