summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2010-08-13Stop checking or calling PtrCtrlProcsAlan Coopersmith1-3/+0
None of them do anything useful now that pointer acceleration is entirely handled in the server. (Does not completely nuke yet, since that would be an API/ABI break.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-13xfree86: parser: Never use constant strings for driver names (fixes #17438)Jesse Adkins2-4/+9
When the parser sees the "keyboard" driver, it automatically (and silently) replaces it with the constant string "kbd". Everybody else uses malloc'd memory for the driver name, so input device closure assumes it can use free. Free val.str, so this crash doesn't turn into a memory leak. Whew. Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-10Cygwin/X: Fix glxWinCreateDrawable() for API changeJon TURNEY1-5/+9
Commit 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc changed the signature of __GLXScreen's createDrawable method. Update the glxWinCreateDrawable() function in XWin's GLX provider appropriately. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-08-01ddc: Fix memory leak in GetEDID_DDC1Matt Turner1-2/+5
Mark argument to DDC_checksum as const too. Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-07-29XQuartz: xpbproxy: Don't take down the whole server on an IO errorJeremy Huddleston1-0/+2
Calls pthread_exit to prevent _XIOError from calling exit() This fixes http://xquartz.macosforge.org/trac/ticket/421 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-07-28XQuartz: GLX: Don't mangle __GLXDrawable's pDrawJeremy Huddleston1-3/+2
We were incorrectly NULLing out pDraw in __GLXDrawable instead of ours in __GLXAquaDrawable. (we should refactor to eliminate this redundancy later) This was causing http://xquartz.macosforge.org/trac/ticket/426 This was benign until commit f0006aa58f6cf7552a239e169ff6e7e4fda532f4 The root cause of this change was fed7ccc481ad1caaa518cafe944c2327a5d0b6c65 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-07-23Use DocBook stylesheets from xorg-sgml-doctools if they're availableAlan Coopersmith1-0/+1
Bumps minimum xorg-macros requirement from 1.6 to 1.10 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Patrick E. Kane <pekane52@gmail.com>
2010-07-13Merge remote branch 'jeremyhu/master'Keith Packard5-33/+7
2010-07-13Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998Keith Packard5-4/+45
Because some EnterVT code needs to remove it self from the call chain, we need to fix all of the wrappers to correctly unwrap/rewrap during the call chain. This is a follow-on to the fix for bug 27114 in commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Jesse Barnes <jesse.barnes@intel.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-07-13XQuartz: Bump bundle version to 2.6.0 for xorg-server-1.9.0 and X11R7.6Jeremy Huddleston1-2/+2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-07-13XQuartz: Remove some dead code.Jan Hauffa3-30/+0
Signed-off-by: Jan Hauffa <hauffa@in.tum.de> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-07-13XQuartz: Avoid a crash when mistakenly free()ing in QuartzSetCursor on some ↵Jeremy Huddleston1-1/+5
configs Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-07-09DRI2: re-allocate DRI2 drawable if pixmap serial changesJesse Barnes1-1/+18
If a pixmap header is modified or the drawable serial changes, some aspects of the drawable are likely to have changed so we should re-allocate the corresponding DRI2 drawable in that case. This is one way of catching when the root window pixmap changes through xrandr. Fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=28365. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-07-07dix: purge leftover manual key down bit setting.Peter Hutterer5-20/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-07-02Add API to update setting of waitForUpdate screen private in miPointerAlan Coopersmith1-8/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-01xfree86: configure: remove vendor and card name matching rulesTiago Vignatti1-25/+0
Although vendor and board naming are used to create the configure file, the server doesn't actually use it when fetching such file and probing devices. Reported-by: Richard Barnette <jrbarnette@chromium.org> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Tested-by: Richard Barnette <jrbarnette@chromium.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-07-01xfree86: pci: remove superfluous vendor and card name loggingTiago Vignatti1-12/+1
X server suffers in startup time when relying on the pciaccess's linear search to fetch vendor and video device name from PCI ID file (when existent). Such names are only used to write the log, which may be superfluous. This information often is provided by the drivers or likewise users can get the it using external tools like lspci or scanpci. This patch remove the references of those functions from X start up. Reported-by: Richard Barnette <jrbarnette@chromium.org> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Richard Barnette <jrbarnette@chromium.org> Reviewed-by: James Cloos <cloos@jhcloos.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-30Xephyr: fix Xv adaptor capability testsJulien Cristau1-5/+10
Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-30Xephyr: fix memory leak in XF86DRIOpenConnectionJulien Cristau1-1/+2
The allocated bus id string was not being freed. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-30xfree86/modes: Allow the driver to specify initial rotationVille Syrjälä1-1/+4
When the "Rotate" option isn't specified allow the driver to specify the initial rotation mode. This way the driver can choose to retain the same settings that were used by software that was used prior to starting X. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22Revert "mi: Remove unused overlay support"Keith Packard2-1/+29
This reverts commit 9120e58556014e514eef9dfe43cdea4b74dc66ae. Whoops, please revert this patch -- overlay is in use in nvidia drivers, and it's too late in release cycle to remove it. I feel really sorry that I kept this patch in my tree. I will submit another one, removing only XAA overlay hooks which are not used at all.
2010-06-22rotation: fix cursor and overlap of one pixel.Dave Airlie1-3/+6
Commit 77c7a64e8885696665556c9fbcb3cffb552e367a was introduced to fix a cursor off by one on Intel hw, however it also move the whole crtc into an off by one position and you could see gnom-eshell overlapping. This commit reverts that and instead fixes the cursor hotspot translation to work like pixman does. We add 0.5 to the cursor vector before translating, and floor the value afterwards. Thanks to Soeren (ssp) for pointing out where the real problem was after explaning how pixman translates points. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22XWin: Fixes for devPrivates API changeColin Harrison3-11/+18
Fix some typos in devPrivates API changes in XWin code. Move allocation of private keys as it's no longer valid to do them during OsVendorInit() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-20mi: Remove unused overlay supportMikhail Gusarov2-29/+1
The only reference to it in server and drivers is in XAA overlay code which would segfault as no miInitOverlay is called ever. No segfaults were observed "in wild", so XAA overlay is probably also unused. XAA code is modified to act as if miOverlayCopyUnderlay always returned false, because XAACopyWindow8_32 could only set doUnderlay to true if it's called from miOverlayMoveWindow or miOverlayResizeWindow, which can only be called if miInitOverlay has hooked those functions, and no driver (on fd.o) or server code calls that. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-18Don't coredump on "X -showopts" (bug 25874)Alan Coopersmith1-0/+7
Don't try walking the xf86ConfigLayout.screens table if it's empty https://bugs.freedesktop.org/show_bug.cgi?id=25874 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-17DRI2/xserver: Don't hang in glXSwapBuffers if drawable moves between crtc's ↵Mario Kleiner1-0/+15
(bug 28383) Detect if a drawable has been moved from an original crtc to a new crtc with a lower current vblank count than the original crtc inbetween glXSwapBuffers() calls. Reinitialize drawable's last_swap_target before scheduling next swap if such a move has taken place. last_swap_target defines the baseline for scheduling the next swap. If a movement between crtc's is not taken into account, the swap may schedule for a vblank count on the new crtc far in the future, resulting in a apparent "hang" of the drawable for a long time. Fixes Bugzilla bug #28383. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-16Re-enabled Xnest fix for focus in + modifier bug.Xiaoyang Yu (Max)1-62/+45
* See https://bugs.freedesktop.org/show_bug.cgi?id=3030 Signed-off-by: Xiaoyang Yu (Max) <max.a.yu@intel.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> This takes the xnest way of working around this (see 5904ef2ccd6056b187ca76f104c21e2d686bfc1d "xnest: restore xnestUpdateModifierState") and copies it to Xephyr. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-15In DRI2Connect, check to see if DRI2 has been initialized (bug 28424)Keith Packard1-1/+5
This prevents DRI2GetScreen from being invoked with an uninitialized private key which would cause an assert failure. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: David Ronis <David.Ronis@McGill.CA>
2010-06-15Clean up RandR12 bits on screen close (bug 27114)Keith Packard3-1/+28
When resetting the server, pScrn->EnterVT must be unwrapped or the next server generation will end up wrapping the wrapper and causing an infinite recursion on EnterVT. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Michael Stapelberg <michael+freedesktop@stapelberg.de>
2010-06-11Remove more superfluous if(p) checks around free(p)Matt Turner5-35/+16
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-06-11xfree86: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov3-14/+14
ditto for XFree86 Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11xquartz: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov1-6/+6
ditto for XQuartz Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11xwin: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov3-8/+8
ditto for XWin Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11kdrive: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov1-6/+6
ditto for Kdrive Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11dmx: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov2-3/+3
ditto for DMX Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-10Merge remote branch 'alanc/master'Keith Packard2-5/+6
2010-06-10Fix a couple more possible errors with input-only windowsKeith Packard1-1/+1
Using type == DRAWABLE_WINDOW to differentiate between pixmaps and windows isn't sufficient as input-only windows will end up in the pixmap case. This patch changes a few more code paths to use WindowDrawable instead. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-10Solaris: avoid memory leak if AGPIOC_INFO ioctl failsAlan Coopersmith1-5/+5
Move malloc after ioctl, so we don't have to worry about free'ing the memory if the ioctl fails. [ This bug was found by the Parfait bug checking tool. For more information see http://research.sun.com/projects/parfait ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-06-10Record some additional library dependencies in xf86 modulesAlan Coopersmith1-0/+1
Helps with symbol resolution when building with -z defs Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-06-10Merge remote branch 'whot/for-keith'Keith Packard5-125/+383
2010-06-11xfree86: Match devices based on current driver settingDan Nicholson5-22/+57
Often we want to apply a driver specific option to a set of devices and don't care how the driver was selected for that device. The MatchDriver entry can be used to match the current driver string: MatchDriver "evdev|mouse" Option "Emulate3Buttons" "yes" The driver string is a case sensitive match. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-11xfree86: Allow multiple InputClass Match* entries for && matchingDan Nicholson4-109/+179
Currently when there multiple InputClass entries of the same type, only the last entry is used and the previous ones are ignored. Instead, multiple entries are used to create multiple matching conditions. For instance, an InputClass with MatchProduct "foo" MatchProduct "bar" will require that the device's product name contain both foo and bar. This provides a complement to the || style matching when an entry is split using the "|" token. The xorg.conf man page has added an example to hopefully clarify the two types of compound matches. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-11xfree86: Match devices based on USB IDDan Nicholson5-0/+34
Sometimes the vendor and product names aren't specific enough to target a USB device, so expose the numeric codes in the ID. A MatchUSBID entry has been added that supports shell pattern matching when fnmatch(3) is available. For example: MatchUSBID "046d:*" The IDs are stored in lowercase hex separated by a ':' like "lsusb" or "lspci -n". Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-11xfree86: Match devices based on PnP IDDan Nicholson5-0/+41
Serial input devices lack properties such as product or vendor name. This makes matching InputClass sections difficult. Add a MatchPnPID entry to test against the PnP ID of the device. The entry supports a shell pattern match on platforms that support fnmatch(3). For example: MatchPnPID "WACf*" A match type for non-path pattern matching, match_pattern, has been added. The difference between this and match_path_pattern is the FNM_PATHNAME flag in fnmatch(3). Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-10Merge remote branch 'jeremyhu/master'Keith Packard4-29/+31
2010-06-10dri2: Only deal with output windows and pixmaps.Keith Packard2-7/+12
This reverts commit fdb081b430ddffb495aa5b05bcc4cf10882ff4b2 "dri2: Deal with input-only windows by using WindowDrawable()" and replaces it as follows: Reject the creation of a DRI2 drawable for UNDRAWABLE_WINDOW (input-only windows) and DRAWABLE_BUFFER (whatever those are) drawables and only look up privates for the supported drawable types. The rest of the the code can continue pretending there's only output windows and pixmaps, which are the only kinds of drawables relevant for DRI2. Fixes server crash with GLX compositing managers such as compiz or kwin, due to looking up a window private for a pixmap and getting a bogus pointer. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-10DRI2: Don't return junk reply instead of blocking in glXWaitForSbcOML()Mario Kleiner3-21/+8
DRI2WaitSBC() didn't block if requested targetSBC wasn't yet reached. Instead it returned a xreply with uninitialized junk return values, then blocked the connection until targetSBC was reached. Therefore the client didn't block, but continued with bogus return values from glXWaitForSbcOML. This patch fixes the problem by implementing DRI2WaitSBC similar to the clean and proven DRI2WaitMSC implementation. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov78-339/+339
This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-10xfree86: Add MatchOS InputClass entry for operating system matchingDan Nicholson5-0/+62
Allow InputClass sections to match against the running operating system to narrow the application of rules. An example where this could be used is to specify that the default input driver on Linux is evdev while it's mouse/kbd everywhere else. The operating system name is the same as `uname -s`, and matching is case-insensitive. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-10xfree86: Refactor InputClass matching codeDan Nicholson1-51/+66
InputClassMatches was starting to get a little hairy with all the loops over the tokenized match strings. This adds code, but makes it easier to read and add new matches. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Jamey Sharp <jamey at minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>