xserver/hw/xfree86/common
Dave Airlie cf66471353 xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.

At startup the list of drm/kms devices is probed and this info is
used to load drivers.

A new driver probing method is introduced that passes the udev
device info to the driver for probing.

The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.

The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.

This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.

v2: rename to platform bus, now with 100% less udev specific,

this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.

also add MATCH_PCI_DEVICES macro.

This version is mainly to address concerns raised by ajax.

v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.

v4: add free list, fix struct whitespace.
ajax this address most of your issues?

v5: drop probe ifdef, fix logic issue

v6: some overhaul after more testing.

Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
   match against bus id if one exists, or primary device.

RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.

v6.1: add missing noop platform function

v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.

v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.

v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.

v10: address most of Keith's concerns.

v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-06 10:20:19 +01:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
Makefile.am xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
compiler.h Provide prototypes for Mmio functions for Solaris Studio on SPARC 2012-06-05 16:28:54 -07:00
extramodes Remove some default modes that really shouldn't be in the default set. 2008-06-24 10:40:36 -04:00
fourcc.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
modeline2c.awk Remove some OS/2 leftovers. 2009-04-06 10:58:47 -04:00
vesamodes Fix standard VESA modes. 2006-11-03 14:06:32 -08:00
vidmodeproc.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86.h xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86AutoConfig.c xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86Build.h.in Print the build time as well as the date if we can. 2007-06-04 02:03:44 -04:00
xf86Bus.c xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86Bus.h xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86Config.c xfree86: fix use-after-free issue in checkInput 2012-07-04 21:16:16 +10:00
xf86Config.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Configure.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Cursor.c xfree86: drop ddx-specific SIGIO blocking 2012-07-03 15:56:35 +10:00
xf86DGA.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86DPMS.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86Events.c xfree86: drop ddx-specific SIGIO blocking 2012-07-03 15:56:35 +10:00
xf86Globals.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Helper.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86InPriv.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Init.c Merge branch 'sigio-vt-switch-issues' into for-keith 2012-07-04 21:23:48 +10:00
xf86Mode.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86Module.h Bump to ABI_XINPUT_VERSION 18 2012-07-02 22:34:33 -07:00
xf86Opt.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Option.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Optionstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86PM.c xfree86: drop ddx-specific SIGIO blocking 2012-07-03 15:56:35 +10:00
xf86PciInfo.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Priv.h api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86Privstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86RandR.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86VGAarbiter.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86VGAarbiter.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86VGAarbiterPriv.h api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86VidMode.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86Xinput.c xfree86: fix mouse wheel support for DGA clients 2012-05-23 16:06:27 +10:00
xf86Xinput.h xfree86: constify InputDriverPtr->driverName and default_options 2012-07-02 22:34:33 -07:00
xf86cmap.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86cmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86fbBus.c xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86fbman.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86fbman.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86noBus.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86pciBus.c xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86pciBus.h xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86platformBus.c xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86platformBus.h xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86sbusBus.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86sbusBus.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86str.h xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86xv.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86xv.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86xvmc.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86xvmc.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86xvpriv.h xfree86: fix new warnings introduced in rebase. 2012-06-05 10:33:23 -07:00
xisb.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xisb.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xorgHelper.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xorgVersion.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00