Commit Graph

5114 Commits

Author SHA1 Message Date
Keith Packard
8b35118c03 Replace huge argument list in xf86CrtcSetModeTransform with struct
xf86CrtcSetModeTransform was starting to get ridiculous with 6
arguments, this change has it take a single structure that contains
all of those values along with a set of flags that says which have
changed.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:18 -08:00
Keith Packard
f5b8bd620f Merge remote branch 'jajones/for-keith' 2010-12-06 19:51:06 -08:00
Keith Packard
01e9fa7da3 Merge remote branch 'whot/for-keith' 2010-12-06 19:45:11 -08:00
Keith Packard
c4a7a5917a Merge remote branch 'jeremyhu/master' 2010-12-06 19:28:07 -08:00
Keith Packard
5de312a60d Merge remote branch 'alanc/master' 2010-12-06 19:22:52 -08:00
James Jones
397dfd9f87 Create/Destroy/Trigger/Reset/Query Fence Sync objs
Initial server side implementation of fence sync
objects.  Allows creation, management, and state
queries of binary state objects.  Currently they
are not very useful as there is no way to wait for
them efficiently.

The basic trigger operation added here triggers
relative to a given X screen's rendering operations.
To perform this operation, fence sync objects must
be tied to a screen.  As Aaron Plattner pointed out,
screens are identified but a drawable in X protocol,
so a drawable argument is included in
XSyncCreateFence().  The screen also could have been
specified as part of the trigger operation.  However,
it is also desireable to associate a screen with
fence sync objects at creation time so that the
associated screen's driver can allocate any HW-
specific resources needed by the fence object up
front.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:15:38 -08:00
James Jones
1c4a0db2c6 Add fence sync driver interface
-Add fence sync objects

-Add fence sync devPrivates

-Add a X sync module screen private

-Add wrappable functions to create and destroy
 fence sync objects

-Give fence sync objects wrappable functions to
 trigger, test, and reset their 'triggered' value.

-Give fence sync objects wrappable functions to
 notify driver when adding/removing triggers to/
 from the sync object.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:15:26 -08:00
Peter Hutterer
68a1b0de95 xfree86: use xf86AllocateInput() for xorg.conf devices too.
Single allocation point for input devices, most notably a single point to
reset default values.
Without this patch, the file descriptor default was -1 for hotplugged
devices and 0 for config devices. Drivers that don't overwrite the default
themselves would thus fail if configured in the xorg.conf.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-12-07 11:37:31 +10:00
Peter Hutterer
beea2378f1 xfree86: don't overwrite option list (#32115)
Options set in the configuration file were unconditionally overwritten by
the server. Merge the already existing options and the new options together
instead of just overwriting ones.

Introduced in commit 2199842ed5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Sep 2 10:52:54 2010 +1000

    xfree86: remove extraOptions field from IDevRec.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: David Ronis <ronis@ronispc.chem.mcgill.ca>
2010-12-07 08:09:10 +10:00
Peter Hutterer
8f3fa8fb0b xfree86: add option "Floating", deprecate SendCoreEvents and friends.
Some devices should be initialised as floating from the start (e.g.
Joysticks and accelerometers benefit from this). Currently users use the
"SendCoreEvents" "off" flag for this, which isn't the most appropriate
naming.

Add an option "Floating", deprecate the others. Still parsed and handled by
the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-07 08:08:15 +10:00
Jeremy Huddleston
714b68d9e5 XQuartz: RandR: Fix mode changing for multi-monitor configurations.
This just fixes the regression whereby we couldn't switch between the legacy
fullscreen mode and rootless on multi-monitor configurations.  This was
happening because ref wasn't being set in these cases (since we don't ever
actually change CG modes), so we failed a CFEqual.  Setting the references
fixes this regression and places us one step closer to more mode RandR
mode switching in multi-monitor configurations.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 17:30:53 -08:00
Jeremy Huddleston
14f00449eb XQuartz: Cleanup some compiler warnings
Mark __crashreporter_info__ as __attribute__((__used__))

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 16:46:45 -08:00
Jeremy Huddleston
14aec8b82a XQuartz: Remove one more backing store leftover
See: c4c4676e68

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 16:46:44 -08:00
Jeremy Huddleston
ca431371a2 XQuartz: Disable the Mac OS X screensaver when in full screen mode
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 16:23:04 -08:00
Keith Packard
3824417335 Merge remote branch 'vsyrjala/xv_reput' 2010-12-02 08:39:33 -08:00
Cyril Brulebois
279ef1ffd7 Fix screen number checks.
screenInfo.numScreens is not a valid screen number, they go from 0 to
numScreens - 1.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-01 10:33:57 -08:00
Julien Cristau
8684543021 DGA: fix screen number check
screenInfo.numScreens is not a valid screen number, they go from 0 to
numScreens - 1.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-01 10:33:52 -08:00
Alan Coopersmith
685286b17d FindModuleInSubdir: Stop allocating one more byte than needed
15ac25627e removed the "/" from the sprintf strings,
but failed to remove the extra byte allocated for the '/'.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-30 16:25:22 -08:00
Alan Coopersmith
40d5a01935 xf86VIDrvMsgVerb: print args, not format string
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-30 16:25:22 -08:00
Alan Coopersmith
4bbc90cd8b xf86AutoConfig: make copyScreen memory allocation & error handling more sane
No point calling the no-fail-alloc if you check for failure and your
only caller checks for failure.

