Age | Commit message (Collapse) | Author | Files | Lines |
|
Also, fix whitespace, mainly around
swaps(&rep.sequenceNumber)
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
Various cleanups identified during review of the
X Sync Fence Object patches.
-Correctly handle failure of AddResource()
-Don't assert when data structures are corrupt. Instead,
use a new helper function to check for counter sync
objects when they're expected, and warn if the type is
wrong.
-Use the default switch label rather than reimplementing
it.
-Re-introduce cast of result of dixAllocateObjectWithPrivate()
to kill an incompatible pointer type warning.
-Remove comments claiming protocol updates are needed. One
wasn't true and the other was addressed with a xextproto
change.
-Return BadFence, not BadCounter from XSyncAwaitFence()
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Ensure that if we're called exactly on the threshold of a
NegativeTransition trigger that we reshedule to pick up
an idle time over the threshold.
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
The {Positive,Negative}Transition triggers only fire when the counter
goes from strictly {below,above} the threshold. If
SyncComputeBracketValues gets called exactly at this threshold we may update
the bracket values so that the counter is not updated past the threshold.
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
And often is, especially when called from ProcSyncCreateAlarm.
Crashing in this case seems unwise.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Add the new protocol handlers for XSync 3.1 to the
dispatch tables and report support for Sync protocol
version 3.1.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
-Add the actual ProcSyncAwaitFence() dispatch func
-Add support for fence sync triggers.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Initial server side implementation of fence sync
objects. Allows creation, management, and state
queries of binary state objects. Currently they
are not very useful as there is no way to wait for
them efficiently.
The basic trigger operation added here triggers
relative to a given X screen's rendering operations.
To perform this operation, fence sync objects must
be tied to a screen. As Aaron Plattner pointed out,
screens are identified but a drawable in X protocol,
so a drawable argument is included in
XSyncCreateFence(). The screen also could have been
specified as part of the trigger operation. However,
it is also desireable to associate a screen with
fence sync objects at creation time so that the
associated screen's driver can allocate any HW-
specific resources needed by the fence object up
front.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
-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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Some functions had to be moved around due some missing static definitions.
Another minor clean up like inexistent function declarations and etc were made
also.
Part of this patch was cooked using:
sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files`
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
|
|
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
TryClientEvents already did this; this commit just moves the assignment
one level down so that no event source has to worry about sequence
numbers.
...No event source, that is, except XKB, which inexplicably calls
WriteToClient directly for several events.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
This matches the test in TryClientEvents, and is a superset of tests
done by the callers of these functions. The consequence of forgetting
these tests is a server crash, so they're always desirable. In my
opinion, it's better to not require the callers to remember to do these
checks.
For callers that don't do very much work before calling WriteToClient or
WriteEventsToClient, I've removed the redundant checks.
hw/xquartz/xpr/appledri.c has an interesting case: While its check for
"client == NULL" appears redundant with the test in WriteEventsToClient,
it dereferences client to get the sequence number.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Just let Dispatch() check for a noClientException, rather than making
every single dispatch procedure take care of it.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.
X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Currently, SyncComputeBracketValues reuses old values of bracket_greater
and bracket_less when startOver = FALSE. This can result in incorrect bracket
values. To fix this issue, the startOver parameter is removed, and we do not
reuse old values of bracket_greater and bracket_less.
X.Org Bug 27023 <http://bugs.freedesktop.org/show_bug.cgi?id=27023>
Signed-off-by: David James <davidjames@google.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
The rationale behind is because no sane application will use this when we have
modern APIs such DRI2. Besides, as a fact, xfree86 server has already
deprecated this extension in 1998:
http://www.xfree86.org/3.3.6/isc7.html
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Convert all calls of CreateNewResourceType to pass name argument
Breaks DIX ABI.
ABI versions bumped:
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Calls RegisterResourceName to record the type name for
use by X-Resource, XACE/SELinux/XTsol, and DTrace.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Make sure to check return value before setting bitmask flags.
For most calls, just fails to init the extension. Since Xinput
already calls FatalError() on initialization failure, so does
failure to allocate Xinput's resource type.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
If the counter had a value higher than the trigger value for a negative
transition, the trigger value did not get set.
The correct sequence of checks is:
if (positive transition)
if (counter value < trigger value)
set up trigger
if (negative transition)
if (counter value > trigger value)
set up trigger
Red Hat Bug 501601 <https://bugzilla.redhat.com/show_bug.cgi?id=501601>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Introduced with 57aff88c7d0761e590806d07bee1c9410680c89f.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
xextproto had Xlib client headers moved into libXext.
Protocol header files are named fooproto.h, header files with constants
foo.h or fooconst.h where foo.h was already in use for client-side headers.
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
|
|
dixLookupResource attempted to automatically detect whether the caller
wanted a lookup by-type or by-class, unfortunately, it guessed wrong for
RT_NONE. Instead of trying to make the guess better, this patch just reverts
the unification and creates separate functions for each operation.
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
We've had void * for twenty years now people let's try to act like we
know how it works.
|
|
|
|
|
|
A grep on xorg/* revealed there's no consumer of this define.
Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.
Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
|
|
argh protocol header disaster
|
|
Wakeup scheduling only considered the threshold values, and not whether
the trigger was edge or level.
See also:
https://bugzilla.redhat.com/show_bug.cgi?id=474586
http://svn.gnome.org/viewvc/gnome-screensaver/trunk/src/test-idle-ext.c?view=markup
|
|
|
|
|
|
|
|
|
|
Conflicts:
XTrap/xtrapddmi.c
Xext/security.c
Xext/xprint.c
Xext/xtest.c
Xext/xvdisp.c
Xi/exevents.c
Xi/grabdevb.c
Xi/grabdevk.c
Xi/opendev.c
Xi/ungrdev.c
Xi/ungrdevb.c
Xi/ungrdevk.c
dix/cursor.c
dix/devices.c
dix/dixutils.c
dix/events.c
dix/getevents.c
dix/main.c
dix/window.c
hw/xfree86/ramdac/xf86Cursor.c
include/dix.h
include/input.h
include/inputstr.h
mi/midispcur.c
mi/miinitext.c
mi/misprite.c
render/animcur.c
xfixes/cursor.c
xkb/xkbAccessX.c
|
|
|
|
This reverts commit 9f597f6c87e0b14cc382d8e5929e42f822db4329.
Moving all the names into dix/registry.c
|
|
Conflicts:
dix/dispatch.c
dix/property.c
hw/xfree86/common/xf86VidMode.c
include/xkbsrv.h
render/glyph.c
xkb/xkbActions.c
|
|
Replace with heap allocations.
|
|
|