summaryrefslogtreecommitdiff
path: root/miext
AgeCommit message (Collapse)AuthorFilesLines
2018-04-02meson: Distribute more SDK headersThierry Reding3-0/+22
Install missing headers to the SDK directory to allow external modules to properly build against the SDK. After this commit, the list of files installed in the SDK include directory is the same as the list of files installed by the autotools-based build. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-09-20sync: Clean up a bit of header formatting.Eric Anholt1-8/+5
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-09-20sync: Convert from "CARD64" to int64_t.Eric Anholt2-10/+6
The extension was using the name CARD64 to represent 64-bit values, with a #define from CARD64 to XSyncValue, a struct with a pair of 32-bit values representing a signed 64-bit value. This interfered with protocol headers using CARD64 to try to actually store a uint64_t. Now that stdint.h exists, let's just use that here, instead. v2: Fix alarm delta changes. v3: Do the potentially overflowing math as uint and convert to int afterward, out of C spec paranoia. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-04-26Add a Meson build system alongside autotools.Eric Anholt3-0/+58
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest, and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but hasn't been built yet. The unit tests are also not done. The intent is to build this as a complete replacement for the autotools system, then eventually replace autotools. meson is faster to generate the build, faster to run the bulid, shorter to write the build files in, and less error-prone than autotools. v2: Fix indentation nits, move version declaration to project(), use existing meson_options for version-config.h's vendor name/web. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-21dix: Remove PRIVATE_DAMAGEAdam Jackson2-3/+2
None of this is actually wired up to anything, so we can also remove the devPrivates from the DamageRec. The DamageExtRec is what would need devPrivates for selinux labeling, in principle. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-02-08damage: Validate source pictures bound to windows before unwrappingMichel Dänzer1-0/+10
The lower layers also do this, but no damage may be reported there, since we unwrap before calling down. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99220 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-12-13Revert "damage: Make damageRegionProcessPending take a damage not a drawable"Adam Jackson1-61/+60
The commit message makes the assertion that the code below damage is not allowed to change whether there's a damage monitor for the drawable. That turns out not to be the case! exa's mixed code, at least, will create and destroy a damage in PrepareAccess. The destroy path can then be catastrophic, as damageRegionProcessPending will attempt to RegionEmpty memory from the middle of a freed block. I'd wanted that invariant for performance, but faster isn't worth broken, so revert it. I think what exa's doing is reasonable, so the better way to improve performance for the unmonitored case is to either revisit dynamically wrapping into the GC, or inline damage into dix. This reverts commit 4e124203f2260daaf54155f4a05fe469733e0b97. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1389886 Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-12-12shadow: Remove unused shadowAllocAdam Jackson3-52/+0
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2016-12-12shadow: Macro cleanupAdam Jackson13-19/+15
shadowDamage is just obfuscation. The other two macros won't work outside shadow.c since the private key is in fact static there (meaning the extern decl is a lie). Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2016-12-12shadow: Remove indirection stubsAdam Jackson4-29/+0
These are no longer used in the drivers. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2016-12-12shadow: Lift 32->24 conversion from modesetting to dixAdam Jackson3-0/+142
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2016-07-18Remove fd_set from Block/Wakeup handler APIKeith Packard1-2/+2
This removes the last uses of fd_set from the server interfaces outside of the OS layer itself. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18Remove readmask from screen block/wakeup handlerKeith Packard1-2/+2
With no users of the interface needing the readmask anymore, we can remove it from the argument passed to these functions. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18dix: Switch to the libXfont2 API (v2)Keith Packard1-2/+2
This new libXfont API eliminates exposing internal X server symbols to the font library, replacing those with a struct full of the entire API needed to use that library. v2: Use libXfont2 instead of libXfont_2 Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-06-20dix: Call screen block/wakeup handlers closest to blocking [v3]Keith Packard2-13/+8
The screen block and wakeup handlers are the only ones which provide a well known ordering between the wrapping layers; placing these as close as possible to the server blocking provides a way for the driver to control the flow of execution correctly. Switch the shadow code to run in the screen block handler so that it now occurrs just before the server goes to sleep. Switch glamor to call down to the driver after it has executed its own block handler piece, in case the driver needs to perform additional flushing work after glamor has called glFlush. These changes ensure that the following modules update the screen in the correct order: animated cursors (uses RegisterBlockAndWakeupHandlers dynamically) composite (dynamic wrapping) misprite (dynamic wrapping) shadow (static wrapping) glamor (static wrapping) driver (static wrapping) It looks like there's still a bit of confusion between composite and misprite; if composite updates after misprite, then it's possible you'd exit the block handler chain with the cursor left hidden. To fix that, misprite should be wrapping during ScreenInit time and not unwrapping. And composite might as well join in that fun, just to make things consistent. [v2] Unwrap BlockHandler in shadowCloseScreen (ajax) [v3] ephyr: Use screen block handler for flushing changes ephyr needs to make sure it calls glXSwapBuffers after glamor finishes its rendering. As the screen block handler is now called last, we have to use that instead of a registered block/wakeup handler to make sure the GL rendering is done before we copy it to the front buffer. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-05-18damage: Make damageRegionProcessPending take a damage not a drawableAdam Jackson1-60/+61
In the case where there's no damage monitor on the drawable, we look that fact up twice: once before rendering to decide whether to compute damage, and again after to decide whether to append it. This is wasted effort, as the layer below us is effectively not allowed to change whether there's a damage monitor for the drawable, but there's no way the compiler can know that. Instead, look it up once up front, and change the check macros and damageRegionProcessPending to take a damage not a drawable. v2: Explicitly pass pDamage to the macros as well (Michel Dänzer) Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-09-21rootless: Fix bogus handling of broken root clipAdam Jackson1-1/+1
gcc quite correctly complains about this: In file included from ../../include/scrnintstr.h:51:0, from rootlessValTree.c:98: In function 'RegionUninit.isra.1', inlined from 'RegionEmpty' at ../../include/regionstr.h:194:5, inlined from 'RootlessMiValidateTree' at rootlessValTree.c:490:9: ../../include/regionstr.h:166:9: warning: attempt to free a non-heap object 'RegionBrokenData' [-Wfree-nonheap-object] free((_pReg)->data); So that'd crash if you ever got there. RegionNull will do almost the same thing only without the free(), so let's do that instead; it might still not be an entirely sane way to recover, but it at least won't crash. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-08-17rootless: rename w->_w to avoid shadow warningsDave Airlie1-9/+9
fixes: In file included from rootlessWindow.c:51:0: rootlessWindow.c: In function 'RootlessResizeWindow': rootlessCommon.h:198:19: warning: declaration of 'w' shadows a parameter [-Wshadow] WindowPtr w = pWin; \ ^ rootlessWindow.c:1292:9: note: in expansion of macro 'HUGE_ROOT' HUGE_ROOT(pWin); ^ rootlessWindow.c:1262:35: note: shadowed declaration is here unsigned int w, unsigned int h, WindowPtr pSib) ^ In file included from rootlessWindow.c:51:0: rootlessCommon.h:207:19: warning: declaration of 'w' shadows a parameter [-Wshadow] WindowPtr w = pWin; \ ^ rootlessWindow.c:1296:9: note: in expansion of macro 'NORMAL_ROOT' NORMAL_ROOT(pWin); ^ rootlessWindow.c:1262:35: note: shadowed declaration is here unsigned int w, unsigned int h, WindowPtr pSib) ^ Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-17rootless: fix warnings due to lack of const keeping.Dave Airlie2-3/+3
Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-07-08dix: Restore PaintWindow screen hookAdam Jackson4-2/+26
Removes the last cpp conditional on ROOTLESS from dix code. Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08rootless: Build unconditionallyAdam Jackson1-8/+1
It's not a lot of code, and if you're doing things to the core that affect rootless you should be alerted early. Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08rootless: Genericize the config header a bitAdam Jackson1-15/+4
ROOTLESS_RESIZE_GRAVITY is an optimization, so let's default it to off unless the backing window system is known to support it. ROOTLESS_PROTECT_ALPHA looks like it has different values for xquartz and win32, but hilariously rootlessGC.c merely checks if it is defined, not what the value is. It's effectively the more conservative path anyway, so let's just turn it on. Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08dix: unifdef pWin->rootlessUnhittableAdam Jackson1-4/+4
No reason to vary the dix ABI over this. Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08dix: Unexport various implementation detailsAdam Jackson1-0/+1
Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-04-21Convert mi & miext to new *allocarray functionsAlan Coopersmith3-4/+4
v2: remove now useless parentheses Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-11-12Drop trailing whitespacesPeter Hutterer7-25/+25
sed -i "s/[ ]\+$//g" **/*.(c|h) happy reviewing... git diff -w is an empty diff. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-10-08rootless: remove redundant RootlessShapedWindowInAdam Jackson1-62/+3
miShapedWindowIn is identical. Which you would expect, since neither one takes an actual WindowPtr argument, so they couldn't possibly make reference to rootlessness. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29miext/shadow: Remove shadowInitAdam Jackson2-24/+0
This code is nonsensical. You end up creating a screen-sized pixmap that's totally detached from everything else, which you then listen for damage on, which means you'll never hear any damage, which means your shadow update hooks will never get called. Any driver using this would be sorely disappointed. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29miext/shadow: Remove ancient backwards-compatibility hackAdam Jackson2-36/+0
Here's a trip down memory lane. Back when we merged kdrive we adopted kdrive's version of shadow, which used damage directly instead of hand-rolling it. However a couple of Xorg drivers referred to the accumulated damage region in the shadow private directly, so I added a hack to copy the damage region around. That was 9148d8700b7c5afc2644e5820c57c509378f93ce, back in early 2006. Eight years is unusually patient for me. The neomagic and trident drivers were still relying on this, but they've been modified to ask the damage code for the region instead. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-03-17sync: Add a header include necessary to use misyncstr.hEric Anholt1-0/+1
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-01-12Replace 'pointer' type with 'void *'Keith Packard6-20/+20
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12damage: Clean up warningsKeith Packard2-4/+3
GC funcs and ops are const now, so all wrappers need to declare them as such. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-12-02miext/sync: Handle libxshmfence API changeKeith Packard1-1/+1
libxshmfence had an unfortunate 'int32_t' type for the mapped fence. That changed to exposing a 'struct shmfence' instead, which is nice and opaque and offers fine type checking across the API. This patch requires the newer version of the library and uses the new interface type. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-12-02miext: Move SyncShm FDs out of the way of clientsKeith Packard1-0/+3
Applications may end up allocating a bunch of shmfence objects, each of which uses a file descriptor, which must be kept open lest some other client ask for a copy of it later on. Lacking an API that can turn a memory mapping back into a file descriptor, about the best we can do is push the file descriptors out of the way of other X clients so that we don't run out of the ability to accept new connections. This uses fcntl F_GETFD to push the FD up above MAXCLIENTS. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-11-23miext: Ensure xshmfence is only called when driver supports itKeith Packard6-10/+162
This provides a place for drivers to insert their own FD-based SyncFence implementations, and prevents applications from using DRI3 SyncFence creation functions unless the driver has some support for them. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Fredrik Höglund <fredrik@kde.org>
2013-11-04Disable DRI3 and sync fence FD functions if xshmfence isn't availableKeith Packard1-1/+6
Make sure the server can build when the xshmfence library isn't present Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31miext/damage: Partial revert of "Only wrap into the GC ops chain if there's ↵Jeremy Huddleston Sequoia1-4/+1
a listener (v3)" Fixes regression from: 4dc2a76740d921c824a4d8193f39dd373475f02a http://lists.x.org/archives/xorg-devel/2013-May/036241.html https://trac.macports.org/ticket/38993 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31dri3: Add DRI3 extensionKeith Packard6-22/+250
Adds DRM compatible fences using futexes. Uses FD passing to get pixmaps from DRM applications. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31misync: Don't smash custom screen sync functionsKeith Packard1-1/+1
There was a check to avoid smashing custom functions, but the sense was backwards causing it to always smash them, and also not set them otherwise. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-06rootless: Use miCopyRegion instead of fbCopyRegionJeremy Huddleston Sequoia1-3/+3
Fixes regression introduced by e657635dbe6b92875b0e88370557c2cbab673a49 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-10-04miext/shadow: missing c2p_core.h breaks "make distcheck" target.Gaetan Nadon1-0/+1
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-09-10damage: Remove "post-rendering" hooksAdam Jackson3-102/+2
This is a revert of 974db58f5b730c3770ee461665a02dd4334d1dea. There are no consumers of this API, we must not need it. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10damage: Don't rewrite Text ops to GlyphBlt opsAdam Jackson1-42/+19
There's no particularly good reason to, and it breaks Xnest. Bugzilla: http://bugs.freedesktop.org/2454 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10damage: Simplify DamageUnregisterAdam Jackson3-4/+5
You can only register one drawable on a given damage, so there's no reason to require the caller to specify the drawable, the damage is enough. The implementation would do something fairly horrible if you _did_ pass mismatched drawable and damage, so let's avoid the problem entirely. v2: Simplify xf86RotateDestroy even more [anholt] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10damage: Implicitly unregister on destroyAdam Jackson1-1/+3
There's no reason not to, and it simplifies quite a few callers. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10miext/sync: Fix multi-screen support in SyncFence initializationKeith Packard1-10/+11
miSyncSetup was checking to see if the screen private key had been registered, and if so, skipping the setup of the provided screen. Instead, it should register the private index only once, but then initialize the screen unless it has already been initialized. This latter step allows drivers to initialize the sync private structures before the Sync extension itself is initialized. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-08-06Replace INCLUDES with AM_CPPFLAGSPeter Hutterer2-2/+2
newer automake gets quite noisy about this. hw/xfree86/ddc/Makefile.am:7: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') and many more of these. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-14Shadow: Switch the Amiga/Atari bitplane code to the canonical X.Org licenseGeert Uytterhoeven5-90/+91
Also add my name to the list of authors in COPYING Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-04-25shadow: Define c2p_unsupportedKeith Packard1-1/+3
Just make this call BUG_WARN(1) to indicate that something unexpected happened Signed-off-by: Keith Packard <keithp@keithp.com>
2013-04-18Shadow: Add support for Amiga afb8Geert Uytterhoeven3-0/+147
Add support for Amiga-style bitplanes, with 8 bits per pixel. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Keith Packard <keithp@keithp.com>