Commit Graph

9078 Commits

Author SHA1 Message Date
Peter Hutterer
c8a608cb6c config: only match sane devices in 10-evdev.conf
Having a generic catchall also adds devices like accelerometers. These
devices make X unusable, hence restrict matching to "known sane" devices
like pointers, touchpads, keyboards, tablets and touchscreens.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Julien Cristau <jcristau@debian.org>
Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Acked-by: James Cloos <cloos@jhcloos.com>
2010-04-08 15:21:00 +10:00
Pierre-Loup A. Griffais
6b09f66d8c Don't keep a pointer to a possibly freed cursor when changing screens, preventing a crash in xf86CursorEnableDisableFBAccess() trying to restore it.
Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08 15:21:00 +10:00
Keith Packard
a7698a6776 Merge remote branch 'jbarnes/master' 2010-04-06 12:36:15 -07:00
Keith Packard
495cec794d xserver 1.8.0
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-02 00:14:23 -07:00
Tiago Vignatti
b9ad452ec9 xfree86: die gracefully in the vga arbiter if AddScreen fails
vga arbiter will be locked in one device while AbortDDX will call LeaveVT
routines from the other device. Fail!

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-02 00:09:20 -07:00
Peter Hutterer
e75f202e77 configure: enable udev backend as "auto"
Due to the checks in configure, this means it gets priority over HAL if
libudev is found.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-02 00:05:25 -07:00
Keith Packard
24952b7866 Install 10-evdev.conf in $(prefix)/etc/X11/xorg.conf.d under udev
udev needs some xorg.conf file to tell it to load a suitable input
driver, 10-evdev.conf is as simple as they come, mapping all evdev
devices to the evdev driver.

Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-01 23:59:36 -07:00
Jeremy Huddleston
02328f190f Bump bundle version to 2.5.1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 18:22:32 -07:00
Jeremy Huddleston
0e342add77 darwin: Correct inline assembly for ___crashreporter_info__
It was missing an underscore.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 15:32:51 -07:00
Ruediger Oertel
67b814d9b2 Remove now obsolete function chooseVideoDriver
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-29 12:01:46 -07:00
Ruediger Oertel
1dd5fbc5a4 xfree86: Handle driver autoconfiguration when .conf files exist
When doing driver autoconfiguration with some parts of the config file
present but no driver set (e.g. only input configuration) fix the case
that we may have multiple drivers to try.

Create a screen section for each driver and let them be tried in a row.

Signed-off-by: Ruediger Oertel <ro@suse.de>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Timo Aaltonen <timo.aaltonen@aalto.fi>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-29 12:01:15 -07:00
Keith Packard
57cb1a854a Merge remote branch 'jeremyhu/master' 2010-03-29 11:46:00 -07:00
Keith Packard
4b3d67a764 Merge remote branch 'whot/for-keith' 2010-03-29 11:44:07 -07:00
Jesse Barnes
165a4a9c7d GLX/DRI2: expose swap control extensions if DDX support is present
Export DDX swap control status from the DRI2 module and check for it in
GLX when initializing extensions.

Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:03:12 -07:00
Jesse Barnes
5933b0abc6 DRI2: prevent swap wakes from waking MSC waiters
If a few swaps were queued leading to a throttle related block on the
client, and then the client submitted an MSC wait, one of the previous
swap wakeups could have caused the MSC wait to complete early.  Add a
flag for this to prevent a swap wake from prematurely waking an MSC
waiter.

Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:02:57 -07:00
Jesse Barnes
b00d435ddf DRI2: handle swapsPending better
Avoid a potential swapsPending underflow by incrementing it before
ScheduleSwap, which may complete it immediately.  And be sure to
decrement it again in case the schedule failed.

Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:02:51 -07:00
Jesse Barnes
0294ff2a5c DRI2: throttle swaps at submission time too
We need to throttle swaps here in addition to when the context is made
current to avoid causing problems with clients that just swap.
Throttling here also ensures our swaps get ordered as long as we block
the client occasionally.

Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:02:45 -07:00
Jesse Barnes
db1c7cb604 DRI2: advertise lowest supported DRI2 protocol version
Update our supported DRI2 protocol version as each driver does
DRI2ScreenInit, since depending on available kernel features, each DDX
may support different callbacks and therefore protocol.

Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:02:37 -07:00
Jesse Barnes
87ca6320f2 DRI2: handle swap_interval of 0 correctly
A 0 swap interval means that swaps shouldn't be sync'd to vblank, so
just complete the swap immediately in that case.

Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:02:30 -07:00
Jesse Barnes
8476d99231 DRI2: drawable lifetime fixes
Handle drawable destruction and lifetime correctly.

