summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2010-04-27Delete redundant scrnum field from Xvfb private screen-info struct.Jamey Sharp1-4/+2
The screen number can be inferred from the position in the vfbScreens array, and it was only used in two places, so it was hardly important. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-04-27Track screens' installed colormaps as screen privates.Jamey Sharp2-23/+22
Several DDXes allow each screen to have at most one (or in some cases, exactly one) installed colormap. These all use the same pattern: Declare a global-lifetime array of MAXSCREENS ColormapPtrs, and index it by screen number. This patch converts most of those to use screen privates instead. Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-04-26xf86: Don't crash when switching modes through RandR without owning the VT.Pierre-Loup A. Griffais1-2/+2
While VT-switched, FB access is disabled and should remain so. Trying to switch modes in that state would re-enable it, potentially causing crashes if trying to access it before the driver has recovered from the mode switch. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-21xfree86: fix not reached code in fi1236 driver from i2cTiago Vignatti1-4/+0
This issue was introduced in the first dump of the code in 2004. I haven't check what's the correct fix for it so I simply kept the behaviour of someone calling this and removed the unreachable code. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-21Merge remote branch 'vignatti/for-keith'Keith Packard5-23/+7
Conflicts: exa/exa.c Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-21Xvfb: Usage message typo fix.Keith Packard1-1/+1
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-21Restore some unused win32 debug code accidentally removed with unifdefKeith Packard2-0/+13
unifdef found some code covered by which it decided to remove. This patch simply restores that in case someone wants it back. Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-21xfree86: fix not reached code in tty codeTiago Vignatti1-5/+0
CLEARRTS_SUPPORT cannot be triggered at all. Notice that mouse driver manual page states the support for it though. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-21xfree86: check for NULL pointer before dereferences it in parser codeTiago Vignatti1-2/+5
Seems to be harmless. Meh. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-04-21xfree86: fix not reached code in parserTiago Vignatti1-2/+2
...because Error is a macro that returns NULL. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-04-21Death to Multibuffer extensionTiago Vignatti2-14/+0
The rationale behind is because no sane application will use this when we have modern APIs such DRI2. Besides, as a fact, xfree86 server has already deprecated this extension in 1998: http://www.xfree86.org/3.3.6/isc7.html Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-04-19unifdef -B -DRENDER to always include RENDER codeKeith Packard30-160/+1
This patch was created with: git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-18Merge remote branch 'whot/for-keith'Keith Packard1-4/+4
2010-04-16DRI2: Track DRI2 drawables as resources, not privatesKristian Høgsberg2-123/+38
The main motivation here is to have the resource system clean up the DRI2 drawable automatically so glx doesn't have to. Right now, the glx drawable resource must be destroyed before the X drawable, so that calling DRI2DestroyDrawable doesn't crash. By making the DRI2 drawable a resource, GLX doesn't have to worry about that and the resource destruction order becomes irrelevant. https://bugs.freedesktop.org/show_bug.cgi?id=26394 Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-16xf86ScaleAxis: support for high resolution devicesBenjamin Tissoires1-4/+4
High resolution devices was generating integer overflow. For instance the wacom Cintiq 21UX has an axis value up to 87000. Thus the term (dSx * (Cx - Rxlow)) is greater than MAX_INT32. Using 64bits integer avoids such problem. Signed-off-by: Philippe Ribet <ribet@cena.fr> Signed-off-by: Benjamin Tissoires <tissoire@cena.fr> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-15Merge remote branch 'whot/for-keith'Keith Packard1-0/+6
2010-04-16vfb: add a name and type to the pointer and keyboardJulien Cristau1-0/+6
Fixes a crash in XIQueryDevice which calls strlen on a NULL pointer. #0 strlen () at ../sysdeps/x86_64/strlen.S:31 #1 0x00000000004c16ed in SizeDeviceInfo (dev=0x969bd0) at ../../Xi/xiquerydevice.c:204 #2 0x00000000004c1a01 in ProcXIQueryDevice (client=0xa57510) at ../../Xi/xiquerydevice.c:98 Debian bug#575905 <http://bugs.debian.org/575905> Reported-by: "Bernhard R. Link" <brlink@debian.org> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-15XQuartz GLX: Don't let garbage enter our pixel requestJeremy Huddleston1-1/+1
https://bugs.freedesktop.org/show_bug.cgi?id=27654 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-15XQuartz: Localization updateJeremy Huddleston73-1177/+4563
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-12Merge remote branch 'jeremyhu/master'Keith Packard12-1186/+877
2010-04-11XQuartz: Add a GUI preference for the Alt / Mode_switch toggleJeremy Huddleston3-1084/+712
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Kevin Van Vechten <kvv@apple.com>
2010-04-11XQuartz: Customize the NSDefaults id in the man file.Jeremy Huddleston2-19/+21
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Kevin Van Vechten <kvv@apple.com>
2010-04-11XQuartz: Add a defaults option to toggle Alt / Mode_switchJeremy Huddleston9-64/+104
See option_sends_alt in Xquartz(1) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Kevin Van Vechten <kvv@apple.com>
2010-04-11XQuartz: Blacklist some oddball legacy Mac keycodes that break wineJeremy Huddleston1-20/+41
http://xquartz.macosforge.org/trac/ticket/295 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Kevin Van Vechten <kvv@apple.com>
2010-04-11xfree86: Fix priority ordering for ignoring input classesDan Nicholson1-7/+12
Commit 8736d112afb0dd61dfdaadd6378eafd200b2ef5f changed the priority ordering of the InputClass option merging to be "last match wins". This fixes the handling of Option "Ignore" to follow that logic. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-04-07Merge remote branch 'whot/for-keith'Keith Packard5-33/+73
2010-04-08xfree86: remove dead input drivers from xorg.conf man page.Peter Hutterer1-9/+0
These drivers have been deactivated for over a year now, let's not refer potential users to them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08xfree86: Search for a system xorg.conf.dDan Nicholson2-2/+22
In addition to the conf files found in /etc/X11 or $sysconfdir/X11 used for local administration, we also reserve a system directory for vendor and package usage. The simple search path is: /usr/share/X11/xorg.conf.d $datadir/X11/xorg.conf.d Files from these directories will have the lowest config priority. The directory $datadir/X11/xorg.conf.d is exported from xorg-server.pc in the variable "sysconfigdir". Packages should install their .conf files to the directory specified by: `pkg-config --variable=sysconfigdir xorg-server` Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08xfree86: Set a saner search path for xorg.conf.dDan Nicholson2-30/+8
There's no reason to carry all the oddities from xorg.conf like appended hostname to the search path for xorg.conf.d. This changes it to something very simple: /etc/X11/<cmdline> $sysconfdir/X11/<cmdline> /etc/X11/xorg.conf.d $sysconfdir/X11/xorg.conf.d Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08xfree86: Document how -configdir affects the xorg.conf.d search pathDan Nicholson1-1/+35
Explain the "safe" path dance for -configdir, too. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08xfree86: Allow adding sysconfdir and datadir to config search pathsDan Nicholson2-1/+17
We could just use $projectroot/etc and $projectroot/share, but the user might have other plans for them. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-08Don't keep a pointer to a possibly freed cursor when changing screens, ↵Pierre-Loup A. Griffais1-0/+1
preventing a crash in xf86CursorEnableDisableFBAccess() trying to restore it. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-07Convert x86emu fixed size int typedefs to use stdint typesAlan Coopersmith1-33/+9
Fixes x86emu builds when using non-gnu compilers now that u64 is required Before this fix, the u64 type would not be defined, causing x86emu/sys.c to fail to build: "sys.c", line 102: syntax error before or at: ldq_u "sys.c", line 102: syntax error before or at: * Since Keith requested using <stdint.h>, converted all the x86emu typedefs to use the stdint types. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-06Merge remote branch 'jbarnes/master'Keith Packard3-57/+134
2010-04-02xfree86: die gracefully in the vga arbiter if AddScreen failsTiago Vignatti1-0/+2
vga arbiter will be locked in one device while AbortDDX will call LeaveVT routines from the other device. Fail! Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-01Bump bundle version to 2.5.1Jeremy Huddleston1-2/+2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01darwin: Correct inline assembly for ___crashreporter_info__Jeremy Huddleston1-1/+1
It was missing an underscore. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-29Remove now obsolete function chooseVideoDriverRuediger Oertel1-25/+0
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-29xfree86: Handle driver autoconfiguration when .conf files existRuediger Oertel1-6/+82
When doing driver autoconfiguration with some parts of the config file present but no driver set (e.g. only input configuration) fix the case that we may have multiple drivers to try. Create a screen section for each driver and let them be tried in a row. Signed-off-by: Ruediger Oertel <ro@suse.de> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Timo Aaltonen <timo.aaltonen@aalto.fi> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-29Merge remote branch 'jeremyhu/master'Keith Packard5-17/+19
2010-03-29Merge remote branch 'whot/for-keith'Keith Packard2-10/+1
2010-03-29GLX/DRI2: expose swap control extensions if DDX support is presentJesse Barnes2-0/+10
Export DDX swap control status from the DRI2 module and check for it in GLX when initializing extensions. Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29DRI2: prevent swap wakes from waking MSC waitersJesse Barnes2-11/+27
If a few swaps were queued leading to a throttle related block on the client, and then the client submitted an MSC wait, one of the previous swap wakeups could have caused the MSC wait to complete early. Add a flag for this to prevent a swap wake from prematurely waking an MSC waiter. Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29DRI2: handle swapsPending betterJesse Barnes1-1/+2
Avoid a potential swapsPending underflow by incrementing it before ScheduleSwap, which may complete it immediately. And be sure to decrement it again in case the schedule failed. Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29DRI2: throttle swaps at submission time tooJesse Barnes1-0/+7
We need to throttle swaps here in addition to when the context is made current to avoid causing problems with clients that just swap. Throttling here also ensures our swaps get ordered as long as we block the client occasionally. Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29DRI2: advertise lowest supported DRI2 protocol versionJesse Barnes3-2/+17
Update our supported DRI2 protocol version as each driver does DRI2ScreenInit, since depending on available kernel features, each DDX may support different callbacks and therefore protocol. Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29DRI2: handle swap_interval of 0 correctlyJesse Barnes1-2/+2
A 0 swap interval means that swaps shouldn't be sync'd to vblank, so just complete the swap immediately in that case. Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29DRI2: drawable lifetime fixesJesse Barnes1-12/+22
Handle drawable destruction and lifetime correctly. Check whether the drawable priv is valid in DRI2SwapInterval(), DRI2WaitSBC() and DRI2WaitMSC(); it may have gone away, so be sure to check it before using it. If more than 1 outstanding swap is queued, we may complete several after an app has exited. If we free it after the first one completes and the refcount reaches 0, we'll crash the server on subsequent completions. So delay freeing until all swaps complete and remove the error message as this is a normal occurence. To do this properly, we must also avoid destroying drawables in DRI2DestroyDrawable() if a swap or wait event is pending. And finally, make sure we free drawables in DRI2WaitMSCComplete() if necessary (i.e. if the refcount has reached 0 and this MSC was the last pending event on the object). Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29DRI2: fix swapbuffers handling of SBC and target MSCJesse Barnes1-4/+18
Returns expected SBC after completion of swap to caller, as required by OML_sync_control spec, instead of the last_swap_target value. Passes target_msc, divisor, remainder, correctly for glXSwapBuffersMscOML() call, while retaining old behaviour for simple glXSwapBuffers() call. An OML swap can have a 0 target_msc, which just means it needs to satisfy the divisor/remainder equation. Pass this down to the driver as needed so we can support it. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-03-29DRI2WaitSbc(): Fixes for correct semantic of glXWaitForSbcOML()Mario Kleiner1-2/+23
Added implementation for case target_sbc == 0. In that case, the function shall schedule a wait until all pending swaps for the drawable have completed. Fix for non-blocking case. Old implementation returned random, uninitialized values for (ust,msc,sbc) if it returned immediately without scheduling a wait due to sbc >= target_sbc. Now if function doesn't schedule a wait, but returns immediately, it returns the (ust,msc,sbc) of the most recently completed swap, i.e., the UST and MSC corresponding to the time when the returned current SBC was reached. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>