Commit Graph

10928 Commits

Author SHA1 Message Date
Matthieu Herrb
f54852edc3 Add a 'wscons' autoconf mechanism to configure input devices on BSD.
This does not really handle hotplug (it's handled inside the kernel,
by the 'mux' devices), but uses the wscons console driver
configuration to figure out the keyboard layout and the list of
pointing devices found by the kernel.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-30 10:10:32 +02:00
Keith Packard
afb1fe695d Merge remote-tracking branch 'whot/next' 2011-09-26 20:24:15 -07:00
vdb@picaros.org
c7163fdd30 xfree86: .BI style: monitor section in xorg.conf man page
The xorg.conf manual uses the following convention in most of its
sections:

bold = text to be copied literally to the config file,
italic = a symbolic name to be substituted by a true value.

Some configuration keywords seem to have been changed into generic
options.  Prepending Option to the manual entry swapped the
bold-italic logic.  This patch restores the convention in the monitor
section and consists of

-.BI "Option " "\*qPreferredMode\*q  " \*qstring\*q
+.BI "Option \*qPreferredMode\*q \*q" name \*q

modifications.

Plus a few minor changes (Modes → Mode) and a typo fix.

Signed-off-by: Servaas Vandenberghe
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-27 11:57:28 +10:00
Peter Hutterer
4b4caecb7d xfree86: expose Option "TransformationMatrix"
Recent changes to the server change the default absolute input device
behaviour on zaphods to span the whole desktop too. Since these setups
usually use an xorg.conf, allow the transformation matrix to be specified in
the config as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
2011-09-27 11:57:25 +10:00
Peter Hutterer
cf51424a34 xfree86: use subheader for Pointer Acceleration parts in xorg.conf(5)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-27 11:57:23 +10:00
Peter Hutterer
9125952b40 xfree86: fix comment typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-27 11:57:20 +10:00
Sam Spilsbury
2d2dce558d Remove the SendEvent bit (0x80) before doing range checks on event type.
Some extension libraries may set this bit before converting the event to
wire protocol and as such range checking the event will cause an invalid
BadValue error to result. As the documentation suggests the the bit
should be "forced on", remove it before doing range checks and continue
to force it on in the server.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-27 11:57:17 +10:00
Carlos Garnacho
f52d5cd374 Xi: Fix passive XI2 ungrabs on XIAll[Master]Devices
The corresponding DeviceIntPtr wasn't being gotten properly,
resulting in BadDevice from dixLookupDevice().

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-27 11:56:27 +10:00
Peter Hutterer
24823f1ab0 xfree86: switch options from pointer to XF86OptionPtr
In all cases, the pointer was simply type-cast anyway. Let's get some
compile-time type safety going, how about that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>

Squashed in:
xfree86: Move definition of xf86OptionPtr into separate header file

The pile of spaghettis that is the xfree86 include dependencies make it
rather hard to have a single typedef somewhere that's not interfering with
everything else or drags in a whole bunch of other includes.

Move the xf86OptionRec and GenericListRec declarations into a separate
header.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-27 11:43:36 +10:00
Keith Packard
7fb4bef039 Merge remote-tracking branch 'mattst88/for-keith' 2011-09-21 14:34:27 -07:00
Keith Packard
98f4940093 Merge remote-tracking branch 'alanc/master' 2011-09-21 14:30:19 -07:00
Keith Packard
b018b81533 Merge remote-tracking branch 'jamey/reviewed' 2011-09-21 14:17:14 -07:00
Peter Harris
c90903b4f7 xkb: add missing swaps for xkbGetDeviceInfoReply
Caught during review of e095369bf.

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:45 -04:00
Matt Turner
d206d52f65 Use __builtin_constant_p to determine if we can use lswapl
If the address of the swapped memory location is known at compile time,
we can check its alignment at no runtime cost and use lswapl instead.

           text   data    bss      dec     hex  filename
before: 1872820  52136  78040  2002996  1e9034  hw/xfree86/Xorg
after:  1864396  52136  78040  1994572  1e6f4c  hw/xfree86/Xorg

bswap instructions: 131 ->  308 (used in lswapl)
rol instructions:   943 -> 1174 (used in lswaps)

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner
889b700e77 Use lswap{l,s} in cpswap{l,s}
Should be safe since cpswap isn't used on pointers.

           text   data    bss      dec     hex  filename
before: 1875588  52136  78040  2005764  1e9b04  hw/xfree86/Xorg
after:  1872820  52136  78040  2002996  1e9034  hw/xfree86/Xorg

bswap instructions:   5 -> 131 (used in lswapl)
rol instructions:   811 -> 943 (used in lswaps)

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner
a2f0ff5f73 Make lswap{l,s} inline functions
text   data    bss      dec     hex  filename
before: 1875668  52136  78040  2005844  1e9b54  hw/xfree86/Xorg
after:  1875588  52136  78040  2005764  1e9b04  hw/xfree86/Xorg

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner
e8ff555b95 Add type checking to swap macros
The original macros are retained (instead of replacing them with inline
functions) because of implicit type promotion. That is, an int16 passed
to an inline function taking int32 would be implicitly promoted to int32
without a warning.

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner
893e86a49e Introduce swap_uint{16,32} functions, used in swap{l,s}
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner
54770c980c Cast char* buffers to swap functions
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner
9edcae78c4 Use correct swap{l,s} (or none at all for CARD8)
Swapping the wrong size was never caught because swap{l,s} are macros.

