Commit Graph

5141 Commits

Author SHA1 Message Date
Peter Hutterer
9db9e964f6 xfree86: swap the order to-be-merged lists in xf86CollectInputOptions.
Current order causes the user-configured option list to be overwritten with
the default list supplied by the driver. Swap around so we overwrite the
driver's default values instead.

This only affected options supplied by the driver such as XkbLayout in the
case of evdev.

Reported-by: Sebastian Glita <glseba@yahoo.com>
Reported-by: Simon Thum <simon.thum@gmx.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Sebastian Glita <glseba@yahoo.com>
2010-12-13 09:57:59 +10:00
Jeremy Huddleston
f641e4b34a XQuartz GL: Add $(GL_CFLAGS) to CFLAGS
This fixes a build failure I found on tinderbox.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-08 22:58:12 -08:00
Peter Hutterer
9cf055892d xfree86: don't set movement flags for non-valuator events.
If a device doesn't send valuators, don't try to move its position.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-09 10:03:26 +10:00
Jeremy Huddleston
883039e07b XQuartz: Just NSBeep() for XBell()
The CoreAudio path uses deprecated API and has reported crashes that
aren't worth fixing (4e8bf12b13 fixed
one and introduced another).  NSBeep() does the job just fine.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-08 13:57:19 -08:00
Keith Packard
519d243f0c Merge remote branch 'alanc/master' 2010-12-07 13:39:58 -08:00
Alan Coopersmith
446482efaa Convert cvt code to use XNFasprintf()
Requires linking xprintf.c into standalone cvt utility

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-12-07 11:10:36 -08:00
Alan Coopersmith
d2c42b1027 Replace alloc+strcpy+strcat with asprintf() & XNFasprintf() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
3a9bb93dd1 Convert alloc+sprintf pairs into asprintf() & XNFasprintf() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
2416255f7e Convert hw/xfree86/parser code to use asprintf() calls
Requires linking xprintf.c into libxf86config for those who build it.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
03e8bfa1d1 Convert existing Xprintf style calls to asprintf style
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
c95c1d338f Add asprintf() implementation for platforms without it
Provides a portable implementation of this common allocating sprintf()
API found in many, but not yet all, of the platforms we support.
If the platform provides vasprintf() we simply wrap it, otherwise we
implement it - either way callers can use it regardless of platform.

Since not all platforms guarantee to NULL out the return pointer on
failure, we don't either, and require callers to check the return
value for -1.

The old Xprintf() API is deprecated, but left for compatibility for now.

The new API is added in a new header so that it can be used in parts of
the server such as hw/xfree86/parser that don't include all the server
headers.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Alan Coopersmith
2db6951763 Sun's copyrights now belong to Oracle
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Cyril Brulebois
73fbc4a4a7 Replace SecurityLookupIDByClass() with dixLookupResourceByClass().
This patch has been prepared with the following Coccinelle semantic patch:

@@
expression a, b, c, d;
identifier r;
type t;
@@
-r = (t) SecurityLookupIDByClass(a, b, c, d);
+dixLookupResourceByClass((pointer*) &r, b, c, a, d);

The only occurrence not matching directly was processed after separating
declaration of pXinDraw and call to SecurityLookupIDByClass().

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:45 +01:00
Cyril Brulebois
6e8b34b704 Replace SecurityLookupIDByType() with dixLookupResourceByType(), take 2.
These occurrences are a bit harder to catch through a semantic patch,
so process them “manually”.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Cyril Brulebois
ac04c1377a Replace SecurityLookupIDByType() with dixLookupResourceByType(), take 1.
This patch has been prepared with the following Coccinelle semantic patch:

@@
expression a, b, c, d;
identifier r;
@@
-r = SecurityLookupIDByType(a, b, c, d);
+dixLookupResourceByType((pointer*) &r, b, c, a, d);

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Cyril Brulebois
28b4c02d74 Enable silent rules for cat and echo.
One gets this:
|   GEN    lf3-xaaBitmap.c
|   GEN    lf3-xaaBitmap.c
|   GEN    lf3-xaaBitmap.c
|   GEN    lf3-xaaBitmap.c
|   CC     lf3-xaaBitmap.lo

instead of this:
| echo "#define LSBFIRST" > l3-xaaBitmap.c
| echo "#define TRIPLE_BITS" >> l3-xaaBitmap.c
| echo '#include "../../../../hw/xfree86/xaa/xaaBitmap.c"' >> l3-xaaBitmap.c
|   CC     l3-xaaBitmap.lo

Occurrences found using:
| git grep -E '(cat|echo)' -- '*Makefile.am'

Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Cyril Brulebois
838b958228 Replace LookupIDByType() with dixLookupResourceByType(), take 2.
These occurrences are a bit harder to catch through a semantic patch,
so process them “manually”.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Cyril Brulebois
ffb93533fd Replace LookupIDByType() with dixLookupResourceByType(), take 1.
This patch has been prepared with the following Coccinelle semantic patch:

@@
expression x, y;
type t;
identifier r;
@@
-r = (t) LookupIDByType(x, y);
+dixLookupResourceByType((pointer*)&r, x, y, NullClient, DixUnknownAccess);

@@
expression x, y;
type t;
identifier r;
@@
-t r = (t) LookupIDByType(x, y);
+t r;
+dixLookupResourceByType((pointer*)&r, x, y, NullClient, DixUnknownAccess);

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Cyril Brulebois
780754050b Fix GLX_LIBS vs. DMX_LIBS order.
If glxproxy needs symbols which aren't pulled in by dmx itself, glxproxy
fails to link because of undefined references.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-07 09:24:16 -08:00
James Jones
d96d5f5443 Bump extension ABI to 5
Commit 606e079cc4 moved the visual
field in WindowOptRec, breaking the extension module ABI.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-06 20:43:15 -08:00
Keith Packard
752c368421 Separate out screen size and screen pixmap sizes in RRScreenSizeSet
This provides for separate sizes for the screen scanout and rendering
buffer and the application-visible screen size.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:09:04 -08:00
Keith Packard
a88d70fb20 Set sprite transforms from RRSetCrtcConfigs
These were getting ignored.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:58 -08:00
Keith Packard
96b4d4787b DIX is responsible for ref counting scanout pixmaps.
Remove some extra ref counting inside hw/xfree86/modes

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:54 -08:00
Keith Packard
82612045e1 randr: Add per-crtc pixmaps
This adds new driver hooks to allocate scanout pixmaps and
changes the mode setting APIs to pass the new scanout pixmaps
along from DIX. DIX is responsible for reference counting the pixmaps
by tracking them through RRCrtcNotify.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:48 -08:00
Keith Packard
86c489c319 hw/xfree86/modes: Add optional driver API for RRSetCrtcConfigs
This provides a driver hook which can either completely replace, or
just validate the parameters for, the RRSetCrtcConfigs request.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:46 -08:00
Keith Packard
d94a035ea9 randr: Implement RRSetCrtcConfigs
This provides a driver-independent implementation of the
RRSetCrtcConfigs API by simply using the existing interfaces.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:43 -08:00
Keith Packard
66294afcab randr: Add sprite position transforms
This implements sprite position transformations. Sprite image
transforms are passed all the way to the DDX layer, but the images are
not yet manipulated before being passed to the drivers.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:40 -08:00
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