Commit Graph

10135 Commits

Author SHA1 Message Date
James Jones
1c4a0db2c6 Add fence sync driver interface
-Add fence sync objects

-Add fence sync devPrivates

-Add a X sync module screen private

-Add wrappable functions to create and destroy
 fence sync objects

-Give fence sync objects wrappable functions to
 trigger, test, and reset their 'triggered' value.

-Give fence sync objects wrappable functions to
 notify driver when adding/removing triggers to/
 from the sync object.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:15:26 -08:00
James Jones
af0f9f9133 Move some sync code to miext
As a precursor to the fence sync object video driver
and extension API, move some code from Xext to
miext/sync.  Most of this is just code to set up the
build system to include the new directory.  No
functional code is added in this change.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:12:46 -08:00
James Jones
12b65de7db Factor out generic code from ProcSyncAwait()
In preparation for adding more sync object types
that will need Await requests of their own, factor
out some setup and finalization code from
ProcSyncAwait() into SyncAwaitPrologue() and
SyncAwaitEpilogue()

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:11:39 -08:00
James Jones
c66a410d37 Make Await SyncTrigger functions generic
Update all the functions dealing with Await
sync triggers handle generic sync objects
instead of just counters.  This will
facilitate code sharing between the counter
sync waits and the fence sync waits.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:11:34 -08:00
James Jones
99daf419a3 Create SyncObject base type.
SyncObject is now the base type for SyncCounter.
Data to be used by all sync types is stored in
the base object.  SyncCounter can be safely cast
to SyncObject, and a SyncObject can be cast to
the correct type based on SyncObject::type.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:07:06 -08:00
James Jones
27593eea7e Add and use SERVER_SYNC_*_VERSION
Most extensions have a version defined
in the protocol headers, and also in the
server's protocol-versions.h.  The latter
defines which version the server advertises
support for.  Sync wasn't included in
protocol-versions.h, and was advertising
support for whatever was in the protocol
headers the server was built against.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:07:00 -08:00
Peter Hutterer
68a1b0de95 xfree86: use xf86AllocateInput() for xorg.conf devices too.
Single allocation point for input devices, most notably a single point to
reset default values.
Without this patch, the file descriptor default was -1 for hotplugged
devices and 0 for config devices. Drivers that don't overwrite the default
themselves would thus fail if configured in the xorg.conf.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-12-07 11:37:31 +10:00
Peter Hutterer
beea2378f1 xfree86: don't overwrite option list (#32115)
Options set in the configuration file were unconditionally overwritten by
the server. Merge the already existing options and the new options together
instead of just overwriting ones.

Introduced in commit 2199842ed5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Sep 2 10:52:54 2010 +1000

    xfree86: remove extraOptions field from IDevRec.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: David Ronis <ronis@ronispc.chem.mcgill.ca>
2010-12-07 08:09:10 +10:00
Peter Hutterer
8f3fa8fb0b xfree86: add option "Floating", deprecate SendCoreEvents and friends.
Some devices should be initialised as floating from the start (e.g.
Joysticks and accelerometers benefit from this). Currently users use the
"SendCoreEvents" "off" flag for this, which isn't the most appropriate
naming.

Add an option "Floating", deprecate the others. Still parsed and handled by
the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-07 08:08:15 +10:00
Eoghan Sherry
36b614dedf Xi: Fix master button update when slave buttons are mapped. #24887
It is currently assumed that an event button delieved to a master device
corresponds to the slave button states. However, the event button is a
logical (mapped) slave button and slave button states correspond to
physical (unmapped) slave buttons. This leads to incorrect update of the
master button state and incorrect events devlivered to clients. Fix the
situation by taking the slave button map into account when querying a
slave button state.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24887

Signed-off-by: Eoghan Sherry <ejsherry@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-07 08:07:54 +10:00
Peter Hutterer
31ab9f8860 mi: handle DGA subtypes when determining the master device.
The subtype in the DGA event is the core type and all ET_ event types (where
applicable) are identical to the core types. Thus the switch statement below
will work as required and assign the right master device.

Fixes a crasher bug on keyboard devices with valuators. If a device sends a
motion event while grabbed and a DGA client is active (but has not selected
input through DGA), the valuator event is posted through the VCK and
eventually results in a NULL-pointer dereference on dev->valuator.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-07 08:07:54 +10:00
Peter Hutterer
5d31c3e705 dix: don't stop processing valuators when the mode changes.
XI 1.x events still contain absolute coordinates anyway. By the time we get
to the InternalEvent to XI event conversion, the valuators are already
absolute.

