Commit Graph

1323 Commits

Author SHA1 Message Date
Adam Jackson
d8ec33fe05 glx: Use vnd layer for dispatch (v4)
The big change here is MakeCurrent and context tag tracking. We now
delegate context tags entirely to the vnd layer, and simply store a
pointer to the context state as the tag data. If a context is deleted
while it's current, we allocate a fake ID for the context and move the
context state there, so the tag data still points to a real context. As
a result we can stop trying so hard to detach the client from contexts
at disconnect time and just let resource destruction handle it.

Since vnd handles all the MakeCurrent protocol now, our request handlers
for it can just be return BadImplementation. We also remove a bunch of
LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already
allocated its tracking resource on that XID.

v2: Update to match v2 of the vnd import, and remove more redundant work
like request length checks.

v3: Add/remove the XID map from the vendor private thunk, not the
backend. (Kyle Brenneman)

v4: Fix deletion of ghost contexts (Kyle Brenneman)

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 17:04:44 -05:00
Alexander Volkov
8510f542e5 Xephyr: Require xcb-shm version 1.9.3 or newer
It's needed for FD-passing.

Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-02-14 13:19:21 -05:00
Jan Beich
1e23f03dd5 shm, xwayland: prefer atomic close-on-exec without O_TMPFILE
Signed-off-by: Jan Beich <jbeich@FreeBSD.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-02-02 15:28:46 -05:00
Alexander Volkov
90996f5909 Xephyr: Prefer using MIT-SHM FD-passing when possible
This makes the shared memory visible only for the Xephyr
and the X server to which it is connected.

Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-02-01 11:40:27 -05:00
Olivier Fourdan
da8de2a7f6 xwayland: Add optional xdg-output support
The xdg-output protocol aims at describing outputs in way which is
more in line with the concept of an output on desktop oriented systems.

For now it just features the position and logical size which describe
the output position and size in the global compositor space.

This is however much useful for Xwayland to advertise the output size
and position to X11 clients which need this to configure their surfaces
in the global compositor space as the compositor may apply a different
scale from what is advertised by the output scaling property (to achieve
fractional scaling, for example).

This was added in wayland-protocols 1.10.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2018-01-24 11:34:59 -05:00
Adam Jackson
1274015186 build: Remove <*dbm.h> checks
Formerly used by the rgb database code, which hasn't been a thing in
over a decade.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-01-16 16:08:28 -05:00
Helmut Grohne
c601c8faf5 build: guess availability of monotonic clock for cross compilation
When cross compiling, the value of MONOTONIC_CLOCK would be "cross
compiling", because AC_RUN_IFELSE doesn't work. However when enabling
wayland, a monotonic clock is required and configure aborts.

We change detection of CLOCK_MONOTONIC to degrade it gracefully from a
run check to a declaration check in case of cross compilation based on
the assumption that most systems will have a monotonic clock and those
that don't won't be able to run Xwayland anyway. The trade-off
essentially is either "always fail cross compilation" or "produce an
unusable Xwayland for unusual platform" and this commit switches to the
latter.

Signed-off-by: Helmut Grohne <helmut@subdivi.de>
Bug-Debian: https://bugs.debian.org/882531
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-01-08 14:59:30 -05:00
Adam Jackson
2e7f790b57 dix: Remove ffs.c
Your libc has ffs, I promise.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-11-06 17:22:46 -05:00
Daniel Stone
86a89dd602 Build: Use dri3proto/libdrm CFLAGS
Make sure we get the CFLAGS required for building DRI3 into the
command line.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-09-20 13:25:46 -04:00
Chris Lamb
937ed782ae configure.ac: Make BUILD_{DATE, TIME} respect SOURCE_DATE_EPOCH if set
Whilst working on the Reproducible Builds effort [0], we noticed that
xorg-server could not be built reproducibly. One reason is because it
embeds a "current" build and date time.

This should be compatible with both GNU and BSD date(1).

 [0] https://reproducible-builds.org/

v2: Fix change in Y-M-D format that broke the build.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-09-13 11:14:46 -04:00
Emil Velikov
69fe6156ec xwin: remove always true/set XWIN_RANDR conditional/define
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-08-22 10:59:41 -04:00
Emil Velikov
8f1a200d0b xwin: remove always true/set XWIN_MULTIWINDOW conditional/define
v2: drop trailing endif (Jon)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-08-22 10:59:41 -04:00
Emil Velikov
9d00f6190a xwin: remove always true/set XWIN_CLIPBOARD conditional/define
v2: drop trailing endif (Jon)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-08-22 10:59:41 -04:00
Olivier Fourdan
0a448d133f xwayland: Add grab protocol support
The keyboard grabbing protocol for Xwayland is included in
wayland-protocol 1.9.

