Commit Graph

9705 Commits

Author SHA1 Message Date
Adam Jackson
6274dca9d9 dix: optimize CallCallbacks
Move the basic sanity checking to an inline wrapper, which avoids the
function call overhead if the callback list is empty.  On an XACEful
server on a 2.4GHz Core 2 Duo:

    1              2           Operation
--------   -----------------   -----------------
20000000.0   25100000.0 (  1.25)   X protocol NoOperation

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-13 09:24:06 -07:00
Adam Jackson
e418cd332c xwin: Remove some undue paranoia about UNDRAWABLE_WINDOW
mi will throw away rendering to input-only windows.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-13 09:21:27 -07:00
Adam Jackson
febf3e7ead dix: Remove the memory of the multibuffer extension
Drop DRAWABLE_BUFFER and related checks, mbuf was the only thing that
used them and it was killed in 0ba82562.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-13 09:18:41 -07:00
Alan Coopersmith
1333e101b4 Remove leftover fbSaveAreas & fbRestoreAreas defines from wfbrename.h
The fb functions they try to rename were deleted in 2007 by
commit ae7f71a8b3

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-13 09:16:51 -07:00
Jamey Sharp
8efa3623f3 Use GetCurrentRootWindow or equivalent instead of spriteTrace[0].
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-13 15:58:12 +10:00
Jamey Sharp
32de0c1907 Move replay-window check from ComputeFreezes to CheckDeviceGrabs.
This just simplifies ComputeFreezes, eliminating some duplicated code
and a goto.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-13 15:58:07 +10:00
Jamey Sharp
1c1811ecaf CheckDeviceGrabs: Delete redundant pWin->optional test.
CheckPassiveGrabsOnWindow returns FALSE if pWin->optional is NULL,
because wPassiveGrabs uses wUseDefault, so don't bother checking at the
caller.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-13 15:58:06 +10:00
Jamey Sharp
c360b3eb1d Let CheckPassiveGrabsOnWindow callers check if device is already grabbed.
CheckDeviceGrabs checked all the ancestors of the window containing this
device's pointer even if no new grabs could possibly apply due to the
device already being grabbed.

ActivateFocusInGrab and ActivateEnterGrab already checked whether they
should break an existing grab, and then set up an event that was
completely ignored if they didn't actually break the grab.

In both cases, just do what we would have done eventually anyway--return
FALSE from CheckPassiveGrabsOnWindow's caller--but do it sooner.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-13 15:58:04 +10:00
Adam Jackson
853d7ebfa3 vbe: Fix copying the mode info block
Just use memcpy, seriously.

Reviewed-by: RĂ©mi Cardona <remi@gentoo.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-05 10:20:43 -07:00
Adam Jackson
b2f9ce201c edid: Fix the HDTV sync pulse adjustment
Simple typo, should have been adjusting the horizontal timings
consistently since we're not trying to mangle vertical at all.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Patrick E. Kane <pekane52@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-05 08:19:25 -07:00
Chris Wilson
9a893fe52f xfree86: Do not call dlclose(NULL) [regression after ab7f057]
During unwind following an error when attempting to a load a module, we
attempt to call dlclose on a potentially NULL handle. This is a
side-effect of removing the abstraction layer in ab7f057.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Adam Jackson <ajax@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-04 11:46:07 -07:00
Keith Packard
533faf7f43 Bump version to 1.9.99.1 (1.10 development series)
Make the 1.10 development series distinguishable from the 1.9 branch.

Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-01 10:57:48 -07:00
Adrian Bunk
a769f4c22a remove dolt
With libtool 2.2.10 the difference in build time is so small
(< 5% with -j8 builds) that it isn't worth having this hack.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-30 17:44:59 -07:00
Tobias Droste
c7e4222c9a randr: set error numbers of resource types in RRExtenstionInit() (V2)
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30367

Currently the ddx calls xf86RandR12Init()
  (-> RRScreenInit()
     -> RRInit()
       -> RRModeInit()
       -> RRCrtcInit()
       -> RROutputInit())
before RRExtensionInit() is called. This causes RRErrorBase
being 0 while setting resource type error values (resource types:
RROutput, RRMode and RRCrtc). The fix moves the setting of error
values to own functions which are called in RRExtensionInit()
to get the right RRErrorBase.

V2: With header file

