Commit Graph

1323 Commits

Author SHA1 Message Date
Jeremy Huddleston Sequoia
2740dc1937 dix: Silence TSan warnings when checking for pending input
V2: Moves InputCheckPending() into dix.h

Bumps required version of xproto to 7.0.30

==================
WARNING: ThreadSanitizer: data race (pid=4943)
  Read of size 4 at 0x00010c4e3854 by thread T8:
    #0 WaitForSomething WaitFor.c:237 (X11.bin+0x00010049216c)
    #1 Dispatch dispatch.c:413 (X11.bin+0x000100352ed9)
    #2 dix_main main.c:287 (X11.bin+0x00010036e894)
    #3 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63)

  Previous write of size 4 at 0x00010c4e3854 by thread T12 (mutexes: write M856, write M1976):
    #0 mieqEnqueue mieq.c:263 (X11.bin+0x000100448d14)
    #1 DarwinSendDDXEvent darwinEvents.c:641 (X11.bin+0x000100033613)
    #2 DarwinProcessFDAdditionQueue_thread darwinEvents.c:338 (X11.bin+0x000100032039)

  Location is global 'miEventQueue' at 0x00010c4e3850 (X11.bin+0x0001005ab854)

  Mutex M856 (0x00010c4c8c80) created at:
    #0 pthread_mutex_lock <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000321fe)
    #1 DarwinListenOnOpenFD darwinEvents.c:300 (X11.bin+0x000100031607)
    #2 socket_handoff bundle-main.c:288 (X11.bin+0x000100002b40)
    #3 __do_request_fd_handoff_socket_block_invoke bundle-main.c:379 (X11.bin+0x0001000029ba)
    #4 __tsan::invoke_and_release_block(void*) <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x00000005d97b)
    #5 _dispatch_client_callout <null>:33 (libdispatch.dylib+0x0000000020ef)

  Mutex M1976 (0x00010c4e3d68) created at:
    #0 pthread_mutex_init <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000253c3)
    #1 input_lock inputthread.c:103 (X11.bin+0x00010049fd10)
    #2 TimerSet WaitFor.c:343 (X11.bin+0x0001004926c2)
    #3 RootlessQueueRedisplay rootlessScreen.c:594 (X11.bin+0x000100065d7f)
    #4 RootlessInstallColormap rootlessScreen.c:514 (X11.bin+0x000100069f1a)
    #5 miSpriteInstallColormap misprite.c:562 (X11.bin+0x000100467095)
    #6 miCreateDefColormap micmap.c:270 (X11.bin+0x000100440399)
    #7 DarwinScreenInit darwin.c:285 (X11.bin+0x0001000303bb)
    #8 AddScreen dispatch.c:3908 (X11.bin+0x00010036c417)
    #9 InitOutput darwin.c:671 (X11.bin+0x00010002fdeb)
    #10 dix_main main.c:197 (X11.bin+0x00010036e228)
    #11 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63)

  Thread T8 (tid=4198779, running) created by main thread at:
    #0 pthread_create <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490)
    #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039dad)
    #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039c16)
    #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cde4)
    #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a642)
    #5 server_main quartzStartup.c:136 (X11.bin+0x00010003a03b)
    #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002eb5)
    #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e99)
    #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100005734)
    #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
    #10 start <null>:29 (libdyld.dylib+0x000000005254)

  Thread T12 (tid=4198797, running) created by thread T8 at:
    #0 pthread_create <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490)
    #1 create_thread darwinEvents.c:121 (X11.bin+0x000100031ecf)
    #2 DarwinEQInit darwinEvents.c:365 (X11.bin+0x000100031860)
    #3 InitInput darwin.c:571 (X11.bin+0x00010002ea09)
    #4 dix_main main.c:261 (X11.bin+0x00010036e7ce)
    #5 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63)

SUMMARY: ThreadSanitizer: data race WaitFor.c:237 in WaitForSomething
==================
==================
WARNING: ThreadSanitizer: data race (pid=22841)
  Write of size 4 at 0x000105bbd864 by main thread (mutexes: write M1945):
    #0 mieqEnqueue mieq.c:263 (X11.bin+0x000100448cf4)
    #1 DarwinSendDDXEvent darwinEvents.c:642 (X11.bin+0x000100033693)
    #2 -[X11Controller set_window_menu:] X11Controller.m:275 (X11.bin+0x0001000222fd)
    #3 -[X11Application set_window_menu:] X11Application.m:486 (X11.bin+0x000100018b44)
    #4 -[X11Application handleMachMessage:] X11Application.m:177 (X11.bin+0x000100016678)
    #5 __NSFireMachPort <null>:69 (Foundation+0x00000009b62b)
    #6 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5f2)
    #7 server_main quartzStartup.c:136 (X11.bin+0x000100039ffb)
    #8 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002e65)
    #9 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e49)
    #10 mach_startup_server mach_startupServer.c:399 (X11.bin+0x0001000056e4)
    #11 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
    #12 start <null>:29 (libdyld.dylib+0x000000005254)

  Previous read of size 4 at 0x000105bbd864 by thread T7:
    #0 Dispatch dispatch.c:434 (X11.bin+0x000100352fc8)
    #1 dix_main main.c:287 (X11.bin+0x00010036e874)
    #2 server_thread quartzStartup.c:66 (X11.bin+0x000100039e23)

  Location is global 'miEventQueue' at 0x000105bbd860 (X11.bin+0x0001005ab864)

  Mutex M1945 (0x000105bbdd78) created at:
    #0 pthread_mutex_init <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000253c3)
    #1 input_lock inputthread.c:103 (X11.bin+0x00010049fd10)
    #2 TimerSet WaitFor.c:348 (X11.bin+0x0001004926c2)
    #3 RootlessQueueRedisplay rootlessScreen.c:594 (X11.bin+0x000100065d3f)
    #4 RootlessInstallColormap rootlessScreen.c:514 (X11.bin+0x000100069eda)
    #5 miSpriteInstallColormap misprite.c:562 (X11.bin+0x000100467075)
    #6 miCreateDefColormap micmap.c:270 (X11.bin+0x000100440379)
    #7 DarwinScreenInit darwin.c:285 (X11.bin+0x00010003036b)
    #8 AddScreen dispatch.c:3914 (X11.bin+0x00010036c3f7)
    #9 InitOutput darwin.c:671 (X11.bin+0x00010002fd9b)
    #10 dix_main main.c:197 (X11.bin+0x00010036e208)
    #11 server_thread quartzStartup.c:66 (X11.bin+0x000100039e23)

  Thread T7 (tid=4257217, running) created by main thread at:
    #0 pthread_create <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490)
    #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039d6d)
    #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039bd6)
    #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cd94)
    #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5f2)
    #5 server_main quartzStartup.c:136 (X11.bin+0x000100039ffb)
    #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002e65)
    #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e49)
    #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x0001000056e4)
    #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
    #10 start <null>:29 (libdyld.dylib+0x000000005254)

SUMMARY: ThreadSanitizer: data race mieq.c:263 in mieqEnqueue
==================

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2016-09-22 14:55:01 -07:00
Keith Packard
fc1c358b95 Bump to 1.18.99.901 (1.19 RC1)
Signed-off-by: Keith Packard <keithp@keithp.com>
2016-09-19 09:02:57 -07:00
Keith Packard
3ef51c5c74 Bump version to 1.18.99.2
Prepare for 1.19 RC1

