Commit Graph

5107 Commits

Author SHA1 Message Date
Adam Jackson
ee0b1b5644 config: warning fixes
xf86AutoConfig.c: In function ‘FreeList’:
xf86AutoConfig.c:123: warning: passing argument 1 of ‘free’ discards
qualifiers from pointer target type
/usr/include/stdlib.h:488: note: expected ‘void *’ but argument is of
type ‘const char *’

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:36:44 +00:00
Chase Douglas
05e437c2ce Export all valuator_mask_* functions
Input drivers may use valuator masks for internal state. Having all the
valuator_mask_* functions available will help.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>

Bump ABI_XINPUT_VERSION minor.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-31 12:36:43 +00:00
Adam Jackson
56d9c736f0 xfree86: Convert some xf86BlockSIGIO to OsBlockSignals
The DDC1 and int10 code are blocking SIGIO to get some assurance that
their usleep() calls take as long as they expect.  That's a good start
but you really want to be blocking more than just SIGIO, SIGALRM too at
minimum.

At this point, except for SIGIO handler setup itself, BlockSIGIO really
means "block input events".

Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-12-20 12:15:14 -05:00
Adam Jackson
ce13a1dbbf xfree86: Remove xf86EnterServerState
Back when we had RAC this was a vaguely meaningful thing.  Since then
it's been a glorified (and confusing) wrapper around xf86BlockSIGIO.

Note that the APM and VT switch code are unusual relative to other code
that cares about SIGIO state.  Most callers push a SIGIO disable to
create a critical section for the duration of the caller's stack frame,
but those two effectively disable SIGIO after their return and re-enable
on their next entry.

Reviewed-by: Tiago Vignatti <tigo.vignatti@nokia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-12-20 12:14:32 -05:00
Adam Jackson
a04e74cb48 xfree86: Symmetrize xf86AccessEnter and xf86AccessLeave
Enter was changing server operating state, Leave wasn't.  Which was
wholly redundant, since all callers of Enter would immediately change
the operating state to exactly what Enter had just done.

Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-12-20 12:13:43 -05:00
Adam Jackson
f28e48834e Remove SCO support
This has never been buildable in any modular server release.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-12-20 12:11:11 -05:00
Adam Jackson
040d54fb88 xfree86: Remove unused xf86inSuspend
What is this, I don't even.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-12-20 12:09:16 -05:00
Keith Packard
e7dc253452 Merge remote branch 'alanc/master' 2010-12-20 00:48:45 -08:00
Jörn Horstmann
4b88c7be8d Add EDID quirk for HP Compaq nc8430.
Like some other LPL panels, this one reports the vertical size in cm rather
than mm.
Patch taken from Launchpad bug #380009 <https://launchpad.net/bugs/380009>

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

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-19 16:43:48 -08:00
Alan Coopersmith
d5b0d58573 Bug 32436 - hw/xfree86/parser/Makefile.am TOP_SRCDIR should be top_srcdir
https://bugs.freedesktop.org/show_bug.cgi?id=32436
Fix typo introduced in 2416255f7e that breaks builds when
configured --enable-install-libxf86config

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Tested-by: Simon Thum <simon.thum@gmx.de>
2010-12-18 00:24:21 -08:00
David Barksdale
058b889fde Bug 21827: faulty sdksyms.c generated by the awk script in sdksyms.sh
https://bugs.freedesktop.org/show_bug.cgi?id=21827

Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: David Barksdale <david.barksdale@adcedosolutions.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-12-18 00:22:30 -08:00
Keith Packard
f1542f1d71 Merge remote branch 'whot/for-keith' 2010-12-14 15:04:12 -08:00
Keith Packard
9716d31247 Merge remote branch 'jeremyhu/master' 2010-12-14 15:01:36 -08:00
Gaetan Nadon
03ea0b7726 docs: replace BUILLDOCS with existing ENABLE_DEVEL_DOCS
Use the util-macros AM Conditionals to control generation of developers
documents. This is used throughout xorg modules.

The doxygen generated docs are now also managed by --enable-devel-docs.

Remove --enable-builddocs as this was last use for BUILDDOCS

	*** From the RELEASE NOTES ***

 New configure options for documentation in modules
 --------------------------------------------------
 As many more modules now contain documentation to be converted from DocBook XML to text,
 HTML, PostScript, and/or PDF formats, new standard options have been added to the configure
 macros to control the build of these in the modules.
 --with-xmlto=yes|no
                     Enables or disables use of the xmlto [https://fedorahosted.org/
                     xmlto/] command to translate DocBook XML to other formats.
                     All DocBook XML conversions require use of this command.
 --with-fop=yes|no
                     Enables or disables use of the Apache fop [http://
                     xmlgraphics.apache.org/fop/] command to translate DocBook
                     XML to PostScript and PDF formats.
 --enable-docs=yes|no
                     Enables or disables the build and installation of all
                     documentation except traditional man pages or those covered
                     by the --enable-devel-docs and --enable-specs options.
 --enable-devel-docs=yes|no
                     Enables or disables the build and installation of documentation
                     for developers of the X.Org software modules.
 --enable-specs=yes|no
                     Enables or disables the build and installation of the formal
                     specification documents for protocols and APIs.

Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-14 14:55:08 -08:00
Gaetan Nadon
c78c71c3a8 hw/dmx/doc: DIST_SUBDIRS not required when using AM_CONDITIONAL
The makefile can be simplyfied as Automake handle this automatically.
All directories in SUBDIRS are visited for dist purposes.

www.gnu.org/software/automake/manual/automake.html#SUBDIRS-vs-DIST_005fSUBDIRS

Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-14 14:51:51 -08:00
Peter Hutterer
8a8fdd762a xfree86: always report the input options before initialising the device.
After collecting the driver's default options, report the list of options
set for the device before calling PreInit(). This helps with debugging those
cases where options are not merged correctly.

xf86OptionListReport reports with verbosity 5, higher than the default
verbosity so this won't generate logspam in the default case.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
2010-12-14 10:19:05 +10:00
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