Signed-off-by: Tobias Droste <tdroste@gmx.de>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-29 14:41:53 -07:00
Jon TURNEY
72a9c686d7 Cygwin/X: Fix compilation after "delete pervasively use of DISPATCH_PROC"
commit cbd4d5dbb7
removes the static declarations of ProcWindowsWMDispatch and
SProcWindowsWMDispatch which precede their first use in
winWindowsWMExtensionInit()

Move winWindowsWMExtensionInit() to after the definition of those
two functions to fix compilation.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-29 12:15:11 -07:00
Aaron Plattner
1a9022d328 Bump video driver ABI version to 9.0
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-28 15:52:38 -07:00
Jeremy Huddleston
c45bea0c04 XQuartz: RandR: Refactor legacy mode-switching to be better integrated with RandR
Adds three new functions
void QuartzRandRSetFakeRootless (void);
void QuartzRandRSetFakeFullscreen (void);
void QuartzRandRToggleFullscreen (void);

The first two are identical to requesting the fake modes from a RandR client
The third responds to cmd-alt-a to leave fullscreen or RandR.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 10:09:11 -07:00
Jeremy Huddleston
229323a19b XQuartz: RandR: Don't change the rootless preference when changing RandR mode
Also renames a bunch of other variables for better consistency.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:35 -07:00
Jeremy Huddleston
721edc69c3 XQuartz: RandR: Better handle switching betwen RandR modes that share CG modes
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:35 -07:00
Jeremy Huddleston
026a47e212 XQuartz: RandR: Respond better to resolution changes made outside X
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jeremy Huddleston
59cd93f48a XQuartz: RandR: Use deprecated CG APIs only on Leopard and earlier
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jan Hauffa
629c3f473b XQuartz: RandR: Remove FAKE_RANDR code.
Signed-off-by: Jan Hauffa <hauffa@in.tum.de>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jan Hauffa
97b5f53064 XQuartz: RandR: Toggle rootless mode on XRandR mode switch.
Report a fake screen mode that corresponds to the screen mode at startup of the
server excluding the height of the menu bar. If a client requests this mode,
rootless mode is enabled. In all other modes, the root window is shown.

Signed-off-by: Jan Hauffa <hauffa@in.tum.de>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jan Hauffa
2d411472c2 XQuartz: RandR: Implement basic RandR functionality.
Querying and changing of resolution and refresh rate is supported,
rotation is not implemented yet.

Signed-off-by: Jan Hauffa <hauffa@in.tum.de>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jeremy Huddleston
f492670948 XQuartz: Move use of static dispatch procs after declaration
This fixes fallout from cbd4d5dbb7

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Gaetan Nadon
c36ca7b186 config: remove --with-dri-driver-path option, use dri.pc #29740
The trusted location of the dri driver directory can be obtained
from the mesa dri.pc pkg-config file.

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-28 08:19:27 -07:00
Keith Packard
5532687a92 Merge remote branch 'ajax/less-loader' 2010-09-28 08:15:07 -07:00
Adam Jackson
9df4fb0adf xfree86: Add 18bpp support
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-28 08:13:07 -07:00
Chris Wilson
5c6a2f93eb xfree86: Kill pixmapPrivate with a vengeance (v2)
ScrnInfo->pixmapPrivate only existed in order to catch invalid access to
the framebuffer by making the backing data NULL across the VT switch.
This was causing more confusion in the higher layers during mode setting
without any real benefit, so remove it.

v2: Kill ShadowModifyPixmapHeader() as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Julien Cristau <jcristau@debian.org>
Cc: Andrew Guertin <lists@dolphinling.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-28 08:07:21 -07:00
Chris Wilson
fdabcec57a modes: Beware the driver switching root pixmaps
Program received signal SIGSEGV, Segmentation fault.
0x080d4a2d in xf86RandR12ScreenSetSize (pScreen=0x8dca3a0, width=800,
    height=600, mmWidth=210, mmHeight=157)
    at ../../../../hw/xfree86/modes/xf86RandR12.c:731
731     ../../../../hw/xfree86/modes/xf86RandR12.c: No such file or directory.
        in ../../../../hw/xfree86/modes/xf86RandR12.c
(gdb) bt full
    height=600, mmWidth=210, mmHeight=157)
    at ../../../../hw/xfree86/modes/xf86RandR12.c:731
        randrp = 0x8dcae68
        pScrn = 0x8dbeb28
        config = <value optimized out>
        pRoot = 0x8e08e30
        pScrnPix = 0xb6d12008
        ret = 1
        c = <value optimized out>
    mmWidth=210, mmHeight=157) at ../../randr/rrscreen.c:185
