Commit Graph

10135 Commits

Author SHA1 Message Date
Pauli Nieminen
4f6e3b0f37 mi: Register sprite damage handler only when required
There is no need to have damage handler registered when there isn't any
pointer in the screen. This avoids some overhead from damage handling
which takes tens of microseconds on arm.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:51 +00:00
Pauli Nieminen
bf48082f30 mi: Fix the debug message
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:51 +00:00
Pauli Nieminen
8fb43b8bf9 mi: Fix wrapping for sprite screen
SCREEN_EPILOGUE should read the current function pointer from screen
after calling wrapped function in case the pointer changes.

Passing pPriv to macros instead of asking dix each time makes sense when
both macros need same pointer.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:51 +00:00
Pauli Nieminen
4be2a6d1b3 mi: Add GetSpriteScreen macro to hide dixLookupPrivate
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:51 +00:00
Pauli Nieminen
ed8db09b4b composite: Remove unnecessary variable.
We know that there is damage if the dynamic block handler is registered.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:51 +00:00
Pauli Nieminen
c038b8b28e composite: Only register the block handler when it is required
Even calling block handler that doesn't do much is costly in arm. It
takes a few microseconds each time which adds up to relative high CPU
time because it is done 500+ times per second.

Simple optimization is to register the block handler only when it is
required.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:51 +00:00
Pauli Nieminen
6d0e9e5d6e render: Enable animated cursor block handler only when needed
Calling BlockHandlers takes some time for each iteration in main loop
which adds up quickly over multiple request. To reduce the round-trip
costs to xserver BlockHandlers should be registered only when required.

AnimCurScreenBlockHandler is the first victim for this optimization.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:51 +00:00
Pauli Nieminen
aa8cea953d render: Don't filter 0 return from GetTimeInMillis
In animate cursor block handler code assumes GetTimeInMillis returns
always nonzero value. This isn't true when time wraps around.

To prevent any problems in case GetTimeInMillis would return zero use
activeDevice variable to track if we have received time.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:51 +00:00
Daniel Stone
91beeee05f DIX: Reset window properties when freeing them
This enables us to reliably inspect properties when destroying windows.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-31 12:52:50 +00:00
Adam Jackson
36ebdd3616 linux: warning fix
lnx_agp.c: In function ‘xf86DeallocateGARTMemory’:
lnx_agp.c:267: warning: cast to pointer from integer of different size

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:50 +00:00
Adam Jackson
63ccaec2c3 glx: warning fixes
render2.c: In function ‘__glXDisp_Map2d’:
render2.c:127: warning: ‘u1’ may be used uninitialized in this function
render2.c: In function ‘__glXDisp_Map1d’:
render2.c:90: warning: ‘u1’ may be used uninitialized in this function

Remove unnecessary test, and change memcpy to memmove as all users were
doing overlapping copies.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:24 +00:00
Adam Jackson
d057e265c8 xcmisc: warning fix
xcmisc.c:202: warning: no previous prototype for ‘XCMiscExtensionInit’

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:36:44 +00:00
Adam Jackson
67e0bcba43 dri1: warning fix
dri.c: In function ‘DRIScreenInit’:
dri.c:434: warning: cast from pointer to integer of different size

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:36:44 +00:00
Adam Jackson
a298d044f9 loader: warning fix
loadmod.c: In function ‘FreeSubdirs’:
loadmod.c:377: 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
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
Daniel Stone
32c85ad4b8 GLX: DRI2: Fix mismatched-types warning
All the DRI extension types have a base extension type as their first
member to avoid exactly these types of warning.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2010-12-31 12:36:44 +00:00
Daniel Stone
22796cfa48 udev: Add strdups to kill const warnings
InputAttributes wants non-const members, and while it appears safe to
cast it, just leave it be for the moment.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-12-31 12:36:44 +00:00
Daniel Stone
03f2eb1e15 Input: Set client error value for invalid mask bits
When we send BadValue back to the client for having invalid mask bits,
at least tell them what the (first) invalid bit was.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-31 12:36:44 +00:00
Chase Douglas
4781828798 Make EventIsDeliverable non-static
Will be used outside dix/events.c in proceeding XI 2.1 MT changes.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-31 12:36:44 +00:00
Daniel Stone
f7d8ade3c5 Resources: Move rClient to resource.h
The definition of rClient was duplicated across three source files, so
move it to resource.h.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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
Ville Syrjälä
2e781457d4 xfree86/modes: Take rotation into account when checking mode size
Assume that a mode can be used in either landscape or portrait
orientation. I suppose the correct thing to do would be to
collect all the supported rotations from the CRTCs that can be used
with a specific output, but that information doesn't seem to be
readily available when these checks are done. So just assume that
either orientation is fine.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-12-27 20:03:52 +02:00
Ville Syrjälä
0ce25fd790 dri2: Don't page flip when the window size doesn't match the pixmap size
If the drawable size doesn't match the pixmap size page flipping should
not be allowed.

