summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-10-29fb: Revert fb changes that broke XQuartzserver-1.17-appleJeremy Huddleston Sequoia4-162/+2
http://bugs.freedesktop.org/show_bug.cgi?id=26124 Revert "Use new pixman_glyph_cache_t API that will be in pixman 0.28.0" Revert "fb: Fix origin of source picture in fbGlyphs" Revert "fb: Publish fbGlyphs and fbUnrealizeGlyph" This reverts commit 9cbcb5bd6a5360a128d15b77a02d8d3351f74366. This reverts commit 983e30361f49a67252d0b5d82630e70724d69dbf. This reverts commit 3c2c59eed3c68c0e5a93c38cf01eedad015e3157.
2015-10-29fb: Revert fb changes that broke XQuartzJeremy Huddleston3-85/+43
http://bugs.freedesktop.org/show_bug.cgi?id=26124 Revert "Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5." Revert "fb: Adjust transform or composite coordinates for pixman operations" http://bugs.freedesktop.org/26124 This reverts commit a72c65e9176c51de95db2fdbf4c5d946a4911695. This reverts commit a6bd5d2e482a5aa84acb3d4932e2a166d8670ef1. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2015-10-29Use old miTrapezoids and miTriangles routinesJeremy Huddleston Sequoia5-4/+201
Reverts commits: 788ccb9a8bcf6a4fb4054c507111eec3338fb969 566f1931ee2916269e164e114bffaf2da1d039d1 http://xquartz.macosforge.org/trac/ticket/525 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-10-29sdksyms.sh: Use CPPFLAGS, not CFLAGSJeremy Huddleston1-3/+2
CFLAGS can include flags which are not useful to the preprocessor or can even cause it to fail. This fixes a build issue on darwin when building for more than one architecture. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-10-29xfree86: Use same inb/outb asm code for i386 amd64 and ia64server-1.17-branchAdam Jackson1-48/+1
This matches the GCCUSESGAS path from the old monolith build (where that macro was actually set), and fixes the build on modern OSX. Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 47b00fa4bf3b67736957296492310f7fdd6c0a25)
2015-10-28xserver 1.17.4Adam Jackson1-3/+3
2015-10-27os: make sure the clientsWritable fd_set is initialized before useMartin Peres1-0/+1
In WaitForSomething(), the fd_set clientsWritable may be used unitialized when the boolean AnyClientsWriteBlocked is set in the WakeupHandler(). This leads to a crash in FlushAllOutput() after x11proto's commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7. The problem did not manifest before because both the XFD_SIZE and the maximum number of clients were set to 256. As the connectionTranslation table was initalized for the 256 clients to 0, the test on the index not being 0 was aborting before dereferencing the client #0. As of commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7 in x11proto, the XFD_SIZE got bumped to 512. This lead the OutputPending fd_set to have any fd above 256 to be uninitialized which in turns lead to reading an index after the end of the ConnectionTranslation table. This index would then be used to find the client corresponding to the fd marked as pending writes and would also result to an out-of-bound access which would usually be the fatal one. Fix this by zeroing the clientsWritable fd_set at the beginning of WaitForSomething(). In this case, the bottom part of the loop, which would indirectly call FlushAllOutput, will not do any work but the next call to select will result in the execution of the right codepath. This is exactly what we want because we need to know the writable clients before handling them. In the end, it also makes sure that the fds above MaxClient are initialized, preventing the crash in FlushAllOutput(). Thanks to everyone involved in tracking this one down! Reported-by: Karol Herbst <freedesktop@karolherbst.de> Reported-by: Tobias Klausmann <tobias.klausmann@mni.thm.de> Signed-off-by: Martin Peres <martin.peres@linux.intel.com> Tested-by: Tobias Klausmann <tobias.klausmann@mni.thm.de> Tested-by: Martin Peres <martin.peres@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91316 Cc: Ilia Mirkin <imirkin@alum.mit.edu> Cc: Olivier Fourdan <ofourdan@redhat.com Cc: Adam Jackson <ajax@redhat.com> Cc: Alan Coopersmith <alan.coopersmith@oracle.com Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-10-27Xext: fix build with --disable-xaceJulien Cristau1-0/+2
Regression from 990cf5b2828f73dc7a07f1e38f608af39acfd81d Signed-off-by: Julien Cristau <jcristau@debian.org> Cc: Andrew Eikum <aeikum@codeweavers.com> Cc: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> (cherry picked from commit 524844c8c18e226aad30feb371b19ef491d83449)
2015-10-27DRI2: Sync radeonsi_pci_ids.h from MesaMichel Dänzer1-0/+28
Fixes DRI2 client driver name mapping for newer AMD GPUs with the modesetting driver, allowing the DRI2 extension to initialize. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit ac2f27f1a9fa8cd88c5dbe7ec0f96238eecf2c3e)
2015-10-26xserver 1.17.3xorg-server-1.17.3Adam Jackson1-3/+3
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-10-26present: Fix missed notify MSC computationChris Wilson1-1/+1
Only treat divisor==0 as async to immediately report the actual vblank. If the user species a non-zero divisor, we should compute the missed vblank properly or else we report too early. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com> (cherry picked from commit 413cb2ff1d754b5f19d77ff19cddf40793989c03)
2015-10-26linux: Do not call FatalError from xf86CloseConsoleHans de Goede1-7/+15
FatalError ends up calling xf86CloseConsole itself, so calling FatalError from within xf86CloseConsole is not a good idea. Make switch_to log errors using xf86Msg(X_WARNING, ...) and return success (or failure). This makes switch_to match the other error checking done in xf86CloseConsole which all logs warnings and continues. Add checking of the return value in xf86OpenConsole and call FatalError there when switch_to fails, to preserve the error-handling behavior of xf86OpenConsole. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1269210 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit 2092f12a243b9f7682f542b593b77c96d455ec89)
2015-10-26fonts: Continue when font calls return Suspended more than onceKeith Packard1-21/+0
Patch 3ab6cd31cbdf8095b2948034fce5fb645422d8da fixed Xinerama interactions with font servers by not putting clients to sleep multiple times. However, it introduced additional changes dealing with libXfont routine returning Suspended more than once for the same request. This additional change was to abandon processing of the current request and free the closure data by jumping to 'xinerama_sleep' in each of the functions. Font library functions shouldn't return Suspended more than once, except for ListFontsWithInfo, which produces multiple replies, and thus ends up returning Suspended many times during processing. With the jump to xinerama_sleep occurring after the first reply was processed, the closure for the request was freed and future calls into the ListFontsWithInfo callback resulted in dereferencing freed memory. This patch removes the added branches, reverting the code to its previous behaviour, which permitted multiple Suspended returns and simply waited for the client to be signaled again so that the callback could continue processing the request. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit f9a04d19aef77bf787b8d322305a6971d24a6ba1)
2015-10-26glx: Fix header length error checking in __glXDisp_RenderLargeJeremy Huddleston1-1/+1
glxcmds.c:2206:46: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare,Semantic Issue] if ((cmdlen = safe_pad(hdr->length)) < 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit e09875701b980b8c4578fb310a922c9934c34eef)
2015-10-26xdmcp: Declare XdmcpFatal _X_NORETURNJeremy Huddleston1-0/+1
xdmcp.c:1404:1: warning: function 'XdmcpFatal' could be declared with attribute 'noreturn' [-Wmissing-noreturn,Semantic Issue] Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 9a2a05a9a7ba02921fa29844c4cad41243c41326)
2015-10-26xdmauth: Correct miscall of abs() to instrad call labs()Jeremy Huddleston1-2/+2
xdmauth.c:230:13: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value,Semantic Issue] if (abs(now - client->time) > TwentyFiveMinutes) { ^ xdmauth.c:230:13: note: use function 'labs' instead [Semantic Issue] if (abs(now - client->time) > TwentyFiveMinutes) { ^~~ labs xdmauth.c:302:9: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value,Semantic Issue] if (abs(client->time - now) > TwentyMinutes) { ^ xdmauth.c:302:9: note: use function 'labs' instead [Semantic Issue] if (abs(client->time - now) > TwentyMinutes) { ^~~ labs Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 85eb90ea45e89033b97bf71a13c5c70fec8f6871)
2015-10-26randr: Correct a miscall of abs() to instead call fabs()Jeremy Huddleston1-1/+1
rrtransform.c:124:22: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value,Semantic Issue] if ((v = abs(f_transform->m[j][i])) > max) ^ rrtransform.c:124:22: note: use function 'fabs' instead [Semantic Issue] if ((v = abs(f_transform->m[j][i])) > max) ^~~ fabs Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 9f0fcd14b52f8481cbb3b3b9c6e06f64ff003cc8)
2015-10-26mi: Correct a miscall of abs() to instead call fabs()Jeremy Huddleston1-1/+1
miarc.c:1714:9: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value,Semantic Issue] if (abs(parc->angle2) >= 360.0) ^ miarc.c:1714:9: note: use function 'fabs' instead [Semantic Issue] if (abs(parc->angle2) >= 360.0) ^~~ fabs Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 610dd8a58a75bb6a5b7d7abbae476d1cc4be519e)
2015-10-26render: Propagate allocation failure from createSourcePicture()Chris Wilson1-1/+5
All the callers were already checking for failure, except that createSourcePicture() itself was failing to check whether it successfully allocated the Picture. [ajax: Rebase, fix line wrap of preceding line] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 211d4c2d353b5e379716484055a3f58235ea65f4)
2015-10-26Fix alphamap interactions with wfbArcady Goldmints-Orlov1-2/+11
Set a destructor function on pixman images and call fbFinishAccess() from there, rather than directly from free_pixman_pict(). This ensures that fbFinishAccess() gets called even if pixman still has a reference to the image after free_pixman_pict(), as is the case for alphamaps. [ajax: Squash an unused variable warning in the non-wfb build] Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Arcady Goldmints-Orlov <arcadyg@nvidia.com> Reviewed-by: Søren Sandmann <ssp@redhat.com> (cherry picked from commit fbac451724f7e1b8ce6b6e0505cc33ccd41c5158)
2015-10-26dri2: better checks for integer overflow in GetBuffers*Alan Coopersmith1-3/+11
Check for integer overflow before using stuff->count in a multiplication, to avoid compiler optimizing out due to undefined behaviour, but only after we've checked to make sure stuff->count is in the range of the request we're parsing. Reported-by: jes@posteo.de Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 6ca496b7c3ccfd677c8c1bee88cc509a5e3c9e04)
2015-10-26Xext/xselinux: Warning fixesKeith Packard1-2/+6
There's a 'const char *' adventure here that I'm mostly ignoring; some client information gets const poisoned. Worked around by adding a couple of casts. Ick. Added an _X_ATTRIBUTE_PRINTF to SELinuxLog. Ignore a couple of unused return values. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 9af111fe045d82192bacc722940e1d92a8ba4cbd)
2015-10-26x86emu: Fix some set-but-not-used warnings.Eric Anholt1-5/+1
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net> (cherry picked from commit e6f8a0340b72113474ccfbf1ea447558b705995a)
2015-10-26render: Fix leak of filter paramsChris Wilson1-0/+1
==11097== 2,048 (+1,640) bytes in 32 (+26) blocks are definitely lost in loss record 1,570 of 1,719 ==11097== at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==11097== by 0x225EF3: SetPicturePictFilter (filter.c:339) ==11097== by 0x22DF4F: ProcRenderSetPictureFilter (render.c:1773) ==11097== by 0x15D25D: Dispatch (dispatch.c:432) ==11097== by 0x14C7B9: main (main.c:298) [ajax: Fixed whitespace] Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit c7f84c880bbbb508016ad80390a11961b1c4214d)
2015-10-26xfree86: Fix the 1792x1344-75 EST III modeVille Syrjälä1-1/+1
The correct refresh rate for this mode is 75, not 85. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (cherry picked from commit 98e170971c6b06d64a5bc7418bf6ae6ae985a3ae)
2015-10-26randr: Allow RRSelectInput for ProviderChange and ResourceChange eventsMichal Srb1-1/+3
[ajax: To be clear, we already have code to emit these events, and it looks like it works, but to get them you'd have had to also ask for one of the other notify types. This makes it possible to listen for e.g. ProviderChange alone.] Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Michal Srb <msrb@suse.com> (cherry picked from commit 91c7acfc3447a0073dd1db260cf05115d94ce7e8)
2015-10-26exa: initialise mask_off_x and mask_off_yDave Airlie1-1/+1
These get used at the end of the function in a calculation, even though the result isn't used its not pretty. Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 4c7cefe24001279a558dd875949d40ede49ef702)
2015-10-26render: Allow single-stop gradientsAndrea Canciani1-3/+3
The Render specification allows single-stop gradients and pixman 0.22 (X server requires >= 0.27.2 now) can rasterize them correctly. [ajax: update commit message] Signed-off-by: Andrea Canciani <ranma42@gmail.com> Reviewed-by: Soren Sandmann <ssp@redhat.com> (cherry picked from commit 7ed0c3912e1cbab960df308b9d4ea618be757fd2)
2015-10-26man: Fix case for MIT-unspecified.Cyril Brulebois1-1/+1
include/site.h says that COMPILEDDISPLAYCLASS is MIT-unspecified, rather than MIT-Unspecified. Fix the manpage accordingly. Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 4803f7139131cee7bbf50b32d667d6e60302df09)
2015-10-26protocol.txt: Add MIT-SHM 1.2 requestsAlan Coopersmith1-0/+2
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit a31bbc450a08622aadafc264b3efe57e465eaecb)
2015-10-26protocol.txt: Add DRI3 1.0 requestsAlan Coopersmith1-0/+6
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 424ba5de56e2ddf173bb0d26daa821f12897f18f)
2015-10-26protocol.txt: Add Present 1.0 requestsAlan Coopersmith1-0/+5
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 7e6b7c799455fdeac082cf2a064fe1ba432e92ca)
2015-10-26protocol.txt: Remove extensions that died before Xorg was bornAlan Coopersmith1-182/+0
Adobe-DPS-Extension, DEC-XTRAP, X3D-PEX, XIE Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 1ea8fb96bc6a95d98dd67fc9d4c4e4b858383d34)
2015-10-26dix: remove dead extensions to protocol.txtTiago Vignatti1-59/+0
lbx and mbe. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> (cherry picked from commit 593270038d8983b99aa0aaa24509da3cb944be5c)
2015-10-26Add new GLX events errors and requests to protocol.txtRobert Hooker1-0/+38
Based off of glproto 1.4.11. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Robert Hooker <robert.hooker@canonical.com> (cherry picked from commit 3cd56dd2cfbfcce6ba68c22450d51139208993ab)
2015-10-26Add DRI2 2.2/2.3 events and requests to protocol.txtRobert Hooker1-0/+7
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Robert Hooker <robert.hooker@canonical.com> (cherry picked from commit 272ba9f021c6d08ebd6a2d96da3737f5630bcbd5)
2015-10-26rootless: 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> (cherry picked from commit fa0bb01899d586e02cf51892c17edd22e462a46c)
2015-10-26os/xdmcp: Just send XDMCP keepalive packets once every three minutesKeith Packard1-18/+2
There was a complicated scheme to increase the time between keepalives from 3 minutes up to as much as 24 hours in an attempt to reduce network traffic from idle X terminals. X terminals receiving X traffic, or receiving user input would use the 3 minute value; X terminals without any network traffic would use a longer value. However, this was actually broken -- any activity in the X server, either client requests or user input, would end up resetting the keepalive timeout, so a user mashing on the keyboard would never discover that the XDMCP master had disappeared and have the session terminated, which was precisely the design goal of the XDMCP keepalive mechanism. Instead of attempting to fix this, accept the cost of a pair of XDMCP packets once every three minutes and just perform keepalives regularly. This will also make reworking the block and wakeup handler APIs to eliminate select masks easier. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit db1089eafc1c5371fa0030202de588d2e2b4f8e5)
2015-10-26os/xdmcp: Remove dead 'restart' codeKeith Packard1-13/+1
The X server used to wait for the user to hit a key or move the mouse before restarting the session after a keepalive failure. This, presumably, was to avoid having the X server continuously spew XDMCP protocol on the network while the XDM server was dead. Switching into this state was removed from the server some time before XFree86 4.3.99.16, so the remaining bits of code have been dead for over a decade, and no-one ever noticed. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit a3a40291330bad10401fe2bcdbc097ce742b026a)
2015-10-26randr: Remove senseless checks for xf86RandR12KeyEgbert Eich1-9/+4
When xf86RandR12Key is not set we will not get to the places where these tests are done as the functions in question are not called. In most cases we would have crashed before these checks anyway. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 3cd7d33380953f2a315dd79ab74d7340c83fd80a)
2015-10-26randr/prime: Don't stop on the first pipe when disabling ReplaceScanoutPixmapChris Wilson1-22/+45
As we define sizeFits based on whether a CRTC is active, and skip trying to redirect the scanout on a disable pipe, we then attempt to undo it later and fail because crtc->scanout_pixmap != DRI2_Pixmap and !sizeFits. Paper over this failure by skipping unredirected CRTC when disabling. v2: Unwind upon failure Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84653 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Dave Airlie <airlied@redhat.com> Reported-by: Christoph Haag <haagch@frickel.club> Tested-by: Christoph Haag <haagch@frickel.club> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 245040f0d0b937efe14d947468a641a95398776a)
2015-10-26Remove DECnet from Xserver.manAlan Coopersmith1-4/+3
DECnet support died in modularization (X11R7.0) Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 9d65a0de95a20632f2a6a04ba596dcdd76d9f5e2)
2015-10-26privates: Clear screen-specific keys during CloseScreenAaron Plattner2-0/+10
The modesetting driver corrupts memory when used after a server regeneration because not enough memory is allocated for its pixmap privates. This happens because its call to dixRegisterScreenSpecificPrivateKey() does nothing because key->initialized is still TRUE from the first server generation. However, the key is not in the screen's linked list of screen-specific privates because that's freed and reallocated during the server generation loop in dix_main(). Fix this by clearing key->initialized before CloseScreen and add a call to dixFreeScreenSpecificPrivates() for GPU screens. v2: Just set key->initialized to FALSE and move dixFreeScreenSpecificPrivates() calls to after CloseScreen. v3: Move dixFreeScreenSpecificPrivates() calls back to just before CloseScreen. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 82eb490b0a341729f25d0c42a937fe29d99da521)
2015-10-26render: Simplify SProcRenderScaleAdam Jackson1-14/+1
Since ProcRenderScale throws BadImplementation anyway it's pointless to waste time carefully swapping the request. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 67dd34fa734085ed67ba7790820fe4743d48b60f)
2015-10-26Xephyr: Paint with subimage for non-Glamor & non-XSHM caseIan Scott1-4/+6
This improves the case for when we paint an area without SHM. xcb_image_subimage() is used to create a subimage for the damaged area, which is converted to native format if necessary. Signed-off-by: Ian Scott <ian.scott@arteris.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit a579e6ba7763749d51d16e3a54941e06939df07a)
2015-10-26Keep SIGALRM restart flag after PopenDaniel Drake1-11/+38
Commit 94ab7455 added SA_RESTART to the SIGALRM handler. However, the Popen code tears down and recreates the SIGALRM handler via OsSignal(), and this flag is dropped at this time. Clean the code to use just a single codepath for creating this signal handler, always applying SA_RESTART. [ajax: Fixed commit id] Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Daniel Drake <drake@endlessm.com> (cherry picked from commit 1f915e8b524dd02011158aa038935970684c7630)
2015-10-26Allow system call restarts upon signal interruptionDaniel Drake2-1/+2
The X server frequently deals with SIGIO and SIGALRM interruptions. If process execution is inside certain blocking system calls when these signals arrive, e.g. with the kernel blocked on a contended semaphore, the system calls will be interrupted. Some system calls are automatically restartable (the kernel re-executes them with the same parameters once the signal handler returns) but only if the signal handler allows it. Set SA_RESTART on the signal handlers to enable this convenient behaviour. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Daniel Drake <drake@endlessm.com> (cherry picked from commit 94ab7455abc213fc96760e29ab2e943ec682fb22)
2015-10-26On linux use <termios.h> instead of <termio.h>Felix Janda1-4/+0
<termio.h> is obsolete. Using <termios.h> instead fixes building with musl libc. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Felix Janda <felix.janda@posteo.de> (cherry picked from commit e8e3368298c98a1292bb1c727e2f3d56539e2eac)
2015-10-26glxproxy: Fix an obvious thinko in QueryExtensionsStringAdam Jackson1-1/+1
gcc 5.1 throws a rather amusing warning here: glxcmdsswap.c: In function ‘__glXSwapQueryExtensionsString’: glxcmdsswap.c:439:1: warning: function might be candidate for attribute ‘noreturn’ [-Wsuggest-attribute=noreturn] __glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc) This is entirely accurate, albeit curiously phrased: swapping some bits hanging off the end of a null pointer will make Xdmx crash, so from the perspective of code generation the function will indeed not return. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit dfa8b37cfb2589f2474f6fcc755dde77bfdd6fed)
2015-10-26remove bogus \/ escapesIngo Schwarze2-2/+2
some X manuals use then escape sequence \/ when they want to render a slash. That's bad because \/ is not a slash but an italic correction, never producing any output, having no effect at all in terminal output, and only changing spacing in a minor way in typeset output. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 634e357be2ec400f63bd5c42f706b709b6ddabc3)