No locals.
    at ../../randr/rrscreen.c:307
        pWin = 0x8e08e30
        pScreen = 0x8dca3a0
        i = <value optimized out>
        rc = 0
../../randr/randr.c:485

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Julien Cristau <jcristau@debian.org>
Tested-by: Julien Cristau <jcristau@debian.org>
Cc: Keith Packard <keithp@keithp.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-28 08:07:21 -07:00
Kristian Høgsberg
2f0abd7d69 glx: Fix use after free in DrawableGone
(note that nearly identical patches were proposed by Kristian and Chris)

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-28 08:01:28 -07:00
Tiago Vignatti
e416965bfd dix: remove proc tables initialization
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-28 16:46:46 +03:00
Tiago Vignatti
cbd4d5dbb7 xserver: delete pervasively use of DISPATCH_PROC
Some functions had to be moved around due some missing static definitions.
Another minor clean up like inexistent function declarations and etc were made
also.

Part of this patch was cooked using:
sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files`

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-28 16:45:05 +03:00
Macpaul Lin
58bd317e29 xfree86: nds32: add nds32 support for compiler related mmio codes
Add nds32 support for compiler related mmio codes.
It includes byte-swap or non-swap operations.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23 15:36:40 -07:00
Macpaul Lin
28e6de66b4 xfree86: nds32: add nds32 support for compiler specific codes
Add nds32 definitions and related assembly codes to compiler header files.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23 15:36:31 -07:00
Macpaul Lin
2b24b2bd85 xfree86: nds32: add nds32 definition for vgaHW support.
Add __nds32__ definitions for vgaHW support.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23 15:36:19 -07:00
Macpaul Lin
22376aa7aa xfree86: nds32: add nds32 definition for support linux video related io.
Add __nds32__ definitions for supporing correct io method for lnx_video.c

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23 15:36:10 -07:00
Macpaul Lin
d52799f67f xfree86: nds32: add nds32 related definitions into include headers.
Add MSB/LSB related definitions into include/servermd.h

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23 15:35:48 -07:00
Keith Packard
98197d931b Merge remote branch 'jamey/for-keith' 2010-09-23 15:30:37 -07:00
Adam Jackson
682a3ee608 xfree86: Remove useless module setup functions where appropriate
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:57:22 -04:00
Adam Jackson
6130170e7e xfree86: Remove unused refcounting from input drivers
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:57:17 -04:00
Adam Jackson
ab7f057ce9 loader: Remove a silly layer of reference counting
libdl will refcount objects for us just fine, thanks.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:57:12 -04:00
Adam Jackson
0438002cd2 loader: include cleanup
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:57:07 -04:00
Adam Jackson
2f003fe496 loader: Remove the handle field from LoaderOpen
This was always 0 from all the callers.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:57:02 -04:00
Adam Jackson
09929da505 loader: Remove unused canonical name field
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:56:57 -04:00
Adam Jackson
3a26e7f459 loader: Remove unused module serial number
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:56:53 -04:00
Adam Jackson
2a24a013bf loader: Merge dlloader directly into the loader
This lets us drop some double-tracking of loaded modules too.  If your
OS is too lame to have libdl, fix that first.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:55:55 -04:00
Jamey Sharp
402942cdbc Introduce per-object per-screen privates.
This replaces dixCreatePrivateKey and the only uses, which were in
midispcur.

Commit by Jamey Sharp and Josh Triplett.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-09-18 11:17:18 +02:00
Jamey Sharp
e4d4d6ddd5 Xserver need not be compatible with old versions of xserver.
Delete time-traveling multiple personality disorder from the server.

Gaetan notes:

    There were a couple of drivers containing an unknown version of the
    modes/parser code. This was done in server 1.2 time frame because it
    was released without mode code. It was barely or not maintained
    afterwards. There are currently no video drivers with a copy of the
    modes code.

Most of these ifdefs were introduced in commit
a8d760f567, where Aaron wrote,

    This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer
    than 1.2" since XORG_VERSION current went backwards at some point.

Alan explains that:

    In Xorg 1.3, when we first released an Xorg server release decoupled
    from the katamari release schedule.  (1.0 through 1.2 were released
    as part of X11R7.0 through 7.2, while 1.3 came out between X11R7.2 &
    7.3.)

Commit by Jamey Sharp and Josh Triplett.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-09-18 11:17:18 +02:00
Tiago Vignatti
01ad3725a8 xfree86: delete useless "Primary device is not PCI" message
The primary device being PCI or not has no effect on the server working. This
message is superfluous.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-14 18:53:31 +03:00