Update the wayland-protocol required version in both configure and meson
builds and add support for this new protocol in Xwayland.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-01 10:56:42 +01:00
Jon TURNEY
fbdd73fac6 Move statically linked xorgxkb files from dixmods to a separate directory
[ajax: Fixed test/Makefile.am as well]

Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-06-27 12:42:06 -04:00
Jon Turney
36b9dac212 hw/xwin: Remove pretense of Xv support
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-06-02 09:32:32 -07:00
Adam Jackson
d732c36597 xfree86: Silence a new glibc warning
glibc would like to stop declaring major()/minor() macros in
<sys/types.h> because that header gets included absolutely everywhere
and unix device major/minor is perhaps usually not what's expected. Fair
enough. If one includes <sys/sysmacros.h> as well then glibc knows we
meant it and doesn't warn, so do that if it exists.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-03 15:44:06 -04:00
Jason Gerecke
89c841915a xwayland: Depend on wayland-protocols to build tablet protocol headers
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <ping.cheng@wacom.com>
2017-04-28 11:21:24 +10:00
Eric Anholt
da27ca84b4 xorg: Change __XCONFIGFILE__ to XCONFIGFILE (and DIR) to fix scan.c.
parser/scan.c was checking for #ifdef XCONFIGFILE and XCONFIGDIR and
defaulting to "xorg.conf", and "xorg.conf.d", so if you had changed
__XCONFIGFILE__ to anything else, it would have got out of sync.
Settle on the name without gratuitous underscores.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2017-04-25 15:01:23 -07:00
Eric Anholt
be80a3cb48 glx: Use the same endian swapping as the rest of the server.
This dumps a ton of configure-time checks for system endian macros.
Given that we're marking the mixed-endian fixup code as cold, getting
at the system macros is a waste of code.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2017-04-21 11:39:10 -07:00
Eric Anholt
dae97e1bb4 configure: Stop checking for XdmcpWrap
As far back as the initial import, it seems to have been exposed, and
there's no explanation why the test happened in the initial xserver
import.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2017-04-21 11:39:10 -07:00
Eric Anholt
190c2adf4a kdrive: Drop kdrive-config.h.
It had nothing left in it that was used but wasn't in dix-config.h.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2017-03-23 13:17:36 -04:00
Eric Anholt
5c7ed785e3 kdrive: Remove vestiges of TSLIB support.
The actual code was gone in 27819950e4,
but some checks remained.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2017-03-23 13:17:34 -04:00
Mariusz Bialonczyk
ad6689b7db configure.ac: fix checking for libdrm version after 9232835bd
No matter what libdrm version was installed, it always set
the GLAMOR_HAS_DRM_NAME_FROM_FD_2 conditional to 1.
This obviously leads to compilation problems.

Fixes: 9232835bd1 ("glamor: use drmGetDeviceNameFromFD2 when available")
Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net>
Reviewed-and-Tested-by: Qiang Yu <Qiang.Yu@amd.com>
2017-03-23 18:16:57 +09:00
Qiang Yu
9232835bd1 glamor: use drmGetDeviceNameFromFD2 when available
This is for glamor can support fd from DRM render node which is useful
for a render only DDX.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
2017-03-07 16:00:27 -05:00
Adam Jackson
27819950e4 kdrive: Remove now-unused linux backend
With Xfbdev gone this has no consumers.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-01 17:51:09 -05:00
Adam Jackson
feed7e3f98 xfbdev: Remove
With the shadow framebuffer overallocation bug fixed (ref below), Xorg +
fbdev has tens to hundreds of kilobytes more baseline memory usage than
Xfbdev. That's not nothing, but it's little enough that we should focus
our efforts on the server that actually gets development attention.

https://cgit.freedesktop.org/xorg/driver/xf86-video-fbdev/commit/?id=2c5eba8

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-01 17:51:04 -05:00
Adam Jackson
35fbcb3f99 xfake: Remove
We already have Xvfb for a dummy DDX.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-01 17:51:02 -05:00
Matthieu Herrb
386fbbe410 Brown bag commit to fix 957e8d (arc4random_buf() support)
- typo in #ifdef check
- also need to add AC_CHECK_FUNCS([arc4random_buf])

