Go to file
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
composite dix/render: consolidate window format matching code. 2012-06-28 10:43:35 -07:00
config xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
damageext Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dbe Indentation: Change '& stuff' to '&stuff' 2012-03-21 14:02:30 -07:00
dix privates: Allow device privates to be allocated after server start 2012-07-05 13:40:27 -07:00
doc Add screen-specific privates. 2012-07-05 13:39:50 -07:00
exa Use screen-specific privates for exa pixmap and gc privates 2012-07-05 13:40:20 -07:00
fb Use new screen-specific privates for fb window and gc privates 2012-07-05 13:40:18 -07:00
glx glx/dri2: Enable GLX_ARB_create_context_robustness 2012-07-05 11:45:44 -07:00
hw xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
include xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
m4 Use XORG_STRICT_OPTION from util-macros 1.14 to set -Werror flags 2011-05-27 19:51:05 -07:00
man os: Add -displayfd option 2012-05-01 11:36:30 +10:00
mi mi: Don't save midispcur rendering resources for each cursor 2012-07-05 13:40:23 -07:00
miext api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
os Merge branch 'sigio-vt-switch-issues' into for-keith 2012-07-04 21:23:48 +10:00
randr randr: Fix REQUEST vs. REQUEST_SIZE_MATCH mismatch 2012-06-29 23:34:30 -07:00
record Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
render Add screen-specific privates. 2012-07-05 13:39:50 -07:00
test Merge branch 'sigio-vt-switch-issues' into for-keith 2012-07-04 21:23:48 +10:00
Xext api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xfixes api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
Xi Xi: extend PropagateMask to EMASKSIZE 2012-07-04 21:16:16 +10:00
xkb xkb: use local variable instead of casting arg 2012-07-04 21:16:16 +10:00
.gitignore doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00
autogen.sh autogen.sh: Pass --force to autoreconf 2008-07-22 16:55:26 +03:00
configure.ac xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
COPYING Add asprintf() implementation for platforms without it 2010-12-07 11:10:35 -08:00
devbook.am devbook.am: maintenance update from docbook.am 2011-09-21 14:07:52 -07:00
docbook.am docbook.am: embed css styles inside the HTML HEAD element 2011-09-21 14:07:49 -07:00
fix-miregion Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-miregion-private Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-patch-whitespace Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fix-region Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
Makefile.am man: relocate manual pages in the man subdir outside doc 2011-05-13 14:08:17 -07:00
manpages.am Xdmx.man: Show actual configured XKB defaults instead of old hardcoded values 2011-06-21 17:54:14 -07:00
README packaging: provide a default README file #24206 2010-01-27 14:00:17 -08:00
xorg-server.m4 macros: use PKG_CONFIG variable rather than executable name 2010-01-07 12:57:23 -08:00
xorg-server.pc.in xfree86: link modules against Xorg symbols on Cygwin 2012-04-05 21:57:07 -05:00
xserver.ent.in doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00

					X Server

The X server accepts requests from client applications to create windows,
which are (normally rectangular) "virtual screens" that the client program
can draw into.

Windows are then composed on the actual screen by the X server
(or by a separate composite manager) as directed by the window manager,
which usually communicates with the user via graphical controls such as buttons
and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the
following article:
http://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the
Xorg mailing list:

        http://lists.freedesktop.org/mailman/listinfo/xorg

Please submit bug reports to the Xorg bugzilla:

        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

The master development code repository can be found at:

        git://anongit.freedesktop.org/git/xorg/xserver

        http://cgit.freedesktop.org/xorg/xserver

For patch submission instructions, see:

	http://www.x.org/wiki/Development/Documentation/SubmittingPatches

For more information on the git code manager, see:

        http://wiki.x.org/wiki/GitPage