summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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>
2013-11-05Link with xshmfence, reference miSyncShmScreenInit in sdksymsKeith Packard4-0/+10
This gets the server to link with xshmfence again, and also ensures that the miSyncShm code is linked into the server with the reference from sdksyms. Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-05os: Actually use the computed clockid in GetTimeInMicrosJulien Cristau1-1/+1
The selection of which clock to use for this function was not actually getting used when fetching the final clock value. Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-04hw/xfree86: Link libdri3 only when DRI3 is definedKeith Packard1-1/+6
Don't attempt to link non-existant libraries... Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-04Disable DRI3 and sync fence FD functions if xshmfence isn't availableKeith Packard5-3/+67
Make sure the server can build when the xshmfence library isn't present Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-01Set version to 1.14.99.901 (1.15 RC1)xorg-server-1.14.99.901Keith Packard1-3/+3
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-01Add dri3 and present directorys to distributionKeith Packard1-0/+2
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-01Merge remote-tracking branch 'whot/for-keith'Keith Packard3-4/+14
2013-11-01config/APM: Add option to disable building of APM support on LinuxEgbert Eich2-7/+10
APM support in the Xserver was used to restore the console mode prior to a power management event. This was to ensure the mode upon suspend/resume was one that the system firmware or kernel could deal with. APM support is now largely obsolete, KMS drivers don't require a mode restoration anyhow. Therefore it should be possible to disable this feature. (small modification by keithp - move test for XF86PM flag after check for APM, then move XF86PM flag to xorg-config.h.in) Signed-off-by: Egbert Eich <eich@freedesktop.org> Tested-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-01sync: fix corner-case in triggering idle alarmsPeter Hutterer1-1/+10
ProcessInputEvent() resets the device idle times. If idle time was higher than the lower bracket, this should trigger an event in the idle time wakeup handler. If processing is slow, the idle time may advance past the lower bracket between the reset and the time the BlockHandler is called. In that case, we'd never schedule a wakeup to handle the event, causing us to randomly miss events. Ran tests with a neg transition trigger on 5ms with 200 repeats of the test and it succeeded. Anything below that gets a bit tricky to make sure the server sees the same idle time as the client usleeps for. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-11-01config/ACPI: Add option to disable building of ACPI support on LinuxEgbert Eich1-1/+2
ACPI support in the Xserver was used to restore the console mode prior to a power management event. This was to ensure the mode upon suspend/resume was one that the system firmware or kernel could deal with. The feature depended on acpid to be running. Most of this functionality is now take over by systemd, KMS drivers don't require a mode restoration anyhow. Therefore it should be possible to disable this feature under some circumstances. Tested-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31DDX/Randr: Avoid server crash when xrandr SetConfig is called while switched ↵Egbert Eich1-7/+9
away A call to Xrandr SetScreenConfig (for randr 1.1) causes the Xserver to crash when xf86SetViewport() which does not check if the hardware is accessible. Wrap accesses to xf86SetViewport() with if (vtSema) { ... } to avoid that. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31DDX/Events: Distinguish between Input- and GeneralHandlers in xf86VTSwitch()Egbert Eich1-9/+22
When enabling/disabling input handlers in xf86VTSwitch() we treat Input- and GeneralHandlers equally. The result is that after a VT switch the masks for EnabledDevices and AllSockets are equal and the distiction between both types is lost. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31DDX/modes: Add a sanity check when using screen sizes from EDIDEgbert Eich1-4/+16
EDID sometimes lies about screen sizes. Since the screen size is used by clients to determine the DPI a wrong ration will lead to terrible looking fonts. Add a sanity check for the h/v ratio cutting off at 2.4. This would still accept the cinemascope aspect ratio as valid. Also add message suggesting to add a quirk table entry. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31DDX/DPMS: Call dixSaveScreens() also when screen is turned onEgbert Eich1-1/+8
DMPS calls dixSaveScreens() when turned off but not when turned on. In most cases this is irrelevant as DPMS is done when a key is hit in which case dixSaveScreens() will be called to unblank anyhow. This isn't the case if we use xset (or the DPMS extension directly) to unblank. Check screenIsSaved to make sure the state needs to be changed before calling dixSaveScreens(). Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>