No point calling calloc to zero fill memory you're about to memcpy over.

In the unlikely event of a loss of memory allocation, drop your previous
allocations before returning to others.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-11-30 16:25:22 -08:00
Alan Coopersmith
2c8e534c8e xf86ValidateModes: xnfalloc(strlen) + strcpy => xnfstrdup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-30 16:25:10 -08:00
Alan Coopersmith
29e467a1f1 xf86OutputRename: Replace another strlen/malloc/strcpy set with strdup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-11-30 16:18:35 -08:00
Alan Coopersmith
d346bc3083 Fix compiler warnings in hw/xfree86/os-support/solaris
sun_init.c: In function `xf86OpenConsole':
sun_init.c:99: warning: cast does not match function type
sun_init.c:74: warning: unused variable `FreeVTslot'
sun_init.c: In function `xf86UseMsg':
sun_init.c:417: warning: old-style parameter declaration

sun_vid.c: In function `solUnMapVidMem':
sun_vid.c:162: warning: long unsigned int format, pointer arg (arg 6)
sun_vid.c: In function `xf86ReadBIOS':
sun_vid.c:217: warning: long unsigned int format, pointer arg (arg 5)
sun_vid.c:217: warning: long unsigned int format, int arg (arg 6)

sun_agp.c: In function `xf86EnableAGP':
sun_agp.c:321: warning: unsigned int format, CARD32 arg (arg 4)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-30 16:18:15 -08:00
Alan Coopersmith
d75777d54c Move xchomp inside #ifdef __linux__
static function only called from the matchDriverFromFiles function
that's inside #ifdef __linux__ section

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-11-30 16:17:58 -08:00
Keith Packard
02449ee24b Merge remote branch 'ajax/for-keithp' 2010-11-30 13:30:59 -08:00
Keith Packard
afd6eb66d5 Merge remote branch 'aplattner/for/keith' 2010-11-30 13:28:13 -08:00
Adam Jackson
5f34853d6f xfree86: Bump classic driver default to 1024x768
Signed-off-by: Adam Jackson <ajax@redhat.com>
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>
2010-11-30 13:24:23 -08:00
Adam Jackson
b85f9063c2 xfree86: Remove the xf8_16bpp overlay module
Only one (marginal) driver was using it, and it's been fixed to just
implement it directly.

v2: Also fix sdksyms.sh (spotted by Jesse Adkins)
v3: Also fix DESIGN.xml (spotted bu Julien Cristau)

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 14:26:58 -05:00
Adam Jackson
a861fe6a1c vbe: Refuse to believe tiny (or negative) panel sizes from PanelID
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:50:42 -05:00
Adam Jackson
1b3c57f075 xfree86: Remove unused xf86PixmapKeyRec
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:46:09 -05:00
Adam Jackson
c4c4676e68 dix: Remove the backing store leftovers
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:46:08 -05:00
Adam Jackson
48bc8d0dd9 render: repack PictureRec
Eliminate the unused dither field, move filter and stateChanges into the
bitfield, and reorder elements to pack holes on LP64.

sizeof(PictureRec)      ILP32       LP64
before:                    84        152
after:                     72        120

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:46:08 -05:00
Aaron Plattner
ffcbfa0063 xfree86: Fix rotation of 2-color non-interleaved cursor images
When RandR 1.2's transformation code is enabled, it rotates the cursor
image so that it appears upright on a rotated screen.  This code
completely mangles 2-color cursors on hardware where the the mask and
source images are not interleaved due to two problems:

1. stride is calculated as (width / 4) rather than (width / 8), so the
   expression (y * stride) skips two lines instead of one for every
   time y is incremented.
2. cursor_bitpos ignores the 'mask' parameter if the hardware doesn't
   specify any of the HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_* flags.

To fix this, refactor the code to pass the whole xf86CursorInfoPtr
through to cursor_bitpos and compute the correct stride there based on
the flags.  If none of the SOURCE_MASK_INTERLEAVE flags are set, use
the total cursor size to move the 'image' variable into the mask part
of the image before computing the desired byte pointer.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Tested-by: Cyril Brulebois <kibi@debian.org>
2010-11-30 10:31:43 -08:00
Adam Jackson
7ee965a300 linux: Refactor VT switch on {re,}generation and shutdown
This makes more things fatal than were fatal before, but that's correct;
if you need the VT, then failing to get it on regeneration means things
are about to go very very badly.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:28:28 -05:00
Adam Jackson
0def735c6a xfree86: Remove dead ifdefs from VT switching
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:28:28 -05:00
Adam Jackson
96a7a7d197 linux: Don't muck about with tty permissions
This is not X's job.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:28:28 -05:00
Adam Jackson
6ce1908ba4 xfree86: Remove os-support/sysv
Nothing's using it, the SysV derivatives we support have their own
custom versions.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:28:28 -05:00
Adam Jackson
01159ffc47 linux: Remove redundant variable
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:28:28 -05:00
Adam Jackson
a80780a763 glx: Remove swap barrier and hyperpipe support
Never implemented in any open source driver.  The implementation
assumed explicit DDX driver knowledge of how the client-side driver
worked, since at the time the server's GL renderer was not a DRI driver.
But now, it is, so any implementation of these should be done with
additional DRI driver API, like the swap control extension.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 12:54:47 -05:00
Ville Syrjälä
f4f41c812d xfree86/xv: Provide a ModeSet hook
Reput all ports when the display mode or panning has been changed by
RandR code. This makes the overlays appear in the correct position
on the screen.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:06 +02:00
Ville Syrjälä
640c8716e0 xfree86/modes: Provide a ModeSet hook in ScrnInfo
Add a new hook ModeSet that will be called after display mode is
changed, or after the display has been panned.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:06 +02:00
Ville Syrjälä
a942534ca3 xfree86/xv: Pass all coordinate arguments to ReputImage
Pass all of the src/dst coordinates to ReputImage so that drivers
don't necessarily have to do double bookkeeping.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
0fef4e9448 xfree86/xv: Document VIDEO_CLIP_TO_VIEWPORT incompatibility with reput
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
5f8ec1ade8 xfree86/xv: Add some helpful comments about ReputImage
Document the fact that ReputImage is used for stills as well as images.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
b4ebde23d2 xfree86/xv: Fix ReputImage clipping
PutImage/PutStill respect the GC clip, however ReputImage does not.
PutImage/PutStill are supposed to be oneshot operations so ReputImage
should never expand the area covered by the clip, instead it should
only shrink if the window clip shrinks. So commandeer clientClip
into use by ReputImage and initially make it a copy of the original
GC composite clip. Whenever ReputImage needs reclipping update
clientClip with the newly calculated composite clip.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
7294236bdb xfree86/xv: Remove clipOrg from XvPortRecPrivate
clipOrg never changes except when clientClip changes, so instead of
keeping copies of both originals translate clientClip by clipOrg
immediately and just keep the translated clientClip.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
47d8bd0a99 xfree86/xv: Factor out the meat of xf86XVAdjustFrame for later reuse
No functional change.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
3d4d0237a3 xfree86/xv: Change the behaviour of AdjustFrame to reput everything
Also reput PutVideo/GetVideo ports in AdjustFrame. This makes the
overlay track the screen panning instead of staying stationary in the
wrong place.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
d794be8121 xfree86/xv: No need to free composite clip in AdjustFrame
Nothing should change in AdjustFrame that would need the composite clip
to be recomputed.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
6051c7e940 xfree86/xv: Change the behaviour of ClipNotify to reput instead of stop
When ClipNotify gets called for a visible window, reput instead of
stopping the port. This eliminates nasty overlay flickering that
happens during clip changes.