Stopping because of a different mode on a valuator is not necessary.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-07 08:07:53 +10:00
Jeremy Huddleston
714b68d9e5 XQuartz: RandR: Fix mode changing for multi-monitor configurations.
This just fixes the regression whereby we couldn't switch between the legacy
fullscreen mode and rootless on multi-monitor configurations.  This was
happening because ref wasn't being set in these cases (since we don't ever
actually change CG modes), so we failed a CFEqual.  Setting the references
fixes this regression and places us one step closer to more mode RandR
mode switching in multi-monitor configurations.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 17:30:53 -08:00
Jeremy Huddleston
14f00449eb XQuartz: Cleanup some compiler warnings
Mark __crashreporter_info__ as __attribute__((__used__))

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 16:46:45 -08:00
Jeremy Huddleston
14aec8b82a XQuartz: Remove one more backing store leftover
See: c4c4676e68

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 16:46:44 -08:00
Jeremy Huddleston
ca431371a2 XQuartz: Disable the Mac OS X screensaver when in full screen mode
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 16:23:04 -08:00
Nicolas Peninguy
311cad3315 Fix Xdmx and Xephyr build when DTrace support is enabled
This fixes the following build errors when DTrace is enabled
(--with-dtrace):

  CCLD   Xdmx
/usr/bin/ld: ../../os/os.O: undefined reference to symbol 'dladdr@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dladdr@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line

  CCLD   Xephyr
../../../os/os.O: In function `TimerForce':
/home/nico/work/xserver/os/WaitFor.c:481: multiple definition of `TimerForce'
../../../os/os.O:/home/nico/work/xserver/os/WaitFor.c:481: first defined here

Signed-off-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-02 16:56:30 -08:00
Keith Packard
3824417335 Merge remote branch 'vsyrjala/xv_reput' 2010-12-02 08:39:33 -08:00
Andrea Canciani
dab064fa5e render: Fix byteswapping of gradient stops
The function swapStops repeatedly swaps the color components as
CARD16, but incorrectly steps over them as if they were CARD32.

This causes half of the stops not to be swapped at all and some
unrelated data be swapped instead.

Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-02 07:38:18 -08:00
Cyril Brulebois
279ef1ffd7 Fix screen number checks.
screenInfo.numScreens is not a valid screen number, they go from 0 to
numScreens - 1.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-01 10:33:57 -08:00
Julien Cristau
8684543021 DGA: fix screen number check
screenInfo.numScreens is not a valid screen number, they go from 0 to
numScreens - 1.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-01 10:33:52 -08:00
Alan Coopersmith
8f42b2b693 Simplify Error() - don't allocate temporary copy of error string
Doesn't seem to be any reason to just not pass the error string
as another argument directly to LogVWrite()

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-30 16:25:22 -08:00
Alan Coopersmith
685286b17d FindModuleInSubdir: Stop allocating one more byte than needed
15ac25627e removed the "/" from the sprintf strings,
but failed to remove the extra byte allocated for the '/'.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-30 16:25:22 -08:00
Alan Coopersmith
40d5a01935 xf86VIDrvMsgVerb: print args, not format string
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-30 16:25:22 -08:00
Alan Coopersmith
4bbc90cd8b xf86AutoConfig: make copyScreen memory allocation & error handling more sane
No point calling the no-fail-alloc if you check for failure and your
only caller checks for failure.

No point calling calloc to zero fill memory you're about to memcpy over.

