Commit Graph

4834 Commits

Author SHA1 Message Date
Jamey Sharp
af2a94e12f VGA arbiter: No need for arbitration around CreateGC.
None of XAA, EXA, or UXA do any hardware access during CreateGC, so they
don't need VGA arbitration. I haven't found any open source drivers that
hook CreateGC, so they're safe. I'd be surprised if any driver directly
hooks CreateGC and does hardware access from it and needs VGA
arbitration.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-13 15:58:08 -07:00
Jamey Sharp
2e8069dd36 xnest: Replace use of Colormap->devPriv with standard devPrivates.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
34d6492436 xquartz: Delete compile-time-constant DRIGCRec.driOps field.
The driOps field of this structure is never set to anything but
&driGCOps, and this structure is not visible outside this source file.
Just use the constant in the one place the field was used.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
bbbf795e6b Delete redundant GC initializations.
When a GC is allocated, it is zeroed, including all storage requested
with dixRegisterPrivateKey. So CreateGC hooks don't need to initialize
anything to zero.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
3288232f3d Delete xaaWrapper.
This was part of "An experimental pseudocolor emulation layer. Not fully
completed, currently only works for 16bpp." Only neomagic tried to use
it, and that was neutered by the removal of the fbpseudocolor portion of
that emulation layer; the rest is easily removed.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
f856dcdc3a Delete unused lastWinOrg field from GCs.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-13 15:55:17 -07:00
Jamey Sharp
b218402436 Delete unused devPrivate field from GCFuncs and GCOps.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
e99bbfa0a2 dmx: Delete '#undef Xmalloc' and friends.
Nothing in dmx uses these names any more, and it builds cleanly without
trying to undef them.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13 15:55:16 -07:00
Jamey Sharp
b5217bfdca dmx: __glXMalloc -> malloc, etc.
Kristian made equivalent edits to the reference GLX implementation in
2006, with commit 2d2d38d17c.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13 15:55:16 -07:00
Jamey Sharp
a715de7f11 dmx: Delete unused GLX visual matching code.
Kristian deleted this API from the rest of the server in 2007, in commit
7d74690536.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2010-09-13 15:55:16 -07:00
Jeremy Huddleston
0a3e6b0345 XQuartz: Localization updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-11 14:25:21 -07:00
Tiago Vignatti
63b7d9448a xfree86: fbdevhw: remove unnecessary debug code
It very likely no one will want to print all functions of this file for
debugging purposes. If this is the case, then a mix of ctags + cpp + gdb
can do the same job.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-10 21:49:29 +03:00
Tiago Vignatti
66105d8281 xfree86: fbdevhw: remove unused cmap fields from main structure
It was never used since first git revision and probably no one cares for it.

ABI break.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-10 21:49:29 +03:00
Tiago Vignatti
a9e6080dc9 os/xfree86: remove macro checking for POSIX symbols
We assume already that our X implementation is POSIX compliant anyway. So
remove those redundant checking.

SA_SIGINFO is left there.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-09-10 21:49:28 +03:00
Keith Packard
bbffb85461 Merge remote branch 'whot/for-keith' 2010-09-10 11:55:34 -07:00
Keith Packard
ca0d578d29 Merge remote branch 'mattst88/master' 2010-09-10 11:50:27 -07:00
Keith Packard
fa22f97af6 Merge remote branch 'vignatti/vgaarb-fixes' 2010-09-10 11:47:41 -07:00
Aaron Plattner
6edbdb7f9e Tag sdksyms.c entries with source file and line number
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-10 11:45:03 -07:00
Thomas Hellstrom
71972c2534 linux: Don't lose console events on non-evdev drivers (#29969)
The drain_console() function will race with new keyboard events being added
by the hardware causing the server to lose keyboard events if the console fd
is used for input.

Only use the drain_console() when AllowEmptyInput is off which is the best
indicator we have for whether the keyboard driver will be used. This patch
will only fix the bug when hotplugging is disabled.
What we really need is a way to figure out either whether we're _not_ using
the keyboard driver (not predictable) or a way for the keyboard driver to
disable drain_console().

