xserver-multidpi/include
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
callback.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
client.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
closestr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
closure.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
colormap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
colormapst.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
cursor.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
cursorstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dix-config-apple-verbatim.h Move the apple fat binary hacks back to a header file, and make it apple-only. 2009-01-30 16:36:45 -08:00
dix-config.h.in xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
dix.h dix: move freeing the sprite into a function 2012-06-07 14:13:44 +10:00
dixaccess.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dixevents.h dix: Remove redundant declarations. 2012-05-14 13:31:00 +01:00
dixfont.h Add dixGetGlyphs to replace GetGlyphs from libXfont to simplify linking 2012-07-02 10:09:08 -07:00
dixfontstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dixgrabs.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dixstruct.h Change lastDeviceIdleTime to be per-device 2012-03-22 13:12:56 +10:00
eventconvert.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
events.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
eventstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
exevents.h dix: Move DeviceFocusEvent from Xi into enterleave.c 2012-05-17 08:50:44 +10:00
extension.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
extinit.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
extnsionst.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
gc.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
gcstruct.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
globals.h Add global variable inSignalContext 2012-06-21 15:45:22 +10:00
hotplug.h xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
input.h dix: disable all devices before shutdown 2012-06-07 14:13:51 +10:00
inputstr.h Xext: Add per-device SyncCounters 2012-03-22 13:12:56 +10:00
inpututils.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
kdrive-config.h.in kdrive: Add option to compile out input drivers 2010-01-06 19:47:53 +06:00
list.h list.h: don't crash when removing an element from a NULL list 2012-07-05 10:09:18 -07:00
Makefile.am Add 'optionstr.h' to include/Makefile.am 2011-11-20 14:50:57 -08:00
misc.h Make BUG_WARN* signal safe 2012-07-02 22:34:32 -07:00
miscstruct.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
opaque.h os: Add -displayfd option 2012-05-01 11:36:30 +10:00
optionstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
os.h Merge branch 'sigio-vt-switch-issues' into for-keith 2012-07-04 21:23:48 +10:00
pixmap.h api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
pixmapstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
privates.h privates: Allow device privates to be allocated after server start 2012-07-05 13:40:27 -07:00
property.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
propertyst.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
protocol-versions.h Implemented first part of XResource extension v1.2: X_XResQueryClientIds 2012-04-18 10:21:49 +03:00
ptrveloc.h dix: indentation fixes for pointer acceleration 2012-05-16 10:59:35 +10:00
region.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
regionstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
registry.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
resource.h xserver: Remove duplicate declaration in resource.h 2012-05-14 13:17:08 +01:00
rgb.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
screenint.h api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
scrnintstr.h Add screen-specific privates. 2012-07-05 13:39:50 -07:00
selection.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
servermd.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
site.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
swaprep.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
swapreq.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
validate.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
version-config.h.in Move VENDOR_* defines from AC_SUBST to a header to avoid angering shave. 2009-04-14 10:35:44 -04:00
window.h dix/render: consolidate window format matching code. 2012-06-28 10:43:35 -07:00
windowstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
XIstubs.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xkb-config.h.in Move to autoconf standard function name checks & defines 2011-12-05 14:32:45 -08:00
xkbfile.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xkbrules.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xkbsrv.h include: document _XkbErrCode2 macros 2012-06-22 10:51:00 +10:00
xkbstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xorg-config.h.in xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xorg-server.h.in xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
Xprintf.h os/xprintf: add Xvscnprintf and Xscnprintf 2012-05-03 14:59:23 +10:00
xserver-properties.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xsha1.h Move SHA1 computation from render/glyph.c to os/ 2009-10-15 01:17:44 +02:00
xwin-config.h.in Remove unused function checks from configure.ac & include/*.h.in 2011-12-03 10:19:12 -08:00