Commit Graph

5079 Commits

Author SHA1 Message Date
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