X.Org Bug 29969 <http://bugs.freedesktop.org/show_bug.cgi?id=29969>

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-09 10:53:34 +10:00
Peter Hutterer
e00e2e7b68 xfree86: Check for existence of button class before dereferencing it.
The Irxon Super Mini Bluetooth Wireless Keyboard for PC/PDA/Cell Phones
keyboards have axes but not buttons. The evdev driver doesn't set up a
button class for these keyboards and a motion event handled by
DGAProcessPointerEvent dereferences the dev->button NULL pointer, causing a
server crash.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-09-06 13:13:42 +10:00
Jesse Adkins
4a12aecac6 xfree86: Document terminate not mapped by default (bug 25083)
Document that terminate is not mapped to Ctrl+Alt+Backspace by default, to help alleviate some confusion.

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-09-01 14:44:40 +10:00
Peter Hutterer
3cc5e44224 xfree86: fix compiler warning about implicied decl of DuplicateModule.
../../../../hw/xfree86/common/xf86Xinput.c: In function ‘xf86AllocateInput’:
../../../../hw/xfree86/common/xf86Xinput.c:722: warning: implicit
declaration of function ‘DuplicateModule’
../../../../hw/xfree86/common/xf86Xinput.c:722: warning: nested extern
declaration of ‘DuplicateModule’
../../../../hw/xfree86/common/xf86Xinput.c:722: warning: assignment makes
pointer from integer without a cast

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 14:43:14 +10:00
Matt Turner
08adf41f63 Replace malloc/strlen/strcpy with strdup.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:05:48 -04:00
Jesse Adkins
ea239112b0 xfree86: Purge parsePrologueVoid.
This was included in the original commit, and then never used.

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:05:43 -04:00
Jesse Adkins
b25fb9fe99 xfree86: Removed unused messages from Configint.h
AUTOREPEAT_MSG, MOVED_TO_FLAGS_MSG, and XLEDS_MSG made obsolete by
 81913a1291 Jul 21 2006 (remove undead files from master)
UNDEFINED_DEVICE_MSG made obsolete by
 6033d8150b Oct 9 2007 (first pass at video driver autoloading)

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:05:39 -04:00
Jesse Adkins
18b62e0479 xfree86: Fix leaks in OpenConfigFile and OpenConfigDir
[mattst88: fixed whitespace and a missing semicolon]

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:05:35 -04:00
Jesse Adkins
4f04fd595e xfree86: Simplify xf86Msg{,Verb}
Previously, the functions would call xf86VDrvMsgVerb with a screen of -1
 despite their comments saying they were for "non-driver messages".
They now call LogVMessageVerb, which is what xf86VDrvMsgVerb does anyway
 when it has a screen == -1.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:04:45 -04:00
Jesse Adkins
f49473abfd xfree86: Remove prototypes for non-existant functions.
This was obsolete from 9a0f25de7c "Static cleanups, dead code deletion." (server 1.3).

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:04:39 -04:00
Jesse Adkins
747bf5fe80 xfree86: Remove comments about unable to use malloc.
These are leftovers from when X still used Xmalloc and friends for allocation.
Now that those are gone, these comments are just confusing.

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:04:25 -04:00
Tiago Vignatti
6546665293 xfree86: vgaarb: fix device decoding interface to send resources type properly
Right now, when there is more than one vide card on the machine, we're
adopting a pessimistic approach and setting all cards to decode VGA legacy
address.

Some cards may want to skip the arbitration and the only way to do so is
through pci_device_vgaarb_decodes. Therefore, send the desired kind of
resource instead force the worst case.