If the window is invisible or if ReputImage isn't supported stop
and remove the port from the window as was done before.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
27707ac5bd xfree86/xv: Allow xf86XVReputOrStopPort() to stop PutVideo/GetVideo ports
Modify xf86XVReputOrStopPort() to allow stopping of all types of ports.
Will be useful later.

No functional change.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
38987aae19 xfree86/xv: Factor out the meat of xf86XVWindowExposures for later reuse
No fucntional change.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
0178173f05 xfree86/xv: Eliminate two open coded copies of xf86XVRemovePortFromWindow
No functional change.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Ville Syrjälä
b02858b5af xfree86/xv: Remove useless NULL check from ClipNotify
WinPriv->PortRec should never be NULL as WinPriv itself would be removed
from the list when the port is removed from the window.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:05 +02:00
Keith Packard
4e0f8f666e Merge remote branch 'whot/for-keith' 2010-11-24 11:47:33 -08:00
Keith Packard
400ddf2f58 Merge remote branch 'jeremyhu/master' 2010-11-24 11:46:18 -08:00
Gaetan Nadon
7250f078c1 doc: refactor Makefile and xmlrules.in code for reusability
A different approach which requires less variables setting
and internal knowledge of the reused code.
Changing from "install" to "not install" is very easy now.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-24 11:44:35 -08:00
Gaetan Nadon
f33512b70c xmlrules.in: use $(top_srcdir) rather than ../../../ [...]
Relative paths don't always work in distcheck when srcdir not = builddir
include $(top_srcdir)/doc/xml/xmlrules.in

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-24 11:44:25 -08:00
Alan Coopersmith
504e3010e9 Xorg.man: Replace XDarwin reference with Xquartz
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-24 11:41:45 -08:00
Bill Nottingham
566d09a5cd xfree86: store the screen's gamma information on init.
This fixes a gamma issue on vt switch observed with KDM. VT switching away
and back would result in a black screen. Avoid this by storing the current
gamma information on init.

https://bugzilla.redhat.com/show_bug.cgi?id=533217

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>
2010-11-24 11:35:04 -08:00
Adam Jackson
c050aa2f5f xfree86: apply gamma settings on EnterVT.
When entering the VT, re-apply the saved gamma settings for each screen.

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>
2010-11-24 11:29:31 -08:00
Jeremy Huddleston
e074f745a8 XQuartz: Remove unused CloseInputDevice stub
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-24 01:47:16 -05:00
Peter Hutterer
b31df0439f xfree86: add missing linebreak in error message.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Magnus Kessler <Magnus.Kessler@gmx.net>
2010-11-24 08:47:00 +10:00
Jeremy Huddleston
97b9bb1e2c XQuartz: Localization Updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-22 20:44:11 -08:00
Jeremy Huddleston
f9fbafa1a0 XQuartz: Remove existing localization files on install to avoid conflicts
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-22 20:44:11 -08:00
Jeremy Huddleston
6eed13ad59 XQuartz dri: Don't check CoreGraphics version
The version check is hackish, and I highly doubt anyone using this code is on
a version of OS X that predates this support (10.2 has support for it).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-22 20:27:23 -08:00
Jeremy Huddleston
a4698754c1 XQuartz: Add pointer debugging
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-22 19:14:51 -08:00
Adam Jackson
a6b9e8f1e5 linux: Fix CPU usage bug in console fd flushing
If the vt gets a vhangup from under us, then the tty will appear ready
in select(), but trying to tcflush() it will return -EIO, so we'll spin
around at 100% CPU for no reason.  Notice this condition and unregister
the handler if it happens.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-19 11:11:04 +10:00
Keith Packard
38c46ccf79 Merge remote branch 'whot/for-keith' 2010-11-15 09:06:33 +08:00
Keith Packard
3051dd5135 Merge remote branch 'jeremyhu/master' 2010-11-15 08:58:02 +08:00
Keith Packard
ed547a9fc8 Merge remote branch 'adkins/master' 2010-11-15 08:51:27 +08:00
Cyril Brulebois
c8998af3eb xfree86: Initialize Pointer and Keyboard.
That helps us get rid of:
|   CC     xf86Config.lo
| xf86Config.c: In function ‘T.174’:
| xf86Config.c:1228: warning: ‘Pointer$module’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$module’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$drv’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$drv’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$type_name’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$type_name’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$private’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$private’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$dev’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$dev’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$fd’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$fd’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$set_device_valuators’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$set_device_valuators’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$switch_mode’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$switch_mode’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$control_proc’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$control_proc’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$read_input’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$read_input’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$device_control’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$device_control’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$flags’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$flags’ was declared here
| xf86Config.c:1228: warning: ‘Pointer$next’ may be used uninitialized in this function
| xf86Config.c:1097: note: ‘Pointer$next’ was declared here

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-15 07:44:12 +10:00
Jon TURNEY
98abac809a Fix compilation after input API change
Fix compilation after commit 675f4a8525
converts winmouse.c to the new ValuatorMask input API, but doesn't
include the required header inpututil.h

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-15 07:39:11 +10:00
Jeremy Huddleston
c5975722a9 XQuartz: Fix make distcheck
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2010-11-14 10:25:58 -08:00
Jeremy Huddleston
965e709f2b XQuartz: Build-fixes for XQuartz for recent input API changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-12 11:49:49 +10:00
Peter Hutterer
fa50670c32 xfree86: rename allowEmptyInput to forceInputDevices.
This is a more accurate name for the actual functionality than
allowEmptyInput. Historically, allowEmptyInput has allowed the server to
start with no input devices. Since 1.4 and the introduction of VCP and VCK,
there are always two input devices present.