Signed-off-by: Keith Packard <keithp@keithp.com>
2016-09-16 10:57:23 -07:00
Jon Turney
f5f4d32ac7 Add Windows-DRI extension
If windowsdriproto headers are available, build a Windows-DRI extension,
which supports requests to enable local clients to directly render GL to a
Windows drawable:

- a query to check if WGL is being used on a screen
- a query to map a fbconfigID to a native pixelformatindex
- a query to map a drawable to a native handle

Windows-DRI can only be useful if we are using WGL, so make an note if WGL
is active on a screen.

Make validGlxDrawable() public

Adjust glxWinSetPixelFormat() so it doesn't require a context, just a
screen and config.

That enables factoring out the deferred drawable creation code as
glxWinDeferredCreateDrawable()

Enhance glxWinDeferredCreateDrawable(), so that pixmaps are placed into a
file mapping, so they exist in memory which can be shared with the direct
rendering process.

Currently, this file mapping is accessed by a name generated from the XID.
This will not be unique across multiple server instances. It would perhaps
be better, although more complicated, to use an anonymous file mapping, and
then duplicate the handle for the direct rendering process.

Use glxWinDeferredCreateDrawable() to ensure the native handle exists for
the Windows-DRI query to map a drawable to native handle.

v2:
Various printf format warning fixes

v3:
Fix format warnings on x86
Move some uninteresting windows-dri output to debug log level

v4:
check for windowsdriproto when  --enable-windowsdri
use windowsdriproto_CFLAGS

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-09-15 20:10:29 +01:00
Alan Coopersmith
c4799f186b os: Use pthread_setname_np to set thread names if available
Autoconf logic borrowed from glib

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-13 16:55:26 -04:00
Keith Packard
d2558f063a Build glamor when Xorg or Xephyr are built.
Requires gbm when building Xorg so that xf86-video-modesetting will
work.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-08-13 09:04:32 -07:00
Keith Packard
d6eff3c31e os: Add ospoll interface [v2]
This provides a wrapper around poll or epoll providing a
callback-based interface for monitoring activity on a large set of
file descriptors.

v2: use xserver_poll API instead of poll. Don't use WSAPoll as
    that is broken.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-21 15:04:47 -04:00
Brian M. Clapper
711c36558f os: Add poll emulation for mingw [v2]
v2: rename as 'xserver_poll' to avoid potential library name
    collisions. Provide 'xserver_poll.h' which uses the system
    poll where available and falls back to this emulation otherwise.
    Autodetects when this is required, building the emulation only
    then

Source: https://github.com/bmc/poll
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-07-19 11:08:21 -07:00
Keith Packard
05a793f5b3 dix: Switch to the libXfont2 API (v2)
This new libXfont API eliminates exposing internal X server symbols to
the font library, replacing those with a struct full of the entire API
needed to use that library.