In the unlikely event of a loss of memory allocation, drop your previous
allocations before returning to others.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-11-30 16:25:22 -08:00
Alan Coopersmith
2c8e534c8e xf86ValidateModes: xnfalloc(strlen) + strcpy => xnfstrdup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-30 16:25:10 -08:00
Alan Coopersmith
29e467a1f1 xf86OutputRename: Replace another strlen/malloc/strcpy set with strdup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-11-30 16:18:35 -08:00
Alan Coopersmith
d346bc3083 Fix compiler warnings in hw/xfree86/os-support/solaris
sun_init.c: In function `xf86OpenConsole':
sun_init.c:99: warning: cast does not match function type
sun_init.c:74: warning: unused variable `FreeVTslot'
sun_init.c: In function `xf86UseMsg':
sun_init.c:417: warning: old-style parameter declaration

sun_vid.c: In function `solUnMapVidMem':
sun_vid.c:162: warning: long unsigned int format, pointer arg (arg 6)
sun_vid.c: In function `xf86ReadBIOS':
sun_vid.c:217: warning: long unsigned int format, pointer arg (arg 5)
sun_vid.c:217: warning: long unsigned int format, int arg (arg 6)

sun_agp.c: In function `xf86EnableAGP':
sun_agp.c:321: warning: unsigned int format, CARD32 arg (arg 4)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-30 16:18:15 -08:00
Alan Coopersmith
d75777d54c Move xchomp inside #ifdef __linux__
static function only called from the matchDriverFromFiles function
that's inside #ifdef __linux__ section

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-11-30 16:17:58 -08:00
Alan Coopersmith
ccbba444b7 config: Remove AC_PROG_CC, SED & INSTALL that XORG_DEFAULT_OPTIONS provide
Most importantly removes AC_PROG_CC call that resets compiler flags back
to C89 mode, breaking use of C99 isfinite() on Solaris in dix/devices.c.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2010-11-30 16:17:31 -08:00
Alan Coopersmith
92cde0b84c Xserver-spec: Update discussion of font library
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:17:27 -08:00
Alan Coopersmith
c1e7692500 Xserver-spec: Update location of log functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:17:16 -08:00
Alan Coopersmith
deae18f3ca Xserver-spec: Fix assorted typos
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:17:12 -08:00
Alan Coopersmith
a410bf5379 Xserver-spec: Update lists of macros
LOOKUP_DRAWABLE & VERIFY_GC are no longer in dix.h, but
WriteReplyToClient & WriteSwappedDataToClient are.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:17:08 -08:00
Alan Coopersmith
de518c8f37 Xserver-spec: Remove CreateCallbackList
The function is defined as a static, so can't be called by anyone
but AddCallback.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:17:03 -08:00
Alan Coopersmith
f6c880b257 Xserver-spec: Replace deprecated resource id lookup functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:16:57 -08:00
Alan Coopersmith
922806a5aa Xserver-spec: Update Memory Management functions
Xalloc, Xrealloc, & Xfree are deprecated now
ALLOCATE_LOCAL is removed due to stack overflow issues

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:16:14 -08:00
Keith Packard
02449ee24b Merge remote branch 'ajax/for-keithp' 2010-11-30 13:30:59 -08:00
Keith Packard
afd6eb66d5 Merge remote branch 'aplattner/for/keith' 2010-11-30 13:28:13 -08:00
Ferry Huberts
b16964910d dix: do not use bit-wise operators on the boolean result of BitIsOn
Performing bit-wise operations on a boolean amounts to mixing types,
is confusing and basically incorrect; one should only perform
logical operations on booleans.

Performing such operations relies on the implementation detail
that a boolean is in fact an integer and that its value FALSE
is implemented as zero.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-30 13:25:47 -08:00
Adam Jackson
5f34853d6f xfree86: Bump classic driver default to 1024x768
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-30 13:24:23 -08:00
Alan Coopersmith
903e0f6f0f Xserver-spec: Delete DBE Idioms section
The code has been gone for a while

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-30 13:17:24 -08:00
Alan Coopersmith
f4ba75a494 Remove unused ReqLen & CastxReq macros
According to Xserver-spec, they were part of the now-deleted DBE "Idioms"
code.   The last callers of them were removed in commits fe616f9230 &
3d64290547.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-30 13:16:35 -08:00
Adam Jackson
b85f9063c2 xfree86: Remove the xf8_16bpp overlay module
Only one (marginal) driver was using it, and it's been fixed to just
implement it directly.

v2: Also fix sdksyms.sh (spotted by Jesse Adkins)
v3: Also fix DESIGN.xml (spotted bu Julien Cristau)

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 14:26:58 -05:00
Adam Jackson
a861fe6a1c vbe: Refuse to believe tiny (or negative) panel sizes from PanelID
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:50:42 -05:00
David Reveman
84a14fab8f composite: add panoramix support
Taken from:
50d2d8c896
dbffd0d44a
9b5b102163
75f9b98af3
07fba8b1f7

With minor style fixes, ported to dixLookupResourceByType, and ported
away from client->noClientException and xalloc/xfree.

v2: Fix a memory leak in PanoramiXCompositeNameWindowPixmap, spotted by
James Jones.
v3: Fix a buglet in PanoramiXCompositeUnredirectSubwindows, spotted by
Dave Airlie.
v4: Fix a style issue with resource lookup noted by Jamey Sharp.

Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:47:42 -05:00
David Reveman
6dea617e0f fixes: Add panoramix support
Taken from:
583f4dde81

With minor style fixes and ported to dixLookupResourceByType.

Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:47:41 -05:00
Adam Jackson
1b3c57f075 xfree86: Remove unused xf86PixmapKeyRec
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:46:09 -05:00
Adam Jackson
63b9d67d7f mi: Remove unused miAllocateGCPrivateIndex
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:46:09 -05:00
Adam Jackson
87f5b843a0 render: Reshuffle and cull dead field from GlyphSetRec
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:46:09 -05:00