If the window is larger than the pixmap, page flipping might need to
reposition the CRTC somewhere in the middle of the pixmap. I didn't
spot any code that would handle that at least in the intel driver.

Also the root pixmap could then move to some negative screen
coordinates. Not sure if all bits of code could handle that. Perhaps
when composite is enabled screen_x/y would make it work, but without
composite there's no way that it would work AFAICS.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-12-27 20:03:51 +02:00
Daniel Stone
efcb63d0ce Render: Fix 'comparing between distinct pointer types' warning
Add the appropriate casts so that gcc shuts up, even if it doesn't
matter.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-27 09:44:07 -08:00
Daniel Stone
469d5bf8b7 mi: Sync: Don't free managed screen private
misync allocates space for its screen private with
dixRegisterPrivateKey, which means it doesn't have to free it at
CloseScreen time; doing so will, in fact, result in a crash.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: James Jones <jajones@nvidia.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-27 09:43:56 -08:00
Daniel Stone
44adb31bfe GetTimeInMillis: Use CLOCK_MONOTONIC_COARSE where available
On some systems, using CLOCK_MONOTONIC forces a readback of HPET or some
similarly expensive timer.  CLOCK_MONOTONIC_COARSE can alleviate this,
at the cost of negligibly-reduced resolution, so prefer that where we
can.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-27 09:43:44 -08:00
Daniel Stone
b01dd9d336 Input: Set client error value for invalid mask bits
When we send BadValue back to the client for having invalid mask bits,
at least tell them what the (first) invalid bit was.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-23 11:38:46 +10:00
Chase Douglas
495e0142a7 Make EventIsDeliverable non-static
Will be used outside dix/events.c in proceeding XI 2.1 MT changes.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-23 11:38:45 +10:00
Daniel Stone
4fbe67beb5 Resources: Move rClient to resource.h
The definition of rClient was duplicated across three source files, so
move it to resource.h.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-23 11:38:45 +10:00
Chase Douglas
871c1e17e5 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-23 11:38:33 +10:00
Michel Dänzer
e06fa80400 EXA: Fix crash with fill using 1x1 tile of depth < 8 (bug #24703).
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24703 .

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-22 11:38:05 -08: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
7a9062f2f0 fonts: Fix typo in async ListFonts logic
This was introduced in 3ab6cd31cb.  Mea
culpa.  This logic is still incorrect [1], but at least it's less
incorrect.

[1] - https://bugzilla.redhat.com/658587

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:12:09 -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
Tiago Vignatti
d1107918d4 randr: check for virtual size limits before set crtc
Return a error if the screen is configured to an invalid size.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-20 00:46:32 -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
Christopher James Halse Rogers
a2e67a6412 IDLETIME: Fix edge-case in IdleTimeBlockHandler
Ensure that if we're called exactly on the threshold of a
NegativeTransition trigger that we reshedule to pick up
an idle time over the threshold.

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:42 -08:00
Christopher James Halse Rogers
b55bf24858 Xext: Fix edge case with {Positive, Negative}Transition triggers.
The {Positive,Negative}Transition triggers only fire when the counter
goes from strictly {below,above} the threshold.  If
SyncComputeBracketValues gets called exactly at this threshold we may update
the bracket values so that the counter is not updated past the threshold.

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:14 -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
Colin Harrison
1324b0ca9f Typo in xserver Xvasprintf()
I needed this patch in the wrapper around vsnprintf() in os/xprintf.c
(MinGW for Windows build) to correct various crashes.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-12-18 00:22:29 -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