allowEmptyInput was changed in behaviour to essentially "ignore xorg.conf
devices or not", auto-adding the built-in devices if disabled.

Rename to forceInputDevices, because that's essentially what it does. When
disabled (i.e. when hotplugging is enabled), it disables all
mouse/kbd/vmmouse devices configured in the xorg.conf file.
When enabled, it forces the traditional behaviour for input devices:
- use input devices configured in the server layout
- if none are configured, use the first pointer and the first keyboard
  device in the xorg.conf
- if none are configured, create the default pointer/keyboard devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-12 11:49:48 +10:00
Jesse Adkins
23e329b564 xfree86: parser: Remove 'CUSTOM' flag option in Monitor section.
Not used in the initial import, and also not documented.

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-11-10 21:35:58 -08:00
Peter Hutterer
88cb61e1e5 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-api
Conflicts:
	dix/getevents.c
	hw/xfree86/common/xf86Xinput.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 12:54:46 +10:00
Keith Packard
4ed4915bc0 Merge remote branch 'whot/for-keith' 2010-11-10 16:58:21 -08:00
Peter Hutterer
ec1bfbc669 xfree86: remove user-configured AllowEmptyInput
An estimated 100% (rounded down to the nearest percent) of the people who
have this in their configuration don't actually know what this option does.
Protect the users from themselves.

IIRC, AEI on was useful for some time between 1.4 and 1.5 and never since.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-11-11 10:26:46 +10:00
Keith Packard
c9c0f93f8e Merge remote branch 'whot/for-keith' 2010-11-10 16:11:29 -08:00
Keith Packard
73f6de1ad8 Merge remote branch 'sandmann/fbdelete' 2010-11-10 16:02:22 -08:00
Eric Anholt
f36153e3ef Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.
In all these cases, any rendering implied by this damage has already
occurred, and we want to get the damage out to the client.  Some of
the DamageRegionAppend calls were explicitly telling damage to flush
the reportAfter damage out, but not all.

Bug #30260. Fixes the compiz wallpaper plugin with client damage
changed to reportAfter.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10 15:51:03 -08:00
Luc Verhaegen
cc2c73ddcb x86emu: fix jump_near_IMM to handle DATA: flag correctly.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24348

Before (data flag ignored -> broken):
66                  DATA:
e944f1              JMP       1ff6

After (fixed):
66                  DATA:
e944f1ffff          JMP       00001ff8

This subtle difference in the length of decoded instruction meant
that the VBE call jumped to the routine setting AX=0x14F (VBE Failed)
instead of the routine that set AX=0x4F (VBE success).

The ability to run the same code in vm86 significantly aided the
debugging of this issue. Those X.org developers who would like to drop
vm86 better take special care towards _all_ vesa bugs, as those will
expose further issues.

Patch applies easily to even xserver 1.4.2.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Tested-by: Luc Verhaegen <libv@skynet.be>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10 14:56:57 -08:00
Samuel Thibault
a6c64d9645 Do not trap access to timer and keyboard
Disable timer/keyboard trapping on GNU/Hurd for now

Trapping disabled for now, as some VBIOSes (mga-g450 notably) use these
ports, and the int10 wrapper is not emulating them.

It's effectively what happens in the Linux variant too, as iopl() is used there,
making the ioperm() meaningless.