Check whether the drawable priv is valid in DRI2SwapInterval(),
DRI2WaitSBC() and DRI2WaitMSC(); it may have gone away, so be sure to
check it before using it.

If more than 1 outstanding swap is queued, we may complete several after
an app has exited.  If we free it after the first one completes and the
refcount reaches 0, we'll crash the server on subsequent completions.
So delay freeing until all swaps complete and remove the error message
as this is a normal occurence.  To do this properly, we must also avoid
destroying drawables in DRI2DestroyDrawable() if a swap or wait event is
pending.

And finally, make sure we free drawables in DRI2WaitMSCComplete() if
necessary (i.e. if the refcount has reached 0 and this MSC was the last
pending event on the object).

Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:02:22 -07:00
Jesse Barnes
b180e43977 DRI2: fix swapbuffers handling of SBC and target MSC
Returns expected SBC after completion of swap to caller, as required by
OML_sync_control spec, instead of the last_swap_target value.

Passes target_msc, divisor, remainder, correctly for
glXSwapBuffersMscOML() call, while retaining old behaviour for simple
glXSwapBuffers() call.

An OML swap can have a 0 target_msc, which just means it needs to
satisfy the divisor/remainder equation.  Pass this down to the driver as
needed so we can support it.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-03-29 10:02:17 -07:00
Mario Kleiner
751e8c09d3 DRI2WaitSbc(): Fixes for correct semantic of glXWaitForSbcOML()
Added implementation for case target_sbc == 0. In that case, the
function shall schedule a wait until all pending swaps for the drawable
have completed.

Fix for non-blocking case. Old implementation returned random,
uninitialized values for (ust,msc,sbc) if it returned immediately
without scheduling a wait due to sbc >= target_sbc.

Now if function doesn't schedule a wait, but returns immediately,
it returns the (ust,msc,sbc) of the most recently completed swap,
i.e., the UST and MSC corresponding to the time when the returned
current SBC was reached.

Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-03-29 10:02:13 -07:00
Mario Kleiner
0de4974b90 DRI2: Fix glitches in DRI2SwapComplete() and DRI2WakeupClient()
DRI2SwapComplete(): Increment pPriv->swap_count++; before calling
into callback for INTEL_swap_events extension, so the swap event
contains the current SBC after swap completion instead of the
previous one.