v2: Use libXfont2 instead of libXfont_2

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18 15:25:59 -04:00
Adam Jackson
3762edded8 configure: Tell AC_REPLACE_FUNCS where to find replacements
Fixes weird link errors of the form:

      CCLD     Xvfb
    ../../Xext/.libs/libXext.a(xvmc.o): In function `xf86XvMCRegisterDRInfo':
    /home/ajax/git/xserver/Xext/xvmc.c:828: undefined reference to `strlcpy'
    /home/ajax/git/xserver/Xext/xvmc.c:829: undefined reference to `strlcpy'
    ../../os/os.O: In function `siHostnameAddrMatch':
    /home/ajax/git/xserver/os/access.c:1821: undefined reference to `strlcpy'
    ../../os/os.O: In function `AuthAudit':
    /home/ajax/git/xserver/os/connection.c:555: undefined reference to `strlcpy'
    /home/ajax/git/xserver/os/connection.c:574: undefined reference to `strlcpy'
    ../../os/os.O:/home/ajax/git/xserver/os/log.c:972: more undefined references to `strlcpy' follow
    collect2: error: ld returned 1 exit status
    Makefile:688: recipe for target 'Xvfb' failed
    make[3]: *** [Xvfb] Error 1
    Makefile:749: recipe for target 'all-recursive' failed
    make[2]: *** [all-recursive] Error 1
    Makefile:608: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    Makefile:776: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2016-06-30 13:12:08 -04:00
Peter Hutterer
c69bd15e00 Allow compile-time selection of a fallback input driver
A new --with-fallback-input-driver=foo option allows selecting a
fallback driver for the server if the driver configured for the device
is not found.  Note that this only applies when the device has a driver
assigned and that module fails to load, devices without a driver are
ignored as usual.

This avoids the situation where a configuration assigns e.g. the
synaptics driver but that driver is not available on the system,
resulting in a dead device. A fallback driver can at least provides some
functionality.

This becomes more important as we move towards making other driver true
leaf nodes that can be installed/uninstalled as requested. Specifically,
wacom and synaptics, a config that assigns either driver should be
viable even when the driver itself is not (yet) installed on the system.

It is up to the distributions to make sure that the fallback driver is
always installed. The fallback driver can be disabled with
--without-fallback-input-driver and is disabled by default on non-Linux
systems because we don't have generic drivers on those platforms.
Default driver on Linux is libinput, evdev is the only other serious
candidate here.

Sample log output:
[  3274.421] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event4)
[  3274.421] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad weird driver"
[  3274.421] (II) LoadModule: "banana"
[  3274.422] (WW) Warning, couldn't open module banana
[  3274.422] (II) UnloadModule: "banana"
[  3274.422] (II) Unloading banana
[  3274.422] (EE) Failed to load module "banana" (module does not exist, 0)
[  3274.422] (EE) No input driver matching `banana'
[  3274.422] (II) Falling back to input driver `libinput'
.. server proceeds to assign libinput, init the device, world peace and rainbows
everywhere, truly what a sight. Shame about the banana though.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-08 13:08:32 -04:00
Jonas Ådahl
a779fda224 xwayland: Use the CLOCK_MONOTONIC clock
By default the X server will try CLOCK_MONOTONIC_COARSE before
CLOCK_MONOTONIC, while A Wayland compositor may only support getting
their timestamps from the CLOCK_MONOTONIC clock. This causes various
issues since it may happen that a timestamp from CLOCK_MONOTONIC
retrieved before a sending an X request will still be "later" than the
timestamp the X server than gets after receiving the request, due to the
fact that CLOCK_MONOTONIC_COARSE has a lower resolution.

To avoid these issues, make Xwayland always use CLOCK_MONOTONIC, so
that it becomes possible for Wayland compositor only supporting
CLOCK_MONOTONIC and X server to use the same clock.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-31 08:44:38 +10:00
Keith Packard
30ac756798 Create a threaded mechanism for input [v7]
The current SIGIO signal handler method, used at generation of input events,
has a bunch of oddities. This patch introduces an alternative way using a
thread, which is used to select() all input device file descriptors.

A mutex was used to control the access to input structures by the main and input
threads. Two pipes to emit alert events (such hotplug ones) and guarantee the
proper communication between them was also used.

Co-authored-by: Fernando Carrijo <fcarrijo@freedesktop.org>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>

v2: Fix non-Xorg link. Enable where supported by default.

    This also splits out the actual enabling of input threads to
    DDX-specific patches which follow

v3: Make the input lock recursive

v4: Use regular RECURSIVE_MUTEXes instead of rolling our own
    Respect the --disable-input-thread configuration option by
    providing stubs that expose the same API/ABI.

    Respond to style comments from Peter Hutterer.

v5: use __func__ in inputthread debug and error mesages.

    Respond to style comments from Peter Hutterer.

v6: use AX_PTHREAD instead of inlining pthread tests.

    Suggested by Emil Velikov <emil.l.velikov@gmail.com>

v7: Use pthread_sigmask instead of sigprocmask when using threads

    Suggested by Adam Jackson <ajax@redhat.com>

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-05-26 16:07:54 -07:00
Keith Packard
6a5a4e6037 Remove SIGIO support for input [v5]
This removes all of the SIGIO handling support used for input
throughout the X server, preparing the way for using threads for input
handling instead.

Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls
to stub functions input_lock/input_unlock so that we don't lose this
information.

xfree86 SIGIO support is reworked to use internal versions of
OsBlockSIGIO and OsReleaseSIGIO.

v2: Don't change locking order (Peter Hutterer)
v3: Comment weird && FALSE in xf86Helper.c
    Leave errno save/restore in xf86ReadInput
    Squash with stub adding patch (Peter Hutterer)
v4: Leave UseSIGIO config parameter so that
    existing config files don't break (Peter Hutterer)
v5: Split a couple of independent patch bits out
    of kinput.c (Peter Hutterer)

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Jeremy Huddleston Sequoia
1bb932bf14 XQuartz: Fix default CFBundleVersion
m4/shell variable name collision broke the case when the configure
option was not used

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-18 13:15:57 -04:00
Jeremy Huddleston Sequoia
d6ba4f2c52 XQuartz: Add --with-bundle-version and --with-bundle-version-string configure options
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-04 00:08:34 -07:00
Jeremy Huddleston Sequoia
c1614928c1 XQuartz: Add --with-sparkle-feed-url configure option
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-03 23:29:48 -07:00
Jeremy Huddleston Sequoia
16d6733c63 XQuartz: Fix the help text for --with-bundle-id-prefix
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-03 23:29:48 -07:00
Jeremy Huddleston Sequoia
214a66b661 XQuartz: Remove --with-launchd-id-prefix
It's been deprecated for years.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-03 23:29:48 -07:00
Alexandre Courbot
4cc3288073 configure.ac: Keep environment CFLAGS when testing
DRI2 detection could fail if configure is invoked with a sysroot passed
as CFLAGS. Ideally configure should invoke gcc with the sysroot argument
passed to the configure script, but for some reason this is not done by
AC_COMPILE_IFELSE.

Fix this by ensuring CFLAGS are preserved when checking for stuff.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-04-25 15:14:30 -04:00
Jon Turney
a6288f0954 hw/xwin: xcbify internal window manager
Convert the code for the multiwindow mode internal window manager to xcb

xcb conversion avoids xlib/xserver namespace collision and _XSERVER64 type
sizing issues

v2: Various fixes
v3: Don't include X11/extensions/windowswmstr.h, which uses the Display type
and thus depends on Xlib.h, just for _WINDOWSWM_NATIVE_HWND
v4: Fix indentation, add some error handling.
Fix a bug with ConfigureNotify handling
v5: Fix a bug which prevented WM_NORMAL_HINTS from being checked

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-04-07 10:31:39 +01:00
Jon Turney
6a64b9d7af hw/xwin: xcbify code for converting X11 icon to Win32 icon
Convert the code for converting an X11 icon to Win32 icon from Xlib to xcb.

v2: some warning fixes in winXIconToHICON()
v3: declaration-after-statement warning fixes
v4: printf format fixes
v5: convert in place rather than in a library

This also avoids the xlib/xserver namespace collision issues, so
winmultiwindowicons.h can be included everywhere it should be, which fixes
compilation with -Werror=implicit-function-declaration

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-04-07 10:30:48 +01:00
Rui Matos
40a164b8f4 build: Enable vidmode independently from Xorg
This allows building Xwayland without Xorg and still include the
vidmode extension.

v2: Use PKG_CHECK_EXISTS instead of PKG_CHECK_MODULES

Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-03-08 12:31:18 -05:00
Jonas Ådahl
a2c3c34b44 xwayland: Correctly detect whether posix_fallocate exists
We had HAVE_POSIX_FALLOCATE checks, but no such macros were ever
defined anywhere. This commit makes it so that this macro is defined if
the posix_fallocate is detected during configure.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2016-03-08 10:05:44 -05:00
Laércio de Sousa
9c88cb9b05 kdrive/ephyr: map host X server's keymap into Xephyr, if supported
Currently Xephyr doesn't inherit host X server's keymap, which
may lead to keymap mismatches when using a non-US keyboard in a
window inside Xephyr. This patch makes Xephyr change its keymap
to match host X server's one (unless XKB support is disabled),
using xcb-xkb to retrieve the needed XKB controls.
This implementation is analogous to Xnest one at commit 83fef4235.

Supersedes: https://patchwork.freedesktop.org/patch/67504

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-03-01 11:00:34 -05:00
Adam Jackson
bf23db42a4 modesetting: Require sufficiently new libdrm
Bugzilla: https://bugs.freedesktop.org/93883
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2016-01-27 12:53:49 -05:00
Bob Ham
7c0ba32ddd xserver: Fix configure.ac check for libsystemd/-daemon
The configure script looks for the libsystemd-daemon pkg-config
module.  If the configure script finds it, the script will add
libsystemd-daemon to a list of modules which are used to consolidate
CFLAGS and LIBS.

The check for libsystemd-daemon was altered to fallback to libsystemd
if libsystemd-daemon was not found (libsystemd-daemon was brought into
libsystemd).  Unfortunately, the configure script still adds
"libsystemd-daemon" to the list of modules to consolidate, instead of
"libsystemd".  With this patch, we set a variable depending on which
pkg-config module is found and add that to the module list instead.

Changes since v1:
- Rearranged logic so that we do a versioned check for libsystemd
  first, then look for libsystemd-daemon.
- Cleaned up the check a bit, only performing the module checks if we
  don't have --with-systemd-daemon=no, in a similar style to
  --with-dtrace.
- Changed the variable name to LIBSYSTEMD_DAEMON as per feedback.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Bob Ham <bob.ham@collabora.com>
2015-12-08 11:48:36 -05:00
Keith Packard
e10ba9e4b5 Remove non-smart scheduler. Don't require setitimer.
This allows the server to call GetTimeInMillis() after each request is
processed to avoid needing setitimer. -dumbSched now turns off the
setitimer.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-12-01 13:54:54 -05:00
Adam Jackson
f2ceb683c2 Post-release version bump for 1.19
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-11-09 16:22:12 -05:00
Adam Jackson
43fb888bd0 xserver 1.18.0
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-11-09 16:00:26 -05:00
Adam Jackson
d8b7a900cf xserver 1.17.99.902 (1.18 RC2)
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-10-26 13:47:04 -04:00
Samuel Thibault
08c4912406 xorg-wrapper: fix build without libdrm
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-10-19 12:11:54 -04:00
Samuel Thibault
a4cd8ee5f8 hurd: disable detecting drm
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-10-19 12:11:48 -04:00
Egbert Eich
dabf7c3590 libxf86config: Remove
The library used by the Xserver to read and parse the configuration file
could be built so that it culd be installed as a separate lib and used
by external programs.

Apparently there has not been any interest in this for quite a while as
this library has been broken for a long time now in the sense that it
was calling functions provided by the Xserver which were not implemented
for the external library.

Since this library is useless as it is anyway when built let's drop
support for it.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2015-09-23 14:28:56 -04:00
Tomas Carnecky
44ea291b78 Remove NO_LIBCWRAPPER define
I'll just refer to 1faba79 (Death to libcwrapper., 2007-12-03).

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Tomas Carnecky <tomas.carnecky@gmail.com>
2015-09-23 11:03:26 -04:00
Alan Coopersmith
aa5606be1c Make configure test for LD_NO_UNDEFINED_FLAG on Solaris work w/autoconf 2.69
After upgrading from autoconf 2.68 to 2.69, this test started failing with
"conftest.c", line 149: undefined symbol: NULL
so use a raw 0 pointer to avoid header dependencies in the autoconf
generated test case.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2015-09-21 16:08:30 -07:00
Jon TURNEY
cdd1d58159 mingw: Fix NO_LOCAL_CLIENT_CRED build
Commit 4b4b9086 "os: support new implicit local user access mode [CVE-2015-3164
2/3]" carefully places the relevant code it adds under !NO_LOCAL_CLIENT_CRED,
but unfortunately doesn't notice that NO_LOCAL_CLIENT_CRED is defined as a
side-effect in the middle of GetLocalClientCreds(), so many of these checks
precede its definition.

Move the check if NO_LOCAL_CLIENT_CRED should be defined to configure.ac, so it
always occurs before it's first use.

v2:
Move check to configure.ac

v3:
Use AC_CACHE_CHECK and name cache varaible appropriately

[ajax: Massaged commit message]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Ray Strode <rstrode@redhat.com>
2015-09-21 13:07:02 -04:00
Javier Jardón
f8a2c087c8 configure.ac: Add support for new versions of systemd
... that only provide a unique libsystemd.pc file

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Javier Jardón <jjardon@gnome.org>
2015-09-21 13:06:49 -04:00
Jon TURNEY
75ee874e43 Build fix for DMX
./../dix/.libs/libdix.a(pixmap.o): In function `PixmapStartDirtyTracking':
xorg/xserver/dix/pixmap.c:194: undefined reference to `RRTransformCompute'

I'm not quite sure how 0db457b fixes this

Move RANDR_LIB to after DIX_LIB, so the reference to RRTransformCompute in
DIX_LIB is satisfied.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-10 07:39:54 -07:00
Keith Packard
dbfed3a291 Bump version to 1.17.99.901 (1.18 RC1)
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-01 19:03:33 -07:00
Olivier Fourdan
d206c240c0 configurable maximum number of clients
Make the maximum number of clients user configurable, either from the command
line or from xorg.conf

This patch works by using the MAXCLIENTS (raised to 512) as the maximum
allowed number of clients, but allowing the actual limit to be set by the
user to a lower value (keeping the default of 256).

There is a limit size of 29 bits to be used to store both the client ID and
the X resources ID, so by reducing the number of clients allowed to connect to
the X server, the user can increase the number of X resources per client or
vice-versa.

Parts of this patch are based on a similar patch from Adam Jackson
<ajax@redhat.com>

This now requires at least xproto 7.0.28

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-24 00:00:18 -07:00
Adam Jackson
0db457b2b5 dmx: Fix the build
Broken since:

    commit 4fd81823fafcd103e8d890f4c0f7c2f90e822336
    Author: Dave Airlie <airlied@gmail.com>
    Date:   Tue Jun 30 14:54:42 2015 +1000

        prime: add rotation support for offloaded outputs (v2)

Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 15:56:55 -04:00
Keith Packard
8a8d51358c Merge remote-tracking branch 'airlied/for-keithp' 2015-06-29 21:04:53 -07:00
Dave Airlie
ea0e4d752b glamor: add support for allocating linear buffers (v2)
We need this for doing USB offload scenarios using glamor
and modesetting driver.

unfortunately only gbm in mesa 10.6 has support for the
linear API.

v1.1: fix bad define
v2: update the configure.ac test as per amdgpu. (Michel)
set linear bos to external to avoid cache. (Eric)

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 12:17:55 +10:00
Laércio de Sousa
8c86dd5160 configure.ac: fix code misplacing for KDRIVE_{KBD, MOUSE, EVDEV} auto-detection
KDrive input drivers "kbd", "mouse", and "evdev" should be automatically built
for linux systems. However, due to a code misplacing in configure.ac, the
auto-detection test is being performed AFTER the corresponding AC_DEFINEs' calls,
so that the drivers are NOT being built, regardless the test result.

This bug should be affecting previous xorg-server releases. Please consider
backporting this patch to all maintained ones!

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-24 20:10:43 +10:00
Egbert Eich
5af73f4908 Xephyr: Don't crash when no command line argument is specified
The DDX specific command line parsing function only gets called
if command line arguments are present. Therefore this function
is not suitable to initialize mandatory global variables.
Replace main() instead.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-12 09:49:49 -07:00
Keith Packard
0409b6e6d6 Merge remote-tracking branch 'evelikov/master' 2015-05-11 16:50:43 -07:00
Alan Coopersmith
28ff661e73 Remove empty stub of $host_cpu case statement in configure.ac
Left behind when commit 5c12399b6c moved the xorg_bus_* settings
elsewhere.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
2015-04-21 16:58:08 -07:00
Alan Coopersmith
d4e85afac6 Accept x86_64 as well as i*86 for $host_cpu in Solaris on x86
Needed when using a compiler that defaults to 64-bit output when
configure is checking for $host_cpu.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
2015-04-21 16:58:08 -07:00
Alan Coopersmith
0887c9463f Import reallocarray() from OpenBSD
Wrapper for realloc() that checks for overflow when multiplying
arguments together, so we don't have to add overflow checks to
every single call.  For documentation on usage, see:
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/calloc.3

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:08 -07:00
Keith Packard
f1da6bf5d9 Require randrproto version 1.5.0 or newer
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-03-31 17:07:43 -07:00
Emil Velikov
a34d29c2ed configure.ac: remove remaining TLS references
No longer used with the removal of the GL dispatch (glapi) from libglx a
few releases ago.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24 17:20:26 +00:00
Keith Packard
3a06faf3fc Mark development version for 1.18
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-02-10 22:16:53 -08:00
Keith Packard
28f6427aec Update to version 1.17.0
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-02-02 07:41:06 +01:00
Keith Packard
58f28b0427 Update to version 1.16.99.902
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-23 10:59:39 -08:00
Peter Hutterer
de89c6b8c6 xfree86: rename Xorg.bin to Xorg
If the suid wrapper is enabled, /usr/bin/Xorg is just a shell script that
execs either /usr/libexec/Xorg.bin directly or the Xorg.wrap binary which then
execve's /usr/libexec/Xorg.bin.

Either way, we end up with Xorg.bin, which is problematic for two reasons:
* ps shows the command as Xorg.bin
* _COMM and _EXE in systemd's journal will both show Xorg.bin as well

There's not much we can do about the path, but having the actual command stay
as Xorg means better compatibility to existing scripts. And, the reason for
this path: the command
   journalctl _COMM=Xorg
works universally, regardless of whether the wrapper is used or not.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
2015-01-05 09:53:58 +10:00
Alan Coopersmith
d153a85f74 Add request length checking test cases for some Xinput 1.x requests
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-08 18:09:49 -08:00
Keith Packard
e9db768202 Update to version 1.16.99.901
1.17 RC1

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-28 21:32:24 -07:00
Keith Packard
f36f16f055 dri2: Distribute new pci_ids headers
Create hw/xfree86/dri2/pci_ids/Makefile.am which includes all of the new
pci id files in the tarballs. Build that from configure.ac, and run it
from dri2/Makefile.am

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-28 21:30:23 -07:00
Keith Packard
3a123fbdda Merge remote-tracking branch 'jturney/master'
Conflicts:
	hw/xwin/winpixmap.c

Adam removed a pile of windows code, including this file.
2014-10-27 15:39:26 -07:00
Keith Packard
de55aafa8f Merge remote-tracking branch 'ajax/xwin' 2014-10-23 17:28:24 -07:00
Jon TURNEY
7ea4a21fee configure.ac: Force --disable-libdrm on Cygwin
This is now needed to avoid trying to build the modesetting driver by default
when building the Xorg DDX on Cygwin.

http://tinderbox.x.org/builds/2014-09-18-0011/logs/xserver/#build

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-10-09 16:49:29 +01:00
Jon TURNEY
883927d2e8 configure.ac: Avoid "Your OS is unknown" warning when configuring for Cygwin
Don't emit "Your OS is unknown" warning when configuring with --enable-xorg to
build the XOrg DDX for Cygwin.

The list of supported OSes is getting a bit unwieldy, so just remove it.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-10-09 16:42:50 +01:00
Alan Coopersmith
da887726ee Use unique display name for each xi2 test program [v3]
make -j 8 check was sporadically failing in different xi2 tests.
After adding the asserts in the previous commit to catch xkb failure
it became easier to catch the failures and see that multiple tests
were running at once trying to write to /tmp/server-(null).xkm and
then delete it, and interfering with each other.

Putting a unique string into the display variable let them each write
to their own file and not interfere with others.

v2: Fix Linux bits:

  Add #include <errno.h> to get a declaration of
  program_invocation_name on Linux.

  Use only the last portion of the pathname so that the resulting
  display name doesn't contain any slashes.

v3: use program_invocation_short_name on Linux

  This is the same as program_invocation_name, except is has
  stripped off any path prefix.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-09 14:15:45 +02:00
Adam Jackson
c79f824bf6 xwin: Remove primary DirectDraw engine
Again, as the documentation says, "unsupported, obsolete".

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 09:28:04 +02:00
Adam Jackson
8465ee788f xwin: Remove native GDI engine (v2)
As the man page says, "unsupported, experimental, and barely
functional".  The last even minor updates to any of this were back in
2004, presumably it's not getting better any time soon.

This is also the only GC ops implementation in the tree that actually
falls all the way down to the spans routines for everything, so that's
pretty nice to be rid of.

v2: Fix stray break statement (Jon)

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 09:27:21 +02:00
Keith Packard
78c27d12e1 Merge remote-tracking branch 'jturney/xwin-clipboard-refactoring' 2014-09-29 13:04:49 -07:00
Keith Packard
cc59be38b7 os: Don't listen to 'tcp' by default. Add '-listen' option. [v2]
This disables the tcp listen socket by default. Then, it
uses a new xtrans interface, TRANS(Listen), to provide a command line
option to re-enable those if desired.

v2: Leave unix socket enabled by default. Add configure options.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-22 13:52:20 -07:00
Keith Packard
8ada3fb32c Require xtrans 1.3.5 or newer
This version of xtrans offers the TRANS(Listen) function.

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-22 13:52:20 -07:00
Keith Packard
69d8572ae4 Build required portions of registry.c automatically [v2]
Instead of making the inclusion of the registry code a global
conditional, split the registry into two pieces; the bits required by
the X-Resource extension (the resource names) and the bits required by
the XCSECURITY extension (the protocol names). Build each set of code
if the related extension is being built.

v2: Check for both XCSECURITY and XSELINUX.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-09-18 15:29:29 -07:00
Adam Jackson
670ee0757f ephyr: Properly implement hardware cursors (v3)
When dix hands us a new cursor we proxy it through to the host server;
since we keep the host XID on the cursor bits private we can switch
among them with just ChangeWindowAttributes.

v2:
Use xcb-renderutil for argb format lookup (Uli, Keith)
Fall back to core cursors for host RENDER < 0.5 (Keith)
Drop useless ephyrEnableCursor
Consistently create/destroy the cursor image GC on both paths
Treat null cursor from dix as invisible

v3:
Initialize the invisible cursor's image (Keith)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-18 15:27:10 -07:00
Keith Packard
eaee6572be Merge remote-tracking branch 'anholt/modesetting-import' 2014-09-17 15:49:24 -07:00
Eric Anholt
2feda3b6b5 modesetting: Connect the driver to the build.
v2: Fix libdrm version check, and use XORG_VERSION_* instead of a
    static 1.0.0 version for the driver module.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-09-16 16:28:42 -07:00
Adam Jackson
2e21c081d3 xfree86: Remove the memory of MTRR awareness
pciaccess does this for us, and none of our internal hooks really
remain.  This does remove a cleanup pass from the BSD code, but the case
it's covering (a previous server leaving MTRRs around) can't happen
anymore.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-16 11:58:53 -04:00
Jon TURNEY
88d4459704 hw/xwin: Move clipboard integration code down to a subdirectory
Move clipboard integration code down to a subdirectory and build as a
convenience library

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:28 +01:00
Jon TURNEY
a70c2384a2 hw/xwin: Remove SetSelectionOwner wrapper, use XFixesSetSelectionOwnerNotify event instead
Use the XFixesSetSelectionNotify event instead of a SetSelectionOwner wrapper,
the completely equivalent client-side mechanism.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:13 +01:00
Laércio de Sousa
3a51418b2d ephyr: set screen size & origin from host X server output's CRTC geometry
If a given output is passed via new -output option, Xephyr will query
host X server for its info. If the following conditions are met:

 a. RandR extension is enabled in host X server;
 b. supported RandR version in host X server is 1.2 or newer;
 c. the given output name is valid;
 d. the given output is connected;

then Xephyr will get output's CRTC geometry and use it to set its own
screen size and origin. It's just like starting Xephyr in fullscreen mode,
but restricted to the given output's CRTC geometry (fake "Zaphod mode").

This is the main feature needed for Xephyr-based single-card multiseat
setups where we don't have separate screens to start Xephyr in fullscreen
mode safely.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:14:55 -05:00
Ross Burton
4afedf545b configure.ac: add option for xshmfence
xshmfence is usable outside of DRI3, and is currently autodetected which isn't
good for distributions where deterministic builds are desired.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:00:43 -07:00
Adam Jackson
4302484ef2 dix: Remove arch awareness from servermd.h (v2)
At this point we have no architectures where image byte order is
different from bitmap bit order, or where either of those two are not
also the native word endianness.  Hooray, one more place where we don't
have to worry about enabling new CPU architectures.

v2: Rebase to master to handle the addition of ppc64le, arc, and xtensa,
and use autoconf's endianness detection instead of gcc predefines.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24 16:46:47 -07:00
Keith Packard
16fbad3c7a Post 1.16 version bump to 1.16.99.1
And we're off towards 1.17; this version bump serves to keep
development versions distinct from stable versions.

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-17 16:17:53 -07:00
Keith Packard
8b36e1ec8d Update to version 1.16.0
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-17 00:03:33 -07:00
Keith Packard
9308eafb7d Update to version 1.15.99.904
One more RC to get the non-PCI patches tested before release

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:28:26 -07:00
Kristian Høgsberg
2f113d68f6 xwayland: Add glamor and DRI3 support
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-24 15:09:55 -07:00
Alan Coopersmith
1095c26250 config: show default path in help for --with-xkb-bin-directory
Now shows:
  --with-xkb-bin-directory=DIR
                          Directory containing xkbcomp program (default:
                          ${bindir})

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-06 21:08:16 -07:00
Keith Packard
08820f0376 Update to version 1.15.99.903
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04 22:35:38 -07:00
Adam Jackson
4cbd3fabaa configure: Require sufficiently new wayland-client for xwayland ddx
The explicit release requests were added in 1.3.0, don't try to build
against older.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 11:16:09 -07:00
Rob Clark
b241934238 default to stub int10 implementation on arm
There should be no reason to need a real int10 implementation on arm,
and switching to stub is an easy way to fix:

  xf86x86emu.c: In function 'xf86Int10ExecSetup':
  xf86x86emu.c:56:9: error: unknown field 'xf_outb' specified in initializer
  xf86x86emu.c:57:9: error: unknown field 'xf_outw' specified in initializer
  xf86x86emu.c:58:9: error: unknown field 'xf_outl' specified in initializer

which is caused by the following in compiler.h:

  #define outb xf_outb
  #define outw xf_outw
  #define outl xf_outl

Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
2014-04-27 12:01:56 -04:00
Keith Packard
ba5c2b6c87 Merge remote-tracking branch 'krh/xwayland-for-keithp' 2014-04-21 14:59:51 -07:00
Julien Cristau
28fa5dd5ca configure: require xproto 7.0.26 for pointer typedef removal
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 11:56:39 -07:00
Julien Cristau
d2274f2f46 configure: require fontsproto 2.1.3 for pointer typedef removal
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 11:56:20 -07:00
Kristian Høgsberg
d2c6e801b5 configure.ac: Remove check for WAYLAND_SCANNER_RULES
This makes configure fail if the wayland autoconf macros aren't found.
We don't need the scanner for shm-only xwayland so just drop this line for
now.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2014-04-21 11:15:56 -07:00
Julien Cristau
208157a76c configure: fix help text for dmx
As of 93fa64e17d it's disabled by default,
so stop saying it's automatically enabled in configure --help.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-04-18 11:23:07 +02:00
Keith Packard
bd3de10f86 Bump to version 1.15.99.902. Closing the 1.16 merge window.
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-08 14:25:18 -07:00
Keith Packard
b4d0bec22c Merge remote-tracking branch 'krh/xwayland-for-keithp' 2014-04-03 15:35:01 -07:00
Kristian Høgsberg
6e539d8817 Xwayland DDX
Started out as an Xorg module to be used from Xorg drivers to let
Xorg run under a wayland server.  The idea was to be able to reuse the
2D acceleration from the Xorg driver.  Now with glamor being credible,
a better plan is to just make Xwayland its own DDX, similar to Xwin
and Xquartz.  This is a much better fit, as much of the code in the
original approach had to hack around Xorg doing Xorg things like take
over the VT, probe input devices and read config files.  Another big win
is that Xwayland dosn't need to be setuid root.

The Xwayland support for DRI3, Glamor and render nodes was done by
Axel Davy <axel.davy@ens.fr>, who also did a lot of work on the rebase
to the Xwayland DDX.

Contributions from:

  Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
  Corentin Chary <corentin.chary@gmail.com>
  Daniel Stone <daniel@fooishbar.org>
  Kristian Høgsberg <krh@bitplanet.net>
  Robert Bragg <robert@linux.intel.com>
  Scott Moreau <oreaus@gmail.com>
  Tiago Vignatti <tiago.vignatti@intel.com>
  Giovanni Campagna <gcampagn@redhat.com>
  Jonas Ådahl <jadahl@gmail.com>
  Ray Strode <rstrode@redhat.com>
  Trevor McCort <tjmccort@gmail.com>
  Rui Matos <tiagomatos@gmail.com>
  Axel Davy <axel.davy@ens.fr>
  Jasper St. Pierre <jstpierre@mecheye.net>

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2014-04-03 15:19:22 -07:00
Keith Packard
84f977467b Merge remote-tracking branch 'whot/for-keith' 2014-04-03 10:44:28 -07:00
Hans de Goede
9d65c515d8 xf86LogInit: log to XDG_DATA_HOME when not running as root
When no logfile was specified (xf86LogFileFrom == X_DEFAULT) and we're not
running as root log to $XDG_DATA_HOME/xorg/Xorg.#.log as Xorg won't be able to
log to the default /var/log/... when it is not running as root.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-04-03 14:17:35 +10:00
Hans de Goede
f37a469134 configure: Change DEFAULT_LOGPREFIX to really be a filename prefix
Rather then a full path prefix, this is a preparation patch for adding
support for logging to another location when not running as root.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-04-01 17:14:40 +10:00
Jon TURNEY
432fc37e2c Build fbcmap_mi.c once, rather than once for each DDX
Build fbcmap_mi.c once, rather than once for each DDX, and make it part of libfb
or libwfb convenience library.

Since 84e8de1271 we don't have fbcmap.c

This is a sort of revert of 17d85387d1

v2: Remove libkdrivestubs.la from configure.ac

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2014-03-27 14:34:06 +00:00
Gaetan Nadon
ca8f26f636 suid: replace deprecated AC_HELP_STRING with AS_HELP_STRING
Fixes automake warning.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-26 09:48:15 +10:00
Alan Coopersmith
bf087659f0 Add necessary headers for major()/minor() on Solaris to xf86Xinput.c
Without these, after commit fdb4ec86c2, it fails to build on Solaris,
with errors of:
xf86Xinput.c: In function 'xf86stat':
xf86Xinput.c:816:5: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration]
xf86Xinput.c:817:5: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-22 14:42:09 -07:00
Gaetan Nadon
99bee6c054 Default font path: remove the check for ${sysconfdir}/X11/fontpath.d
The location ${sysconfdir}/X11/fontpath.d is unknown at configuration time
(only at make time) as evidenced by the configuration output:

    checking for ${prefix}/etc/X11/fontpath.d... no

Unlike font-util for the X fonts, there is no mechanism to query where
fontpath.d is. Fedora have chosen /etc/X11 and others have followed, but this
is not a standard. It might also be installed at another location, it may or may
not be under the xserver installation prefix. We just don't know. Debian does
not use this at all.

Distros are using --with-default-path when they support fontpath.d, so they
never relied on the server default as it never worked.

The patch essentially is a noop, which leaves the door open for anyone who
could potentially provide a reliable implementation of choosing fontpath.d
when applicable.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-22 14:04:25 -07:00
Hans de Goede
e7b84ca469 Xorg: Add a suid root wrapper
With the recent systemd-logind changes it is possible to install the Xorg
binary without suid root rights and still have everything working as it
should *if* the user only has cards which are supported by kms.

This commit adds a little suid root wrapper, which is a bit weird, first we
strip the suid-root bit of the Xorg binary, and then we add a wrapper ?

The function of this wrapper is to see if a system still needs root-rights,
if it does not (it supports kms and the kms drivers are properly loaded),
then it will immediately drop all elevated rights before executing the real
Xorg binary. If it finds (some) cards which don't support kms, or no cards
at all, then it will execute the Xorg server with elevated rights so that
ie the nvidia binary driver and the vesa driver can keep working normally.

To make it possible for security concious users who don't need the root
rights to completely remove the wrapper, Xorg is started in a 3 step process
when the wrapper is enabled during build time:

1) A simple shell script which checks if the wrapper is there, if it is
  it executes the wrapper, if not it directly executes the real Xorg binary

2) The wrapper gets executed, does its checks, normally drops all elevated
  rights and then executes the real Xorg binary

3) The real Xorg binary does its thing

This allows distributions to put the wrapper binary in a separate package, and
will allow users to remove this package. IE the plan with Fedora is to make
"legacy" drivers depend on the wrapper pkg, and since our default install
contains some legacy drivers it will be part of the default install, but
users can later yum remove it (which will also automatically remove the
legacy driver packages as those won't work without it anyways).

The wrapper is loosely modelled after the existing Debian Xwrapper, it
uses the same config-file + config-file format, and also allows restricting
Xserver execution (through the wrapper) to console users only.

There also is a new needs_root_rights config file directive, which can
be used to override the auto-detection the wrapper does.

Hopefully this will allow Debian to replace their own wrapper with this
upstream one.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-12 08:50:05 +01:00
Keith Packard
1c61d38528 Merge remote-tracking branch 'jwrdecoede/for-keith' 2014-03-07 22:07:19 -08:00
Eric Anholt
8d1cca3063 xorg: Build a glamor_egl module.
This is not exposing the API we want long term, but it should get
existing DDX drivers up and running while we massage the API into
shape.

v2: Use LIBADD instead of LDFLAGS to fix deps on libglamor.la, and use
    version 0.5.1 (the point it was forked from the external repo).

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-05 13:10:17 -08:00
Eric Anholt
9fe052d90c xephyr: Build support for rendering with glamor using a -glamor option.
v2: Avoid making the Ximage for the screen that we'll never use, and
    drive the screen pixmap creation for glamor ourselves.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com> (v1)
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-05 13:10:12 -08:00
Hans de Goede
82863656ec systemd-logind: Add systemd-logind "core"
This commits add the bulk of the systemd-logind integration code, but does
not hook it up yet other then calling its init and fini functions, which
don't do that much.

Note the configure bits check for udev since systemd-logind use will only be
supported in combination with udev. Besides that it only checks for dbus
since all communication with systemd-logind is happening over dbus, so
no further libs are needed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03 08:13:55 +01:00
Keith Packard
c85ea92af1 Bump to 1.15.99.901
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-02-24 09:51:39 -08:00
Eric Anholt
0373b3f4f7 glamor: Convert to using libepoxy.
Libepoxy hides all the GL versus GLES2 dispatch handling for us, with
higher performance.

v2: Squash in the later patch to drop the later of two repeated
    glamor_get_dispatch()es instead (caught by keithp)

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-02-14 18:28:56 -08:00
David Heidelberger
9eecc9ac73 configure.ac: add missing "test"
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-02-07 16:18:32 -08:00
Adam Jackson
7305153643 configure: Don't add GLX_SYS_LIBS to XORG_SYS_LIBS
libglx.so is linked against libGL.so, but Xorg itself should not be.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-02-07 15:38:10 -08:00
Hans de Goede
480590b90c dbus-core: Make dbus-core no longer mutually exclusive with udev
With systemd-logind the dbus-core will be used for more then just config, so
it should be possible to build it even when using a non dbus dependent config
backend.

This patch also removes the config_ prefix from the dbus-core symbols.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-01-29 15:28:58 -08:00
Peter Hutterer
c29454ae9d config: drop the dbus API
This API has been disabled by default since 1.4, the first release it came in.
There a no known users of it and even its direct replacement (HAL) has
been superseeded by udev on supported platforms since 1.8.

This code is untested, probably hasn't been compiled in years and should not
be shipped.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-01-29 15:28:57 -08:00
Łukasz Stelmach
b3d3ffd199 configure.ac: enable systemd socket activation in libxtrans
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-29 15:28:46 -08:00
Keith Packard
0fbb3d711e Merge remote-tracking branch 'anholt/glamor-reformat'
Conflicts:
	Makefile.am

Conflict caused by adding PSEUDORAMIX and GLAMOR directory defines in
separate branches
2014-01-27 14:11:09 -08:00
Keith Packard
0b5a87f37d pseudoramiX: Only compile on XQUARTZ and XWIN
PseudoramiXExtensionInit() is not defined in extinit.h if it won't be
used and we get a compiler warning when compiling the pseudoramiX code.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-27 11:38:36 -08:00
Eric Anholt
d26f533515 glamor: Hook the module back up to the build.
For now we're just building an uninstalled library.  The extra EGL
stubs are required so that we can get the DIX building and usable
without pulling in the xf86 DDX code in glamor_egl.c.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-01-27 09:30:47 -08:00
Gaetan Nadon
771f390efd autoconf: fix warning by replacing AC_WARN with AC_MSG_WARN
A warning about the macro generating the warnings to the user...

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-01-22 11:18:44 -08:00
Gaetan Nadon
02d866a088 autoconf: fix warning, replace AC_TRY_COMPILE with AC_COMPILE_IFELSE
The code produced in the configure script is identical.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-01-22 11:18:41 -08:00
Gaetan Nadon
e38c98fe74 autoconf: fix warning, replace AC_TRY_LINK with AC_LINK_IFELSE
The code produced in the configure script is identical.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-01-22 11:18:37 -08:00
Gaetan Nadon
4993590c90 autoconf: fix warning by replacing deprecated AC_HELP_STRING
We can also make do without the workaround introduced in 2005.
The 2.60 autoconf minimum version covers that now.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-01-22 11:18:17 -08:00
Gaetan Nadon
1d4dbc2f2b libtool: bump minimum required version to 2.2
LT_PREREQ([2.2])
LT_INIT

AC_CONFIG_MACRO_DIR([m4]) is recommended to locate local macros,
which is fully used starting automake 1.14.

ACLOCAL_AMFLAGS in Makefile.am is deprecated since automake 1.14.
The comment is to prevent developers from removing the statement
as suggested in 1.14 which would break earlier versions.

Automake 1.14 is already in use by many.
This patch works on versions prior and post 1.14

References:
Building the X Window System from Source:
http://www.x.org/wiki/Building_the_X_Window_System/#index2h3

Discussion on xorg minimum autotools requirements:
http://lists.x.org/archives/xorg-devel/2013-October/038325.html

Tested with autoconf 2.60, automake 1.10.3 and libtool 2.2

The same upgrade will be applied to libraries and drivers.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-01-22 11:05:30 -08:00
Keith Packard
93fa64e17d Don't build dmx by default
It's clearly un-loved, having piles and piles of warnings. If someone
wants to fix it up to compile without warnings, we can re-enable it.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:51 -08:00
Keith Packard
a92c6406e7 Bump release to 1.15.99.900
The merge window for 1.16 is open

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-01-09 11:11:22 +08:00
Keith Packard
2ea973e12f Bump version to 1.15.0
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-12-27 09:50:55 -08:00
Keith Packard
a68df14742 Bump version to 1.14.99.905 (1.15 RC5)
Another week, another RC. This should be the last before 1.15 final

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-12-19 14:31:07 -08:00
Keith Packard
4d62646142 Merge remote-tracking branch 'jeremyhu/master' 2013-12-16 09:27:57 -08:00
Adam Jackson
f4bfb14f53 configure: Fix a typo near dri3/shmfence detection
" is not the mate of ].

Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-12-13 15:08:44 -05:00
Jeremy Huddleston Sequoia
81ba89d670 configure.ac: Add PRESENT_LIB to XQUARTZ_LIBS
Undefined symbols for architecture x86_64:
  "_present_extension_init", referenced from:
      _staticExtensions in libXquartz.a(miinitext.o)
  "_present_register_complete_notify", referenced from:
      ___glXregisterPresentCompleteNotify in libglx.a(glxcmds.o)

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-12-13 01:39:44 -08:00
Keith Packard
b3533d0b21 Bump version to 1.14.99.904 (1.15 RC4)
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-12-10 10:29:11 -08:00
Jon TURNEY
9a4d7572fe hw/xwin/glx: Rewrite WGL wrappers after Xserver conversion to direct GL dispatch
v1: Rewrite by Marc Haesen of the WGL wrapper function generation script to use
Khronos group XML.

v2: Remove -dispatchheader option, since dispatch.h doesn't exist anymore, use
the private glapi interface to construct the GL dispatch table for the native
WGL thunks.

v3:
Rewrite to generate shims for the OpenGL 1.2.1 (GL 1.2 + GL_ARB_imaging
+GL_ARB_multitexture + GL_ARB_texture_compression(?)) functions the server links
directly with rather than libGL.

These shims dispatch to either the mesa GL DLL, or a thunking DLL containing
cdecl-to-stcall wrapper functions for the native GL DLL.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-12-10 17:00:06 +00:00
Jon TURNEY
875dbcef5b configure.ac: Link XWin with present extension if we are building with it enabled
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-12-10 16:59:26 +00:00
Keith Packard
f69f4f417c Depend on latest glproto (1.4.17)
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-12-10 07:09:55 -08:00
Jon TURNEY
57a8ce9273 configure.ac: Fixup for "Require libpciaccess for int10"
On 16/11/2013 01:00, Connor Behan wrote:
> A --disable-pciaccess build will fail with an int10 module other than
> stub.
>
> Signed-off-by: Connor Behan <connor.behan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  configure.ac | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 5e621e0..a843770 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1822,6 +1822,9 @@ if test "x$XORG" = xyes; then
>  		if test "x$CONFIG_UDEV_KMS" = xyes; then
>  			AC_MSG_ERROR([Platform device enumeration requires libpciaccess])
>  		fi
> +		if test "x$INT10" != xstub; then
> +			AC_MSG_ERROR([Cannot build int10 without libpciaccess])
> +		fi
>  	fi
>  	AC_MSG_RESULT([$PCI])
>

This causes my build to fail where --disable-int10-module --disable-pciaccess
is the default (as INT10 still has the default value 'x86emu')

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-12-05 10:40:11 -08:00
Keith Packard
eafba23b34 miext/sync: Handle libxshmfence API change
libxshmfence had an unfortunate 'int32_t' type for the mapped fence.
That changed to exposing a 'struct shmfence' instead, which is nice
and opaque and offers fine type checking across the API.

This patch requires the newer version of the library and uses
the new interface type.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-12-02 12:57:11 -08:00
Keith Packard
5a969f0928 Select directory for MIT-SHM temp files at configure time
By default, this looks through a list of directories to find one which
exists, but can be overridden with --with-shared-memory-dir=PATH

This patch doesn't actually do anything with this directory, just
makes it available in the configuration

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-12-02 12:56:33 -08:00
Connor Behan
bd70def077 configure.ac: Require libpciaccess for int10
A --disable-pciaccess build will fail with an int10 module other than
stub.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-26 21:47:46 -08:00
Connor Behan
a575c1dc64 configure.ac: Require libpciaccess for platform bus support
There is currently no reason to build with --enable-config-udev-kms and
--disable-pciaccess but anyone who tries this should know that the build
will fail.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-26 21:47:29 -08:00
Connor Behan
361dfe74ea configure.ac: Add whitespace near PCI configuration
Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-26 21:47:08 -08:00
Keith Packard
8048126766 Bump release to 1.14.99.903 (1.15 RC3)
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-23 22:22:37 -08:00
Peter Hutterer
da9997f89f configure: allow for --enable-libunwind and --disable-libunwind
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>
2013-11-18 16:53:07 -08:00
Alan Coopersmith
0ba7fc8472 Stop including inline assembly .il file for Solaris Studio builds
Since all the inb/outb/etc. use in the X server itself (except for
xf86SlowBcopy) has been replaced by calls to libpciaccess, we no
longer need to pass inline assembly files to replace the gcc inline
assembly from hw/xfree86/common/compiler.h when building Xorg itself.

The .il files are still generated and installed in the SDK for the
benefit of drivers who may use them.

Binary diff of before and after showed that xf86SlowBcopy was the
only function changed across the Xorg binary and all modules built
in the Xserver build, it just calls the outb() function now instead
of having the outb instructions inlined, making it a slightly slower
bcopy.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-14 13:12:21 +09:00
Keith Packard
2aa67ccef6 Update to version 1.14.99.902
1.15 RC2

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-14 10:26:20 +09:00
Alan Coopersmith
5b02d5b7aa Enable XTRANS_SEND_FDS on Solaris too.
Requires passing through the __EXTENSIONS__ and _XOPEN_SOURCE defines
in order to expose the msg_control members in struct msghdr.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-12 21:03:59 +09:00
Keith Packard
a239e6faf3 Merge remote-tracking branch 'jeremyhu/master' 2013-11-11 15:26:12 -08:00
Keith Packard
41da295eb5 Trap SIGBUS to handle truncated shared memory segments
If a client passes a section of memory via file descriptor and then
subsequently truncates that file, the underlying pages will be freed
and the addresses invalidated. Subsequent accesses to the page will
fail with a SIGBUS error.

Trap that SIGBUS, figure out which segment was causing the error and
then allocate new pages to fill in for that region. Mark the offending
shared segment as invalid and free the resource ID so that the client
will be able to tell when subsequently attempting to use the segment.

Signed-off-by: Keith Packard <keithp@keithp.com>

v2: Use MAP_FIXED to simplify the recovery logic (Mark Kettenis)
v3: Also catch errors in ShmCreateSegment

Conflicts:
	include/dix-config.h.in
	include/xorg-config.h.in
2013-11-11 15:16:07 -08:00
Keith Packard
719e880d76 Require libXtrans version 1.3.2
This has the FD passing support included

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-11 15:14:36 -08:00
Keith Packard
ea8acfe3e2 Require xextproto version 7.2.99.901
This includes the MIT-SHM FD passing requests

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-11-11 15:12:02 -08:00
Keith Packard
7aad79c5a5 Make XTrans FD passing support optional. Define only on Linux
Until other operating systems have a libXtrans port for FD passing,
disable this on non-Linux systems.

Note that this define affects how libXtrans gets built into the X
server, which is why it need only define the symbol

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-11 15:11:39 -08:00
Jeremy Huddleston Sequoia
81c123ea2d configure.ac: Move GLX section after DRI
The GLX section of configura.ac checks the state of DRI2, so it
needs to be after DRI2=auto is resolved.

Also reset libgl requirement to 7.1.0 in non-dri2 case.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-08 15:02:34 -08:00