xserver-multidpi/hw/xfree86
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
..
common xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
ddc api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
dixmods xfree86: Add ifdef wrapper to xvmodproc.h 2012-05-14 13:29:20 +01:00
doc api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
dri Add pixman to module dependencies for pixman_region_* functions 2012-07-02 11:08:57 -07:00
dri2 Add pixman to module dependencies for pixman_region_* functions 2012-07-02 11:08:57 -07:00
exa api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
fbdevhw Make stub version of fbdevHWAdjustFrame match new prototype in fbdevhw.h 2012-06-11 18:29:16 -07:00
i2c Build tda9885.c functions into fi1236 to avoid libtool relinking problems 2012-07-02 11:08:37 -07:00
int10 xserver: fix build on arm tinderbox 2012-06-14 11:09:30 -07:00
loader Look for ModuleData only in appropriate library 2012-07-04 21:26:24 +10:00
man loader: add Cygwin support 2012-04-05 21:57:04 -05:00
modes dix/render: consolidate window format matching code. 2012-06-28 10:43:35 -07:00
os-support xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
parser Remove obsolete tab stop comments from hw/xfree86/parser/*.c 2012-06-20 21:41:52 -07:00
ramdac xf86: cursor code got mangled by indenting 2012-07-06 10:20:18 +01:00
shadowfb api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
utils cvt man page should use Hz, not kHz, for vertical refresh rate 2012-05-18 15:00:47 -07:00
vbe api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
vgahw xf86: reimplement XF86SCRNINFO macro using new functions. 2012-05-21 12:59:20 +01:00
x86emu Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xaa Add pixman to module dependencies for pixman_region_* functions 2012-07-02 11:08:57 -07:00
.gitignore xfree86: Move sdksyms generation to ddx toplevel 2011-06-23 05:28:31 -07:00
Makefile.am Enable no-undefined symbols mode in Solaris builds if -z parent is in ld 2012-07-02 11:09:02 -07:00
sdksyms.sh xres: Fix build without composite 2012-04-23 20:16:53 -07:00
xorgconf.cpp xfree86: use sed rather than cpp to perform string substitutions 2011-01-18 15:11:14 -08:00