DRI2WakeupClient: Check for pPriv->target_sbc <= pPriv->swap_count,
had wrong comparison pPriv->target_sbc >= pPriv->swap_count for
unblocking of clients of DRI2WaitSBC().

Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-03-29 10:01:53 -07:00
Jesse Barnes
4c8ec49826 DRI2: make target_sbc signed
We need to track invalid targets as well as 0 targets, so just make it
signed so our comparisons work like they should.

Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reported-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:01:46 -07:00
Jesse Barnes
c4d54816f2 DRI2: fixup handling of last_swap_target
We need to initialize the swap target, which is passed to the driver to
schedule events.  Rather than using -1 to indicate that the field is
uninitialized, just make sure we initialize it at drawable creation
time.

Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:01:07 -07:00
Jeremy Huddleston
28a5f14b40 XQuartz: Re-query dixScreenOrigins as the value could've changed.
Fix a regression in 9c9c3a85b0

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Acked-by: Adam Jackson <ajax@redhat.com>
2010-03-29 09:37:19 -07:00
Jeremy Huddleston
436d0bb9cc darwin: Generate crash reports on FatalError()
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Acked-by: Adam Jackson <ajax@redhat.com>
2010-03-29 09:37:17 -07:00
Jeremy Huddleston
73b3b67aac GLX: Remove a redundant initialization
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Acked-by: Adam Jackson <ajax@redhat.com>
2010-03-29 09:37:14 -07:00
Jeremy Huddleston
339207be6f XQuartz: Workaround weird key data reported on some layouts
This should make 'Unicode Hex Input' work as an input layout.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Acked-by: Adam Jackson <ajax@redhat.com>
2010-03-29 09:37:10 -07:00
Dan Nicholson
aa91508356 config/udev: Prefer product name from attribute rather than uevent
The input device product name for evdev devices in the kernel uevent has
embedded quotes that aren't expected here. Use the sysfs name attribute
instead, which does not suffer this problem. The uevent name will be
used as a fallback if no name attribute is found.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-26 15:30:57 +10:00
Fernando Carrijo
d00c3298a6 Cleanup some comments in SpriteRec
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-26 15:30:57 +10:00
Peter Hutterer
70bd02f2ea xfree86: merge driver from the input class into the options.
A driver that is assigned by an input class is only present as idev->driver.
The driver itself has no access to this information once PreInit is called.
For devices that rely on chain-hotplugging (wacom), this means that for the
second device the driver information is lost and the second device cannot be
initialized through NewInputDeviceRequest. Although this could be worked
around by hardcoding the driver name in the wacom driver, having the
assigned driver in the options seems like the better solution.

This issue only manifests itself with the udev backend. With HAL, the driver
is assigned by HAL and the option is duplicated in config/hal.c.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-26 15:30:55 +10:00
Rami Ylimaki
579715f830 os: Prevent backtrace from being stopped in noreturn functions.
There are two noreturn functions in the X server: FatalError and
AbortServer. Having any of those two functions in the middle of a call
stack will prevent unwinding the program properly and stops the
backtrace at those functions in gdb.

The file containing FatalError and AbortServer, os/log.c, has to be
compiled with the -mapcs-frame option on ARM to get proper
backtraces. Automake imposes its own restrictions on compiling
individual source files with different options. The recommended way to
do this is to put os/log.c into a convenience library and add this
library inside os/libos.la. See the documentation of GNU Automake
manual, version 1.11.1, section 27.8 Per-Object Flags Emulation, for
details.

Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-25 06:03:43 +01:00
Mikhail Gusarov
e086b99c1f kdrive: Bump evdev maxKeycode
There are keycodes > 193 in evdev, e.g. KEY_WIMAX which is 246 .

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Adam Jackson <ajax@nwnk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-24 14:03:51 +01:00
Peter Harris
185185eeb4 Fix crash when all glyphs of a given depth are freed, but not all glyphsets
This is how the crash can be triggered with only two clients on the system:
Client A: (already running)
Client B: Connect
Client B: CreateGlyphSet(depthN)
Client A: Disconnect
Server: free globalGlyphs(depthN)
Client B: AddGlyphs(depthN)
Server: SEGV

This crash was introduced with the FindGlyphsByHash function
in 516b96387b. Before that revision,
ResizeGlyphSet was always called before FindGlyphRef, which would
re-create globalGlyphs(depthN) if necessary.

X.Org Bug 20718 <http://bugs.freedesktop.org/show_bug.cgi?id=20718>

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-24 13:02:13 +01:00
Jeremy Huddleston
8311cd5f89 XKB: Fix garbage initialization
XkbEnableDisableControls set extra garbage bits on the xkbControlsNotify
changedControls mask because it was uninitialized on the stack.

