summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-10-25xfree86: use xf86AddNewOption instead of xf86addNewOptionPeter Hutterer1-4/+4
The former strdups for us. If the strdup fails we miss out on the CorePointer option (default on anyway) and we're likely to fall over soon anyway, so let's pretend this is the same behaviour. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-10-25input: switch InputOption to use XF86OptionRec storage.Peter Hutterer10-43/+59
Use the same struct for both InputOption and XF86OptionRec so we don't need to convert to and fro the two in the config backends. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-10-25kdrive: switch to new InputOption API.Peter Hutterer1-60/+72
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2011-10-24Bug 38420: Xvfb crashes in miInitVisuals() when started with depth=2Christopher Yeleighton1-0/+2
https://bugs.freedesktop.org/show_bug.cgi?id=38420 Exit with fatal error message, not segfault. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-24Merge remote-tracking branch 'jeremyhu/master'Keith Packard8-199/+543
2011-10-24xf86Crtc: handle no outputs with no modes harder.Dave Airlie1-22/+19
If you started an X server with no connected outputs, we pick a default 1024x768 mode, however if you then ran an xvidmode using app against that server it would segfault the server due to not finding any valid modes. This was due to the no output mode set code, only adding the modes to the scrn->modes once, when something called randr 1.2 xf86SetScrnInfoModes would get called and remove all the modes and we'd end up with 0. This change fixes xf86SetScrnInfoModes to always report a scrn mode of at least 1024x768, and pushes the initial configuration to just call it instead of setting up the mode itself. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=746926 I've seen other bugs like this on other distros so it might also actually fix them. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-24XQuartz: Fix the filename of our log fileJeremy Huddleston1-1/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-21XQuartz: appledri: Allow byte swapped requestsJeremy Huddleston1-5/+91
Even though it's only valid when local, it is possible for a local client and the server to not match endianness, such as when running a ppc application under Rosetta. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-21XQuartz: appledri: Fix byte swapping in repliesJeremy Huddleston1-3/+36
Even though it's only valid when local, it is possible for a local client and the server to not match endianness, such as when running a ppc application under Rosetta. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-21XQuartz: appledri: Set the correct reply length for XAppleDRICreatePixmapJeremy Huddleston1-1/+1
http://xquartz.macosforge.org/trac/ticket/508 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-21XQuartz: appledri: Change whitespace in appledristr.h to match mesaJeremy Huddleston1-141/+157
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-21Xnest: Match the host's keymapJeremy Huddleston1-4/+21
This was a regression. Introduced by: 08363c5830bdea34012dcd954b45ccfdc79a3a7e and 32db27a7f867b503c2840ca7b815e96d10be9210 Masked by: 1e69fd4a60147287b31e53bfc61543fb17bb82c8 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-21test: Add unit test for mieqJeremy Huddleston1-0/+69
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-21mieq: Reserve some space in EQ for release and other special eventsJeremy Huddleston1-4/+29
The last 64 events in the event queue will be reserved for release events in order to help return the system to a cleaner state when it comes back from a soft wedge. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-21mieq: Provide better adaptability and diagnostics during mieq overflowJeremy Huddleston1-36/+127
This patch changes from a static length event queue (512) to one that starts at 128 and grows to 4096 as it overflows, logging each time it grows. This change also allows for multiple backtraces to be printed when the server is wedged rather than just one. This increased sampling should help identify the true hog in cases where one backtrace might be insufficient. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-21configure.ac: Add -fno-strict-aliasing to CFLAGSJeremy Huddleston1-0/+6
This should force the server to have -fno-strict-aliasing even once it is removed from the warning flags. See: https://bugs.freedesktop.org/show_bug.cgi?id=31238 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-10-21test: Silence some debug lines from the input unit testsJeremy Huddleston1-6/+9
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-21Xnest: Fix DestroyNotify handlerJeremy Huddleston1-2/+0
This partially reverts the unwanted changes that crept into c13a48e74ec89eafa9b529a87253a631ef02f2e2 Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-10-19Merge remote-tracking branch 'aplattner/for-master'Keith Packard5-35/+130
2011-10-19Merge remote-tracking branch 'hramrach/pull'Keith Packard3-32/+21
2011-10-19Merge remote-tracking branch 'whot/for-keith'Keith Packard6-23/+87
2011-10-19composite: Update borderClip in compAllocPixmap()Ville Syrjala1-4/+7
Previously the parent constrained borderClip was copied over when compRedirectWindow() is called. That is insufficient eg. in case the window was already redirected, but not yet realized. So copy the borderClip over in compAllocPixmap() instead. Example: Window 1 is below an automatically redirect window 2. Window 2 is unmapped and moved outside the extents of window 1. Window 2 is then mapped again, and MarkOverlappedWindows() uses the up to date borderSize of window 2 to mark windows, which leaves window 1 unmarked. Then exposures are calculated using the stale borderClip of window 2, which causes the window below window 2, to be exposed through an apparent hole in window 1. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=22566 Signed-off-by: Ville Syrjala <syrjala@sci.fi> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-19XWinrc.man: fix warning: tab character in unquoted macro argument #35054Gaetan Nadon1-5/+5
Spaces or tabs do not affect the text output layout. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-19xorg.conf.man: fix 382: warning: missing `)' (got `R') #35054Gaetan Nadon1-1/+3
http://www.gnu.org/software/groff/manual/html_node/Man-usage.html Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-19crtc: match full preferred modes if possible when choosing an initial configJesse Barnes1-5/+20
It's fairly common to have multiple, identical monitors plugged in. In that case, it's preferable to run the monitor's preferred mode on each output, rather than just matching the width & height and end up with different timings or refresh rates. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-18render: export TriStrip and TriFan to the driversChris Wilson4-32/+114
Rather than perform an intermediate copy and expand the strip and the fan into a triangle list (thereby tripling the number of edges that the driver needs to process), allow the backend to hook directly into the appropriate Composite function. In order to extend the PictureScreen, without needlessly bumping the ABI, we move the existing copy implementations to mipict.c and assign those by default. To notify the ddx that the new entry points are available, we introduce PICTURE_SCREEN_VERSION. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2011-10-18randr: stop clients from deleting immutable output propertiesLuc Verhaegen1-3/+16
Immutable in randr means that clients are not able to alter the property itself, they are only allowed to alter the property value. This logically means that the property then should not be deleted by the client either. Signed-off-by: Luc Verhaegen <libv@skynet.be> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2011-10-18Merge remote-tracking branch 'herrb/master'Keith Packard1-2/+2
2011-10-18Fix CVE-2011-4029: File permission change vulnerability.Matthieu Herrb1-1/+1
Use fchmod() to change permissions of the lock file instead of chmod(), thus avoid the race that can be exploited to set a symbolic link to any file or directory in the system. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-18Fix CVE-2011-4028: File disclosure vulnerability.Matthieu Herrb1-1/+1
use O_NOFOLLOW to open the existing lock file, so symbolic links aren't followed, thus avoid revealing if it point to an existing file. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-18Do not uselessly reload modules in DuplicateModuleMichal Suchanek1-9/+9
The function does not initialize the module so it has no business loading it. If some user of DuplicateModule expects a module actually loaded they should use LoadModule. Signed-off-by: Michal Suchanek <hramrach@centrum.cz> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-18Use UnloadModuleOrDriver for UnloadSubModule.Michal Suchanek1-17/+6
Signed-off-by: Michal Suchanek <hramrach@centrum.cz> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-18Unload submodules.Michal Suchanek1-6/+0
Signed-off-by: Michal Suchanek <hramrach@centrum.cz> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-18Document -background none optionMichal Suchanek1-0/+6
Document option introduced in commit 8976e97. Signed-off-by: Michal Suchanek <hramrach@centrum.cz> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-18Fix drain_console unregistrationTomáš Trnka2-13/+10
Bug introduced by 9dca441670d261a9a9fb6108960ed48f3d58fb7f xfree86: add a hook to replace the new console handler. console_handler was not being set, making the server eat up CPU spinning in WaitForSomething selecting consoleFd over and over again, every time trying to unregister drain_console without success due to console_handler being NULL. Let's just fix the unregistration in xf86SetConsoleHandler() and use that. But wait, there could be a catch: If some driver replaced the handler using xf86SetConsoleHandler(), the unregistration in xf86CloseConsole will unregister that one. I don't understand Xorg well enough to know whether this poses a problem (could mess up driver deinit somehow or something like that). As it is, xf86SetConsoleHandler() doesn't offer any way to prevent this (i.e. check which handler is currently registered). I had been using it for two days on my machine that previously hit 100% CPU several times a day. That has now gone away without any new problems appearing. Signed-off-by: Tomas Trnka <tomastrnka@gmx.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-18dix: mark motion events as emulated if we're scrolling from button pressPeter Hutterer1-9/+23
The protocol requires that the emulated event is marked as such. So if a driver with smooth scrolling axis sends legacy button events, the motion event must be marked as emulated. Pass the real type to emulate_scroll_button_events and create the events accordingly. For real button press or relase events, only that event must be generated since a release event will follow or a press event has already occured, respectively. (This fixes a bug where we'd get two release events for each legacy button event) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-10-18dix: add valuator_mask_fetch_double()Peter Hutterer3-1/+54
Using this call simplifies callers that don't know if the mask bit is set. Before: if (valuator_mask_isset(mask, valnum)) value = valuator_mask_get_double(mask, valnum)); else value = someothervalue; Now: if (!valuator_mask_fetch_double(mask, valnum, &value)) value = someothervalue; Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-10-17Merge remote-tracking branch 'jeremyhu/master'Keith Packard70-1246/+715
2011-10-17Merge remote-tracking branch 'whot/next'Keith Packard7-99/+168
2011-10-15Bump ABI_VIDEODRV_VERSION to 12Jeremy Huddleston1-1/+1
The ABI changed in the previous series of changes, so bump the ABI version for the next release. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15xfree86: Deprecate xf86MapVidMem and friendsJeremy Huddleston1-5/+5
Drivers should transition over to using libpciaccess's instead. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-15xorg-server.pc.in: Remove libpciaccess and pixman-1 from RequiresJeremy Huddleston2-6/+6
Every module building against xorg-server does not *Require* pixman nor libpciaccess. If such modules need pixman or pciaccess, they should be depending on them directly rather than inheriting a dependency from xorg-server. To do this, they should use PKG_CHECK_MODULES in configure.ac to check for pixman-1 or pciaccess and include the apporpriate _LIBS variable to the appropriate _LDFLAGS variable in Makefile.am This also moves pixman-1 to Requires.private, so CPPFLAGS is set right to to satisfy include dependencies but avoid linking needlessly. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-10-15darwin: configure: Force some irrelevant options to off on darwinJeremy Huddleston1-0/+5
This removes the need to pass the following to configure on darwin: --disable-pciaccess -disable-int10-module --disable-vbe --disable-vgahw --disable-libdrm Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15xfree86: Link modules with -moduleJeremy Huddleston7-12/+12
This makes a difference on darwin (and apparently nowhere else) https://www.gnu.org/s/libtool/manual/libtool.html#Modules-for-libltdl Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-10-15xfree86: fbdevhw: Remove unused include of pciaccess.hJeremy Huddleston1-2/+0
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15configure: wrap PCI code with macro and set it at build timeTiago Vignatti15-23/+74
--disable-pciaccess, used together with --disable-module-int10, can be used to disable all pci code inside the server. Note that XSERVER_LIBPCIACCESS was previously used only in the driver side and now it defines also whether the library is used inside the server. Also, XORG_BUS_PCI automake variable is introduced to track PCI code needs. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-15configure: make PCI configuration more saneTiago Vignatti1-17/+22
No semantical changes. Just moved code around, grouping PCI related stuff in a single chunk. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-15configure: change PCI function checking by a meaningful version of the libraryTiago Vignatti6-44/+0
People that don't want VGA arbiter active can go to the library and enable the stubs there. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15xfree86: Work around issue where ar may be told to make an archive with no ↵Jeremy Huddleston2-1/+2
contents Automake: "Be careful when selecting library components conditionally. Because building an empty library is not portable, you should ensure that any library always contains at least one object." Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-10-15xfree86: Add stubs for os-support to help adding new architecture supportJeremy Huddleston7-3/+84
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>