It's clear in the case of Xext/xres.c, that the author believed
client_major/minor to be CARD16 from looking at the code in the first
hunk.

v2: dmx.c fixes from Keith.

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:16 -04:00
Aaron Plattner
03d032991d fb: Rename wfbTriangles and wfbTrapezoids
These symbols were not renamed when they were added to libfb:

 # nm -D libwfb.so | grep ' fb'
 0000000000028d00 T fbTrapezoids
 0000000000028d60 T fbTriangles

This causes corruption and/or crashes on wfb-ful drivers like nvidia:

 Program received signal SIGABRT, Aborted.
 0x00007fd67f3a0405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
     in ../nptl/sysdeps/unix/sysv/linux/raise.c
 (gdb) bt
 #0  0x00007fd67f3a0405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 #1  0x00007fd67f3a3680 in *__GI_abort () at abort.c:92
 #2  0x00007fd67f3995b1 in *__GI___assert_fail (assertion=0x7fd679ecb804 "key->initialized", file=<optimized out>, line=116, function=0x7fd679ecbbc0 "dixGetPrivateAddr")
     at assert.c:81
 #3  0x00007fd679ec55b6 in ?? () from /usr/lib/xorg/modules/libfb.so
 #4  0x00007fd679eca9ef in ?? () from /usr/lib/xorg/modules/libfb.so
 #5  0x00007fd679ecae20 in fbTriangles () from /usr/lib/xorg/modules/libfb.so
 #6  0x00007fd67a58fc55 in ?? () from /usr/lib/xorg/modules/drivers/nvidia_drv.so
 #7  0x00000000004f38d1 in ?? ()
 #8  0x0000000000437ae9 in ?? ()
 #9  0x0000000000426eaa in ?? ()
 #10 0x00007fd67f38cead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>, fini=<optimized out>,
     rtld_fini=<optimized out>, stack_end=0x7fff99860d78) at libc-start.c:228
 #11 0x000000000042719d in _start ()

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 14:14:05 -07:00
Matt Turner
2c7c520cfe Use internal temp variable for swap macros
Also, fix whitespace, mainly around
	swaps(&rep.sequenceNumber)

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:12:04 -04:00
Matt Turner
c10bad3d3e Silence printf format warnings in helper_exec.c
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:12:04 -04:00
Matt Turner
9eab5b3443 Replace Fabs() macro with fabs() function
gcc generates better code with fabs() anyway.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:12:04 -04:00
Matt Turner
40a47bd628 Remove unnecessary #undefs of [f]abs and old comments
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:12:04 -04:00
Gaetan Nadon
079a7585e4 devbook.am: maintenance update from docbook.am
The developer docs are generated from a subset of docbook.am
which is sometimes updated.

The one difference for xserver is the embedded css style in the HEAD element.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 14:07:52 -07:00
Gaetan Nadon
82c55b5a99 docbook.am: embed css styles inside the HTML HEAD element
Rather than referring to the external xorg.css stylesheet, embed the content
of the file in the html output produced. This is accomplished by using
version 1.10 of xorg-xhtml.xsl.

This makes the whole html docs tree much more relocatable.
In addition, it eliminates xorg.css as a runtime file which makes
xorg-sgml-doctools a build time only package.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 14:07:49 -07:00
Gaetan Nadon
1602444e05 docbook.am: global maintenance update - entities, images and olinking
Adding support in libX11 for html chunking caused a reorg of docbook.am
as well as the xorg-sgml-doctools masterdb for olinking.
The parameter img.src.path is added for pdf images.
A searchpath to the root builddir is added for local entities, if present.
This feature was initiated by xserver module and made available to all.

The docbook.am makefile hides all the details and is identical for
all 22 modules having DocBook documentation. It is included by a thin
Makefile.am which requires no docbook knowledge.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 14:07:46 -07:00
Pauli Nieminen
871d65790e DRI2: Allow DDX to validate swap_limit changes
DDX can now implement validation for swap_limit changes to prevent
configurations that are not support in driver.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
CC: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-09-21 14:04:37 -07:00
Pauli Nieminen
b435e2aac1 DRI2: Expose API to set drawable swap limit.
This allows ddx to set swap_limit if there is more than one back
buffer for drawable. Setting swap_limit has to also check if change
affects a client that is blocked.

This can be used to implement N-buffering in driver with minimal
logic in allocation and selecting next back.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 13:55:45 -07:00
Pauli Nieminen
86f8da0aa7 DRI2: Add ReuseBufferNotify hook
ReuseBufferNotify hook is called whenever old buffer is reused in DRI2
code.

Driver can use this hook to rewrite the buffer name if hardware requires
shared buffers. Shared buffer might be some hardware limited resources like
framebuffer that is preallocated in boot.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 13:54:55 -07:00
vdb@picaros.org
2f47433fef print DisplayMode type bits
Dear,