Note that xf86VGAarbiterDeviceDecodes is not being used so far by any
open-source driver. Even so, API break.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2010-08-26 18:17:12 +03:00
Tiago Vignatti
7fbf3e7cf4 xfree86: vgaarb: remove useless macro
This was inherited from RAC and was never used there either.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-08-26 18:16:59 +03:00
Tiago Vignatti
ad698dd5bc xfree86: vgaarb: remove superfluous and confusing VGAGet_GC and VGAPut_GC
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-08-26 18:16:33 +03:00
Tiago Vignatti
c0aed4c99b xfree86: vgaarb: change macros by inline functions to ease debug
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-08-26 18:16:05 +03:00
Chris Wilson
951605b466 edid: Adjust rounding of max_clock
A simple hack to accommodate various EDID who have detailed modes that
exceed the EDID's max pixel clock. The pixel clock is only defined in
units of 10MHz and often appears as the maximum pixel code of the
detailed modes, rounded to the nearest 10MHz. Adjusting the max_clock to
include an extra 5MHz prevents the parser from rejecting the detailed
modes.

The kernel uses the same fuzz and by including it in X we can use the
same modes in X as for the console.

Fixes:

  Bug 23833 - X uses different refresh rate to that set by kernel module
  https://bugs.freedesktop.org/show_bug.cgi?id=23833

In the future, we will want to try harder to keep the KMS modes but at
the same time we need to apply the restrictions as specified by the
user's configuration, and need to fill in modes for fullscreen games on
fixed-mode panels.

Reported-and-tested-by: Fabio Pedretti <fabio.ped@libero.it>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-08-20 08:55:05 -07:00
Jeremy Huddleston
5d1d9d9ae3 XQuartz: xpr: Bail on errors during unlock and destroy
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12 20:26:36 -10:00
Jeremy Huddleston
ee7fd8fc58 XQuartz: UpdateScreen at the end of SetRootless
This will ensure that pRoot is unlocked after the miPaintWindow

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12 20:26:36 -10:00
Jeremy Huddleston
4fc4cab98d XQuartz: Make application switching work better for the no-spaces case
We still have the issue with not raising the frontmost window for the case
when spaces is enabled, and the AppleSpacesSwitchOnActivate preference is
disabled.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12 20:26:36 -10:00
Jeremy Huddleston
e5bc62a032 XQuartz: Ignore kXquartzToggleFullscreen when rootless
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12 20:26:36 -10:00
Alan Coopersmith
b5cf9c5090 Stop checking or calling PtrCtrlProcs
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-13 15:24:51 +10:00
Jesse Adkins
bce12f2956 xfree86: parser: Never use constant strings for driver names (fixes #17438)
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-13 11:43:18 +10:00
Jon TURNEY
fbd0204679 Cygwin/X: Fix glxWinCreateDrawable() for API change
Commit 9de0e31746 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-10 09:29:39 -07:00
Matt Turner
7e0575baf1 ddc: Fix memory leak in GetEDID_DDC1
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-08-01 22:48:21 -04:00
Jeremy Huddleston
750d4e82a0 XQuartz: xpbproxy: Don't take down the whole server on an IO error
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-29 11:41:32 -07:00
Jeremy Huddleston
98f90145d7 XQuartz: GLX: Don't mangle __GLXDrawable's pDraw
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 f0006aa58f
The root cause of this change was  fed7ccc481ad1caaa518cafe944c2327a5d0b6c65

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-07-28 18:11:38 -07:00
Alan Coopersmith
44c9350d72 Use DocBook stylesheets from xorg-sgml-doctools if they're available
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-23 12:41:25 -07:00
Keith Packard
0fc02c0bf9 Merge remote branch 'jeremyhu/master' 2010-07-13 15:05:36 -07:00
Keith Packard
d75e8146c4 Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998
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 68a9ee8370.

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-13 09:58:04 -07:00
Jeremy Huddleston
9d8ec712a6 XQuartz: Bump bundle version to 2.6.0 for xorg-server-1.9.0 and X11R7.6
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-07-13 08:56:36 -07:00
Jan Hauffa
b2b9c458a4 XQuartz: Remove some dead code.
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-13 08:27:36 -07:00
Jeremy Huddleston
648d189548 XQuartz: Avoid a crash when mistakenly free()ing in QuartzSetCursor on some configs
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-07-13 08:27:36 -07:00