[PATCH] xfree86: Unbreak autoconfig following 0abf065e38c4

Kristian Høgsberg krh at bitplanet.net
Wed Jun 2 16:26:07 PDT 2010


On Thu, May 27, 2010 at 8:26 AM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> The move of the PCI device id probing into a separate file neglected to
> return the number of found devices, and so the PCI devices were being
> overwritten by the default entries for vesa and fbdev.

Patch looks right to me and it fixes the autoloading problem.

Tested-by: Kristian Høgsberg <krh at bitplanet.net>

Please apply.

Kristian

> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tiago Vignatti <tiago.vignatti at nokia.com>
> Cc: Alex Deucher <alexdeucher at gmail.com>
> Reviewed-by: Julien Cristau <jcristau at debian.org>
> Reviewed-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> ---
>  hw/xfree86/common/xf86AutoConfig.c |    2 +-
>  hw/xfree86/common/xf86pciBus.c     |    8 +++++++-
>  hw/xfree86/common/xf86pciBus.h     |    2 +-
>  3 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
> index 8947a4f..5b236af 100644
> --- a/hw/xfree86/common/xf86AutoConfig.c
> +++ b/hw/xfree86/common/xf86AutoConfig.c
> @@ -257,7 +257,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
>     }
>  #endif
>
> -    xf86PciMatchDriver(matches, nmatches);
> +    i = xf86PciMatchDriver(matches, nmatches);
>
>     /* Fallback to platform default hardware */
>     if (i < (nmatches - 1)) {
> diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
> index 085be01..184f221 100644
> --- a/hw/xfree86/common/xf86pciBus.c
> +++ b/hw/xfree86/common/xf86pciBus.c
> @@ -1294,7 +1294,11 @@ matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip
>  }
>  #endif /* __linux__ */
>
> -void
> +/**
> + *  @return The numbers of found devices that match with the current system
> + *  drivers.
> + */
> +int
>  xf86PciMatchDriver(char* matches[], int nmatches) {
>     int i;
>     struct pci_device * info = NULL;
> @@ -1326,4 +1330,6 @@ xf86PciMatchDriver(char* matches[], int nmatches) {
>     if ((info != NULL) && (i < nmatches)) {
>        i += videoPtrToDriverList(info, &(matches[i]), nmatches - i);
>     }
> +
> +    return i;
>  }
> diff --git a/hw/xfree86/common/xf86pciBus.h b/hw/xfree86/common/xf86pciBus.h
> index f84a496..3f02b93 100644
> --- a/hw/xfree86/common/xf86pciBus.h
> +++ b/hw/xfree86/common/xf86pciBus.h
> @@ -37,6 +37,6 @@ void xf86PciProbe(void);
>  Bool xf86PciAddMatchingDev(DriverPtr drvp);
>  Bool xf86PciProbeDev(DriverPtr drvp);
>  void xf86PciIsolateDevice(char *argument);
> -void xf86PciMatchDriver(char* matches[], int nmatches);
> +int xf86PciMatchDriver(char* matches[], int nmatches);
>
>  #endif /* _XF86_PCI_BUS_H */
> --
> 1.7.1
>
> _______________________________________________
> 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
>


More information about the xorg-devel mailing list