Found by clang

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-24 08:07:42 +10:00
Peter Hutterer
0ecfab89d1 xfree86: remove if 1 from the dawn of time.
7+ years for an if 1 should be enough to just admit that there's no other
option.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2010-03-24 08:07:25 +10:00
Peter Hutterer
6389405b56 configure: Always define XINPUT.
This define was removed in e251c9e75a "Remove all traces of #ifdef XINPUT
and the matching bits from the configure.ac". Drivers that support multiple
server versions and still check for ifdef XINPUT now always build without
XINPUT support if they're calling XORG_DRIVER_CHECK_EXT(XINPUT, inputproto).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-24 08:07:25 +10:00
Tomas Carnecky
0c2fde5c8a Fix typos in the swap functions
This should fix bug #3539.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-23 03:52:14 +01:00
Michel Dänzer
3083c5d0c4 Xext: Fix cursor reference counting hazard.
Make sure the reference count of the new cursor is increased before the old
one is decreased, otherwise bad things will happen if they're one and the
same and the reference count is 1 initially. Not sure this can actually happen
here, but better safe than sorry.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-22 10:34:35 -07:00
Keith Packard
b29220dc76 Merge remote branch 'jeremyhu/master' 2010-03-21 23:01:58 -07:00
Yaakov Selkowitz
c3da76643a Cygwin/X: Make X -> XWin symlink during install
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-22 00:48:33 -05:00
Yaakov Selkowitz
abf4e0b7e3 New header for XF86Bigfont server functions
Xext/xf86bigfont.c contains three non-static functions which are called
elsewhere in the server.  This creates a new header containing these
declarations in order to fix several warnings:

xf86bigfont.c:285: warning: no previous prototype for `XF86BigfontFreeFontShm'
dixfonts.c:502: warning: implicit declaration of function `XF86BigfontFreeFontS$
dixfonts.c:502: warning: nested extern declaration of `XF86BigfontFreeFontShm'
log.c:436: warning: implicit declaration of function `XF86BigfontCleanup'
log.c:436: warning: nested extern declaration of `XF86BigfontCleanup'

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22 00:48:04 -05:00
Yaakov Selkowitz
57a049ea89 Xext: fix old-style function definitions in xf86bigfont.c
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22 00:47:55 -05:00
Yaakov Selkowitz
822b9f9a3e mi: remove deprecated #include <X11/extensions/xf86bigfstr.h> in miinitext.c
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22 00:47:09 -05:00
Yaakov Selkowitz
946b49ebcb Catch errors in recursive relink targets
If make relink fails in a subdirectory, we need to catch the error
otherwise make will continue iterating the 'for' loop.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-22 00:45:57 -05:00
Yaakov Selkowitz
0820a6e2fb Fix .man.N targets for AM_SILENT_RULES
Add $(AM_V_GEN) for sed-based rules so they appear as expected with
automake silent rules, and $(AM_V_at) to completely hide cp/ln/rm
commands which are not prone to fail.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22 00:45:55 -05:00
Yaakov Selkowitz
9be4157391 Respect value of SED from configure
We now use libtool, which calls AC_PROG_SED and sets SED as the path to
a fully-functional 'sed' (which may also be called 'gsed' if GNU sed is
installed alongside a proprietary version).  Therefore we should respect
the value of SED so we are sure to use the correct one.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22 00:45:54 -05:00
Yaakov Selkowitz
5e00f464c5 Fix relink targets for silent rules
Add $(AM_V_at) to all relink make targets to silence them when automake
silent rules are in use.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22 00:45:52 -05:00
Yaakov Selkowitz
fa7e062962 Use EXEEXT in relink rules for portable DDXs
On Cygwin and MinGW, executables use the .exe suffix.  Autoconf and
automake set EXEEXT on these platforms, and leave it empty on others
where no suffix is used.  $(EXEEXT) must be appended to executable names
in custom rules for portability:

http://www.gnu.org/software/automake/manual/html_node/EXEEXT.html

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22 00:45:51 -05:00