summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-12-02miext: Move SyncShm FDs out of the way of clientsKeith Packard3-0/+30
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-12-02Xext: Use SHMDIR and O_TMPFILE when creating mapping filesKeith Packard1-3/+31
ShmCreateSegment asks for a file descriptor for a memory mapped file created by the X server. This patch uses O_TMPFILE where available, and also uses the SHMDIR directory to store the files, both for the O_TMPFILE and mkstemp cases. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-12-02Select directory for MIT-SHM temp files at configure timeKeith Packard2-0/+46
By default, this looks through a list of directories to find one which exists, but can be overridden with --with-shared-memory-dir=PATH This patch doesn't actually do anything with this directory, just makes it available in the configuration Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-11-26Xdmx: Initialize DMX extension even if not built with GLX supportAlan Coopersmith1-1/+3
dmxAddExtensions takes an argument to determine if it should just initialize the DMX extension, or both DMX & GLX, but if GLX wasn't compiled in, the entire call was #ifdef'ed out, leaving the DMX extension unavailable. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-26configure.ac: Require libpciaccess for int10Connor Behan1-0/+3
A --disable-pciaccess build will fail with an int10 module other than stub. Signed-off-by: Connor Behan <connor.behan@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-26configure.ac: Require libpciaccess for platform bus supportConnor Behan1-0/+4
There is currently no reason to build with --enable-config-udev-kms and --disable-pciaccess but anyone who tries this should know that the build will fail. Signed-off-by: Connor Behan <connor.behan@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-26configure.ac: Add whitespace near PCI configurationConnor Behan1-18/+17
Signed-off-by: Connor Behan <connor.behan@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-23Bump release to 1.14.99.903 (1.15 RC3)xorg-server-1.14.99.903Keith Packard1-3/+3
Signed-off-by: Keith Packard <keithp@keithp.com>
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-23Xext: Recover from miSyncInitFenceFromFD failure without crashingKeith Packard1-1/+1
miSyncDestroyFence must not be called unless miSyncInitFence has been invoked, so if miSyncInitFenceFromFD fails, we must free the fence manually. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Fredrik Höglund <fredrik@kde.org>
2013-11-23glx/glxdri2: Unwrap EnterVT/LeaveVT upon CloseScreenChris Wilson1-0/+4
In a similar spirit to commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b Author: Keith Packard <keithp@keithp.com> Date: Mon Jul 12 16:01:34 2010 -0700 Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998 we need to unwrap our pScrn->EnterVT/LeaveVT hooks around server regeneration or else we cause an infinite recursion on the next VT switch afterwards. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1235516 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-23xnest: Ignore GetImage() error in xnestGetImage() (v3)Keith Packard1-1/+0
(I found an amended version of this patch and applied the difference here - keithp) v3: Don't call Xsync before restoring error handler as any errors generated by XGetImage() should be processed when this call returns as suggested by Jamey Sharp <jamey@minilop.net> Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2013-11-20present: When unflipping, copy to flip window rather than screenKeith Packard1-2/+2
unflip happens after the clip lists have been updated, so instead of smashing the whole screen and drawing over other windows, just draw to the original flip window; it'll have the right clip list and so the copy will work just fine. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-20present: Block for wait_fence in present_executeKeith Packard4-4/+76
Pend presentation until wait_fence is also triggered by having the SyncFence trigger invoke present_execute once triggered. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-20present: Signal destroyed flip window with vblank->window == NULLKeith Packard3-9/+6
This eliminates dereferencing freed window pointers when there is a flip for that window in progress. The flip will complete, and then immediately get undone (as we can't stop an in-progress flip). Remove the vblank->window_destroyed field as we can signal this with vblank->window == NULL instead. Change check to vblank->window == NULL in: present_flip_notify Add check for vblank->window == NULL in: present_vblank_notify present_execute present_flip_notify was also using vblank->window->drawable.pScreen, so stop doing that and use vblank->screen instead. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-20present: Ignore event_id 0 from driver vblank notifyKeith Packard1-0/+3
We use event_id 0 to mean 'no such event'; if a driver sends us that event_id, make sure we don't accidentally match it. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-20present: Round fake MSC computations intead of truncatingKeith Packard1-1/+1
If the timer fired too early, we'd sometimes mis-compute the MSC for fake vblanks. Rounding the computation to the nearest MSC fixes this nicely. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-18configure: allow for --enable-libunwind and --disable-libunwindPeter Hutterer1-7/+15
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>
2013-11-14Merge remote-tracking branch 'whot/for-keith'Keith Packard6-14/+25
2013-11-14mieq: Bump default queue size to 512Adam Jackson1-1/+1
Based on some bugzilla scraping I did around November 2012. Of xserver bugs in Red Hat bugzilla with an EQ size message in the log, the distribution looked like: String | Matches ------------------------------------- Increasing EQ size to 512 | 460 Increasing EQ size to 1024 | 52 Increasing EQ size to 2048 | 6 Increasing EQ size to 4096 | 0 Most of the "512" ones appear to be mostly harmless, some relatively expensive path in either rendering or resource destruction simply taking too long due to external pressures like paging or CPU contention. So let's raise the initial queue size, both to reduce the number of spurious abrt reports and to drop fewer events in all but the most pathological cases. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-14xfree86: return NULL for compat output if no outputs.Dave Airlie1-0/+3
With outputless GPUs showing up we crash here if there are not outputs try and recover with a bit of grace. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-14test: build the touch test only when building XorgDan Horák1-2/+2
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dan Horák <dan@danny.cz> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-14include: export key_is_down and friendsPeter Hutterer1-6/+6
VNC needs key_is_down to check if a key is processed as down before it simulates various key releases. Make it available, because I seriously can't be bothered thinking about how to rewrite VNC to not need that. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Keith Packard <keithp@keithp.com>
2013-11-14Stop including inline assembly .il file for Solaris Studio buildsAlan Coopersmith3-24/+0
Since all the inb/outb/etc. use in the X server itself (except for xf86SlowBcopy) has been replaced by calls to libpciaccess, we no longer need to pass inline assembly files to replace the gcc inline assembly from hw/xfree86/common/compiler.h when building Xorg itself. The .il files are still generated and installed in the SDK for the benefit of drivers who may use them. Binary diff of before and after showed that xf86SlowBcopy was the only function changed across the Xorg binary and all modules built in the Xserver build, it just calls the outb() function now instead of having the outb instructions inlined, making it a slightly slower bcopy. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-14kdrive: fix cursor jumps on CursorOffScreen behaviorPeter Hutterer1-4/+4
This patch fixes cursor jumps when there is a grab on the Xephyr window and the pointer moves outside the window. So on two side-by-side 640x480 screens, a coordinate of 0/481 triggers KdCursorOffscreen. If the delta between two screens is 0, they share the same offset for that dimension. When searching for the new screen, the loop always rules out the current screen. So we get to the second screen, trigger the conditions where dy <= 0 and decide that this new screen is the correct one. The result is that whenever KdCursorOffScreen is called, the pointer jumps to the other screen. Change to check for dy < 0 etc. so that the cursor stays on the same screen if there is no other screen at the target location. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-11-14kdrive: modify ephyr events to use POINTER_DESKTOP and scale them to thatPeter Hutterer3-1/+11
A multi-head Xephyr instance has the pointer stuck on one screen because of bad coordinate calculation. The coordinates passed to GetPointerEvents are per-screen, so the cursor gets stuck on the left-most screen by default. Adjust and mark the events as POINTER_DESKTOP, so the DIX can adjust them accordingly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-11-14kdrive: handle WxH as valid geometry specKeith Packard1-1/+2
If a screen size was specified as WxH, the loop returned early and kdOrigin was never advanced. Thus, screen->origin was always 0 (or whatever was given at the -origin commandline flag). If a screen size was given with a bit depth (WxHxD), kdOrigin would always advance by the current screen, offsetting the next screen. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-14ephyr: xcb_connect returns an error, not NULLPeter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-11-14Update to version 1.14.99.902xorg-server-1.14.99.902Keith Packard1-3/+3
1.15 RC2 Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-14xext: Fix shmint.h to not use headers outside of sdk_HEADERSKeith Packard3-8/+3
shmint.h is part of sdk_HEADERS, and so can't use anything not included in sdk_HEADERS. busfault.h includes dix-config.h which is not. Leave the use of struct busfault in shmint.h and move the include of busfault.h to shm.c. protocol-versions.h is not part of sdk_HEADERS, so instead of using that, just use XTRANS_SEND_FDS to choose whether to expose the fd passing requests directly. Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Knut Petersen <Knut_Petersen@t-online.de> Reviewed-by: Julien Cristau <jcristau@debian.org> v2: also avoid using protocol-versions.h
2013-11-12xfree86: Fix build without libpciaccessJeremy Huddleston Sequoia1-1/+4
Regression fix from commit 04ab07ca19236d6c9a947e065fb69b0dd0d16639 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Connor Behan <connor.behan@gmail.com>
2013-11-12Enable XTRANS_SEND_FDS on Solaris too.Alan Coopersmith2-1/+10
Requires passing through the __EXTENSIONS__ and _XOPEN_SOURCE defines in order to expose the msg_control members in struct msghdr. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-12Avoid conflicts with Solaris <sys/regset.h> defines that clash with our namesAlan Coopersmith4-1/+34
When building on Solaris with _XOPEN_SOURCE set to a recent XPG release, <stdlib.h> and other core headers start including <sys/regset.h>, which has a bunch of unfortunately named macros such as "CS", "ES", etc. for x86 & x64 registers which clash with existing variable & struct member names in Xorg - so #undef these so they don't interfere with our use. (Yes, have filed a bug against the system headers for exposing these, but this solves the problem for building on existing releases.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-11Proper spelling of MAP_ANONYMOUS is MAP_ANON.Keith Packard1-1/+2
The former doesn't exist on BSD and the latter is available everywhere AFAIK (checked Solaris and Linux). You also might want to wrap that line ;). Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-11Get rid of the rest of the FD passing code when XTRANS_SEND_FDS isn't setKeith Packard3-0/+10
req_fds and SetReqFds in include/dixstruct.h ReadFdFromClient, WriteFdToClient and the FD flushing in os/io.c Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-11Merge remote-tracking branch 'jeremyhu/master'Keith Packard3-32/+33
2013-11-11present: Don't try to initialize when building without present supportAdam Jackson1-0/+2
There's a --disable-present, so it'd be nice if it worked. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-11present: Change debug output a bit to help diagnose missing vblank signalsKeith Packard1-2/+5
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-11Present: Check for window/fence destroyed when idling pixmapsKeith Packard1-3/+6
A client destroying objects in the middle of an unflip can end up having the screen flip window or fence set to NULL in the unflip notify path. Check for these and don't try to use those objects. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-11Trap SIGBUS to handle truncated shared memory segmentsKeith Packard10-2/+275
If a client passes a section of memory via file descriptor and then subsequently truncates that file, the underlying pages will be freed and the addresses invalidated. Subsequent accesses to the page will fail with a SIGBUS error. Trap that SIGBUS, figure out which segment was causing the error and then allocate new pages to fill in for that region. Mark the offending shared segment as invalid and free the resource ID so that the client will be able to tell when subsequently attempting to use the segment. Signed-off-by: Keith Packard <keithp@keithp.com> v2: Use MAP_FIXED to simplify the recovery logic (Mark Kettenis) v3: Also catch errors in ShmCreateSegment Conflicts: include/dix-config.h.in include/xorg-config.h.in
2013-11-11Require libXtrans version 1.3.2Keith Packard1-1/+1
This has the FD passing support included Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-11Xext: Enable MIT-SHM FD-passing request definitions only when possibleKeith Packard3-2/+33
Check to see if xtrans FD passing is available and use that to advertise the appropriate version of the SHM extension Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-11-11Require xextproto version 7.2.99.901Keith Packard1-1/+1
This includes the MIT-SHM FD passing requests Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-11-11Remove dix-config.h config variables from xorg-config.hKeith Packard1-3/+0
xorg-config.h includes dix-config, so there's no need to duplicate. Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-11Make XTrans FD passing support optional. Define only on LinuxKeith Packard3-0/+41
Until other operating systems have a libXtrans port for FD passing, disable this on non-Linux systems. Note that this define affects how libXtrans gets built into the X server, which is why it need only define the symbol Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-10XQuartz: Don't sleep forever on exit if usleep() returns an errorJeremy Huddleston Sequoia1-1/+1
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-11-10XQuartz: Update Info.plist copyright yearsJeremy Huddleston Sequoia1-2/+2
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-11-08configure.ac: Move GLX section after DRIJeremy Huddleston Sequoia1-29/+30
The GLX section of configura.ac checks the state of DRI2, so it needs to be after DRI2=auto is resolved. Also reset libgl requirement to 7.1.0 in non-dri2 case. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-06ARM64: Add support for aarch64Andreas Schwab3-2/+17
Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-05Use $GL_LIBS instead of -lGL for linkingKeith Packard1-1/+1
-lGL presumes that the GL library is in the system path, while $GL_LIBS is auto-detected. Signed-off-by: Keith Packard <keithp@keithp.com>