On Wed, Oct 17, 2012 at 12:06:47PM +0200, Thierry Reding wrote:
> For non-PCI video devices, such as those found on many ARM embedded
> systems, the X server currently requires the BusID option to specify the
> full path to the DRM device's sysfs node in order to properly match it
> against the probed platform devices.
> 
> In order to allow X to start up properly if either the BusID option was
> omitted or no configuration is present at all, the first video device is
> used by default.
> 
> Signed-off-by: Thierry Reding <thierry.red...@avionic-design.de>
> ---
> Changes in v2:
> - Add additional checks for safety (I don't think numDevs will ever be 0
>   since a default will be generated if no configuration is present, but
>   it doesn't hurt to check anyway). Without these checks there is a
>   possibility of the X server crashing if no platform devices have been
>   found.
> 
>  hw/xfree86/common/xf86platformBus.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/hw/xfree86/common/xf86platformBus.c 
> b/hw/xfree86/common/xf86platformBus.c
> index 0525e39..599d84a 100644
> --- a/hw/xfree86/common/xf86platformBus.c
> +++ b/hw/xfree86/common/xf86platformBus.c
> @@ -377,6 +377,14 @@ xf86platformProbeDev(DriverPtr drvp)
>              continue;
>      }
>  
> +    /*
> +     * If all of the above fails, which can happen if X was started without
> +     * configuration or if BusID wasn't set for non-PCI devices, use the 
> first
> +     * device by default.
> +     */
> +    if (!foundScreen && xf86_num_platform_devices > 0 && numDevs > 0)
> +        foundScreen = probeSingleDevice(&xf86_platform_devices[0], drvp, 
> devList[0], 0);
> +
>      /* if autoaddgpu devices is enabled then go find a few more and add them 
> as GPU screens */
>      if (xf86Info.autoAddGPU && numDevs) {
>          for (j = 0; j < xf86_num_platform_devices; j++) {

Can anyone review this patch? I think it is also a candidate for 1.13,
since it fixes a regression from the 1.12 series.

Thierry

Attachment: pgpIfvRWYOWRj.pgp
Description: PGP signature

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to