Reported-by Eric Engestrom. Thanks

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2017-03-01 15:05:01 -05:00
Matthieu Herrb
957e8db38f Use arc4random_buf(3) if available to generate cookies.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2017-02-28 14:02:37 -05:00
Matthieu Herrb
d7ac755f0b Use timingsafe_memcmp() to compare MIT-MAGIC-COOKIES CVE-2017-2624
Provide the function definition for systems that don't have it.

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-02-28 13:59:14 -05:00
Olivier Fourdan
7d7788e0f2 Revert "xwayland: bump wayland-protocols version to 1.7"
This reverts commit 371ff0c969.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-02-23 14:02:36 -05:00
Olivier Fourdan
371ff0c969 xwayland: bump wayland-protocols version to 1.7
Xwayland support for pointer locking in confinement requires
wayland-protocols version 1.7 or later.

Update the required version in configure.ac to match the minimal
required version of wayland-protocols.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2017-02-16 14:02:15 -05:00
Michel Dänzer
38696ea568 damage: Validate source pictures bound to windows before unwrapping
The lower layers also do this, but no damage may be reported there,
since we unwrap before calling down.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99220
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-02-08 12:54:47 -05:00
Qiang Yu
7617a0a180 dri2: refine dri2_probe_driver_name (v2)
V2:
1. update comment
2. check bustype if PCI
3. configure add libdrm version check for drmGetDevice

Get PCI information from info->fd with drmGetDevice instead of
assuming the info->fd is the first entity of scrn which is not
true for multi entities scrn.

Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-01-25 15:13:33 -05:00
Adam Jackson
e7b8b7b131 kdrive: Remove non-evdev input drivers
Use evdev.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-01-19 18:07:03 -05:00
Adam Jackson
d740e1830a dmx: Remove non-evdev hardware input drivers
Use evdev.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-01-19 18:06:38 -05:00
Mihail Konev
23f6dbc96e tests: Move test/{xi1,xi2}/tests to test/
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12 15:01:38 -05:00
Adam Jackson
e1d30075c9 configure: Enable glamor when building just Xwayland
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-11-30 09:47:43 +01:00
Keith Packard
f0f8d5bb53 Bump to post-1.19 development version
Signed-off-by: Keith Packard <keithp@keithp.com>
2016-11-18 09:48:28 -08:00
Keith Packard
7e5c9bdf73 Bump version to 1.19.0
Signed-off-by: Keith Packard <keithp@keithp.com>
2016-11-15 08:12:05 -08:00
Keith Packard
512e75a23b Bump to 1.18.99.902 (1.19 RC2)
Signed-off-by: Keith Packard <keithp@keithp.com>
2016-10-28 09:32:42 -07:00
Mihail Konev
8fee6a917b xwin: make glx optional again
Commit 501d8e2b removed --enable-aiglx, but made xwin always be
--enable-glx.

Signed-off-by: Mihail Konev <k.mvc@ya.ru>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-10-26 12:40:14 -04:00
Emil Velikov
962962e978 configure.ac: bump the required libdrm version to 2.3.1
It fixes a bug where the version reported by drmGetLibVersion() was
'wrong'. See libdrm commit 79038751ffe("libdrm: add support for server
side functionality in libdrm") for details.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-10-05 14:38:10 -04:00
Emil Velikov
74a8b320fa configure.ac: use $LIBDRM over libdrm when using pkg-config
The former contains the minimum required version which is required.
Strictly speaking Xephyr/Xwayland may require version greater than the
current 2.3.0, although I've personally haven't checked the specifics.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-10-05 14:38:07 -04:00
Emil Velikov
45e1220486 configure.ac: default to DRI=yes on solaris platforms
Afaict there's little-to-no reason/way one would want xserver without
DRI support on Solaris platforms.

This will allow us to simplify/fix all the libdrm detection in the next
commit.

Cc: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-10-05 14:38:01 -04:00
Emil Velikov
501d8e2beb configure.ac: remove --enable-aiglx option
Presently the option guards both direct and accelerated indirect GLX. As
such when one toggles it off they end up without any acceleration.

Remove the option all together until we have the time to split/rework
things.

Cc: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-10-05 14:15:59 -04:00
Jonas Ådahl
9037ba736a xwayland: Bind the relative pointer manager
Will be used for getting unaccelerated motion events and later for
relative motions used by a pointer warp emulator.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-10-05 13:46:29 -04:00
Francois Tigeot
c7a9161da5 Enable XTRANS_SEND_FDS on FreeBSD, DragonFly and OpenBSD
This code is based on local patches which had been sitting in
FreeBSD and OpenBSD ports.

Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: François Tigeot <ftigeot@wolfpond.org>
2016-09-28 15:47:04 -04:00
Keith Packard
ade315386c Require xproto 7.0.31
xproto 7.0.30 had a typo which caused compiles to fail on anything
other than clang

Signed-off-by: Keith Packard <keithp@keithp.com>
2016-09-23 09:52:35 +03:00
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