hw/xwin: link dynamically and export symbols

With my patch to fix shared libXfont to work correctly on Cygwin/Win32,
there is no need for -static anymore.  But, XWin.exe must export its
symbols in order for them to override libXfont's stubs.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
xfree86: Make driver matching consistent

Most of the driver enumeration functions take an array and a maximum
number of entries that they are allowed to fill in. Upon success, they
return the number of entries filled in. This allows them to be easily
used to consecutively.

One exception is the xf86MatchDriverFromFiles() function, which doesn't
return a value, so callers have to manually search the array for the
first empty entry.

This commit modifies the xf86MatchDriverFromFiles() to behave the same
way as others, which makes it easier to deal with.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>  (on arm / platform device)
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
xfree86: Store kernel driver name in platform device attribute

When opening a DRM device, query the version and store the driver name
as a new attribute for future reference.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
xfree86: Introduce OutputClass configuration

The OutputClass section provides a way to match output devices to a set
of given attributes and configure them. For now, only matching by kernel
driver name is supported. This can be used to determine what DDX module
to load for non-PCI output devices. DDX modules can ship an xorg.conf.d
snippet (e.g. in /usr/share/X11/xorg.conf.d) that looks like this:

	Section "OutputClass"
	    Identifer "NVIDIA Tegra open-source driver"
	    MatchDriver "tegra"
	    Driver "opentegra"
	EndSection

This will cause any device that's driven by the kernel driver named
"tegra" to use the "opentegra" DDX module.

See the OUTPUTCLASS section in xorg.conf(5) for more details.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
xfree86: Support driver loading via OutputClass

Use the OutputClass configuration to determine what drivers to autoload
for a given device.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
xfree86: Make error message more readable

While at it also replace a tab by four spaces for consistency.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Update to version 1.15.99.904

One more RC to get the non-PCI patches tested before release

Signed-off-by: Keith Packard <keithp@keithp.com>
Merge remote-tracking branch 'jturney/master'