A patch I posted on xorg-devel was reviewed and is ready for
inclusion in xserver.  Would you be willing to apply the patch so that
it finds its way into the master branch ?

Thank you, Servaas Vandenberghe.

http://lists.x.org/archives/xorg-devel/2011-August/024769.html
http://lists.x.org/archives/xorg-devel/2011-August/024777.html

This patch adds printing of the DisplayMode type bits to
xf86PrintModeline().  It helps to trace the modeline origin and to
understand the initial configured modeline.

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Servaas Vandenberghe
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 13:46:57 -07:00
Keith Packard
c92c83523e Merge remote-tracking branch 'kibi/master' 2011-09-21 13:32:06 -07:00
Aaron Plattner
4ad271d06c xfree86: Bump extension ABI version to 6.0
The video driver ABI was bumped to 11.0 in commit
0de7cec907 because of a change to the
size of ATOM in commit 51f353d0a0.  This
also affects extension modules, so the extension ABI version should
have been bumped too.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 13:28:11 -07:00
Alan Coopersmith
c8eacae4f8 Space & style cleanup of hw/xfree86/i2c/fi1236.c
Fortunately, the massive decrease in the cost of whitespace in the past
decade has allowed us to be much more generous with it, and much more
consistent in its application, even for code like this that clearly no
one has ever tried to read.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-09-20 07:41:18 -07:00
Alan Coopersmith
c46215c100 Cross-reference cvt(1) & gtf(1) man pages
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-20 07:41:18 -07:00
Alan Coopersmith
1526f1caf3 Remove unused ClientStateAuthenticating
Appears to be leftover from the Kerberos code deleted in 2007
(commit dfbe32b5b8).
Nothing left ever set clientState to ClientStateAuthenticating

Skipped over 1 to preserve existing enum numbering.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-20 07:41:11 -07:00
Jamey Sharp
0f380a5005 Fix pixmap double-frees on error paths.
If AddResource fails, it will automatically free the object that was
passed to it by calling the appropriate deleteFunc; and of course
FreeResource also calls the deleteFunc. In both cases it's wrong to call
the destroy hook manually.

Commit by Jamey Sharp and Josh Triplett.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2011-09-19 23:36:43 -07:00
Jamey Sharp
8f69c935f6 Eliminate MAXSCREENS-sized CursorScreenKey array.
Use new per-screen privates API instead.

Commit by Jamey Sharp and Josh Triplett.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-19 22:53:05 -07:00
Jamey Sharp
c96a43888c Revert "Bug #6924: Restore the ABI for DrawableRec and ColormapRec to the state"
This reverts commit bc0c56c407 since we're
breaking ABI anyway.

Conflicts:

	ChangeLog
	dix/colormap.c
	dix/pixmap.c
	dix/window.c
	include/pixmapstr.h

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2011-09-19 22:31:21 -07:00
Alan Coopersmith
13ac1ba480 Remove unused ClientStateCheckingSecurity & ClientStateCheckedSecurity
Appear to be leftovers from the XC-QUERY-SECURITY code deleted in 2007
(commit 375864cb74).
Nothing left ever set clientState to ClientStateCheckingSecurity.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-19 15:35:10 -07:00
Alan Coopersmith
78f946c297 sun_init.c: Implement novtswitch & sharevts for Solaris
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: John Martin <john.m.martin@oracle.com>
2011-09-19 15:34:54 -07:00
Jamey Sharp
87cc83474d Replace XmuSnprintf with snprintf.
Alan Coopersmith explains:

	XmuSnprintf() can be replaced by snprintf() now. (It was a
	implementation X provided for it's libraries to use in the days
	before all platforms we cared about had snprintf in libc.)

Reported-by: walter harms <wharms@bfs.de>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-19 15:16:04 -07:00
Jamey Sharp
df4eeb1256 xnest: Delete unused nClipRects GC-private field.
This field was never read at any time in the git history.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-18 20:11:43 -05:00
Jamey Sharp
53a4744b69 XineramaInitData ignores its argument. Quit passing one.
Also fix up XineramaInitData's caller, XineramaReinitData.

Commit by Jamey Sharp and Josh Triplett.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-18 20:11:43 -05:00
Jamey Sharp
b85c10a35d dmx: Fix some "no previous prototype" warnings by making functions static.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2011-09-18 20:11:43 -05:00
Jamey Sharp
d423012e77 dmx: Fix a non-constant printf format string warning.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-18 20:11:43 -05:00
Alan Coopersmith
7e127f12a2 sun_init.c: Move vt switches to a switch_to helper function like lnx_init.c
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-16 17:13:58 -07:00
Alan Coopersmith
a00dc6af6e Xorg.man: Add -novtswitch and -sharevts options
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-16 17:13:49 -07:00
Alan Coopersmith
93abda6bdd xfree86: move -novtswitch & -sharevts argument handling up to common layer
Stop duplicating in each os-support variant before it gets replicated
even further.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
2011-09-16 17:13:06 -07:00