Signed-off-by: Olaf Buddenhagen <antrik@users.sf.net>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10 14:42:44 -08:00
Pauli Nieminen
383dfe23f1 DRI2: Avoid call to NULL pointer
DDX driver may implement schedule swap without GetMSC. In that case we
can't call GetMSC in DRI2SwapBuffers.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
CC: Keith Packard <keithp@keithp.com>
CC: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10 14:38:09 -08:00
Cyril Brulebois
68e4a628d6 Remove more superfluous if(p!=NULL) checks around free(p).
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
- if (E != NULL) {
-   free(E);
- }
+ free(E);

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:30:26 +10:00
Cyril Brulebois
b142b0d274 Remove more superfluous if(p!=NULL) checks around free(p).
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
- if (E != NULL)
-   free(E);
+ free(E);

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:29:54 +10:00
Cyril Brulebois
0649ac0afd Remove more superfluous if(p) checks around free(p).
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
- if (E)
-   free(E);
+ free(E);

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:28:50 +10:00
Cyril Brulebois
99275ad2fa Remove superfluous if(p!=NULL) checks around free(p); p=NULL;
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
-  if (E != NULL) {
-   free(E);
(
-   E = NULL;
|
-   E = 0;
)
-  }
+ free(E);
+ E = NULL;

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:22:59 +10:00
Peter Hutterer
4132b1c591 xfree86: fix compiler warnings - unused variable i
../../../../hw/xfree86/common/xf86Config.c: In function 'configDRI':
../../../../hw/xfree86/common/xf86Config.c:2213:9: warning: unused variable
'i'

Introduced in 788bfbf18a

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-11-05 15:53:59 +10:00
Peter Hutterer
6b982d73bb xfree86: fix two compiler warnings - unused variable ati, atimisc
../../../../hw/xfree86/common/xf86Config.c: In function
'fixup_video_driver_list':
../../../../hw/xfree86/common/xf86Config.c:507:19: warning: unused variable
'atimisc'
../../../../hw/xfree86/common/xf86Config.c:507:12: warning: unused variable
'ati'

Introduced in 52577ae8ee.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-11-05 15:53:44 +10:00
Peter Hutterer
0799f0771c xfree86: remove two unused variables from Makefile.am
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-05 09:30:14 +10:00
Keith Packard
a52efb096e Merge remote branch 'sthibaul/master-iopl' 2010-11-03 06:50:45 -07:00
Søren Sandmann Pedersen
74bc2d8c6b render: Delete renderedge.[ch]
The functions in these files have not been used since trap
rasterization was moved to pixman. They survived until now to preserve
the server abi.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Søren Sandmann <ssp@redhat.com>
2010-11-01 22:54:18 -04:00
Peter Hutterer
19f43836d1 Re-export xf86CollectInputOptions.
Some drivers, most notably the mouse driver need this and reimplementing on
the driver side doesn't make sense.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-25 15:10:19 +10:00
Samuel Thibault
f72aadd38b hurd: Fix use of deprecated iopl device
Fix Xserver on GNU/Hurd into using the "mem" device instead of
the deprecated "iopl" device.

Reviewed-by: Olaf Buddenhagen <antrik@users.sf.net>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2010-10-24 14:09:35 +02:00
Peter Hutterer
dd11f734a9 input: remove "mode" field from ValuatorClassRec.
We have per-axis mode now. For those bits that still need it (XI 1.x),
assume that the first axis holds the device's mode.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 16:19:00 +10:00
Peter Hutterer
e909af88bf dmx: clarify a valuator mode condition.
Relative is defined as 0, so change the condition to be more obvious.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 16:18:59 +10:00
Chase Douglas
65c0fc81eb Add support for per-axis valuator modes (Relative/Absolute)
The XI2 protocol supports per-axis modes, but the server so far does
not. This change adds support in the server.

A complication is the fact that XI1 does not support per-axis modes.
The solution provided here is to set a per-device mode that defines the
mode of at least the first two valuators (X and Y). Note that initializing
the first two axes to a different mode than the device mode will fail.

For XI1 events, any axes following the first two that have the same mode
will be sent to clients, up to the first axis that has a different mode.
Thus, if a device has relative, then absolute, then relative mode axes,
only the first block of relative axes will be sent over XI1.

Since the XI2 protocol supports per-axis modes, all axes are sent to the
client.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 13:37:57 +10:00