Commit Graph

16491 Commits

Author SHA1 Message Date
Thierry Reding
0babe78ed5 meson: Generate xorg-server.h
Some drivers (such as xf86-input-libinput) require the xorg-server.h to
build. Generate it and install it so that it can be used by users.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 09:54:22 -04:00
Thierry Reding
b04ff31b9d dix: Remove unused definitions from dix-config.h.in
There is no code around that will ever define values for the
WORKING_UNALIGNED_INT or XORG_RELEASE symbols, so they will always end
up commented out and are therefore completely useless.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 09:54:18 -04:00
Thierry Reding
c62a8b60b9 xorg: Remove unused definitions from xorg-server.h.in
There is no code around that will ever define values for the XLOADABLE,
WORKING_UNALIGNED_INT or XORG_RELEASE symbols, so they will always end
up commented out and are therefore completely useless.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 09:54:17 -04:00
Thierry Reding
66402fcd82 meson: Fix build if Xdmcp is missing
Xdmcp is an optional dependency, so make sure the build succeeds if it
is missing.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 09:54:14 -04:00
Adam Jackson
0a7dabc86c meson: Add option to set default font path (v2)
The autotools build gets this from some macros in fontutil, but they're
just wrappers around pkgconfig.

v2: Use same default as autotools (Keith Packard)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 13:00:26 -04:00
Adam Jackson
a26195d5c1 Revert "suid touchup"
Pushed the wrong thing, sigh.

This reverts commit 73a0562615.
2018-03-27 12:58:15 -04:00
Adam Jackson
73a0562615 suid touchup 2018-03-27 12:06:38 -04:00
Adam Jackson
64b3227374 autotools: Fix excessive \-escaping that broke the build
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-27 10:47:05 -04:00
Adam Jackson
d3e8af99dc meson: Fix install path for 10-quirks.conf
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:28:33 -04:00
Adam Jackson
84507507ea meson: Install xorg-server.m4
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:28:33 -04:00
Adam Jackson
8c684f59d5 meson: Generate xorg-server.pc
Otherwise external drivers can't build against us.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:28:33 -04:00
Adam Jackson
9b67303a52 meson: Install the dmx utilities
And add the forgotten dmxrminput to the list.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:28:33 -04:00
Adam Jackson
f9ef293cf6 meson: Build cvt and gtf
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:28:33 -04:00
Adam Jackson
a1e8dc0516 meson: Install man pages
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:28:33 -04:00
Adam Jackson
1e0df64738 meson: Build Xorg suid wrapper
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:13:18 -04:00
Adam Jackson
ab063cf967 meson: Fix installing protocol.txt
One fix the constructed path, two actually install it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:13:18 -04:00
Adam Jackson
e3baacacda meson: Add libdrm to hw/xfree86/common's dependencies
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:13:18 -04:00
Adam Jackson
2e497bf887 man: s/__/@/g
A cosmetic change for automake (though we have to replicate some of
xorg-macros.m4 in manpages.am now), but meson's configure_file() wants
@-delimited strings.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:13:17 -04:00
Adam Jackson
6cbefc3e0a autotools: Stop caring about XORG_DATE
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:13:17 -04:00
Adam Jackson
ba0c751772 modesetting: Fix up some XXX from removing GLAMOR_HAS_DRM_*
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-22 15:00:06 -04:00
Mario Kleiner
757e0ee188 modesetting: Fix page flipping under DRI 3.2.
The check for "no modifier specified" in drmmode_is_format_supported()
should check for DRM_FORMAT_MOD_INVALID, not for zero, as zero actually
means DRM_FORMAT_MOD_LINEAR.

This allows page-flipping again when appropriate, as
tested under nouveau and ati drivers.

Fixes: 9d147305b4 ("modesetting: Check if buffer format is supported when flipping")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-03-21 12:23:53 -04:00
Adam Jackson
136b45e0c0 travis: Drop Xcode 8.2
Travis has only so many OSX builders, presumably due to the EULA
requiring that it be run on Apple-branded hardware. They're also really
slow to provision, presumably because they're virtual machines and not
containers. In any case it's not something I'm willing to be punished
for.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-21 12:15:28 -04:00
Adam Jackson
243a34e170 travis: Bump rawhide image
The image now has enough mojo to run xts, hooray!

Note there's a couple of ugly bits in here. The piglit config fragment
and stock tetexec.cfg reflect missing features from the test suites
(using an installed copy of xts, figuring out the xserver test matrix at
runtime, etc.), I'll be happy to remove them once the tests are fixed.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-21 12:11:23 -04:00
Eric Engestrom
610055809f exa: promise not to touch the data when swapping pointers
exa/exa.c:525:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     swap(pExaGC, pGC, funcs);
          ^

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-21 11:22:59 -04:00
Alexander Volkov
d36128a72a Xext/shm: Downgrade from error to debug log output about success
Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-21 11:20:05 -04:00
Nicolai Hähnle
319af6f471 glx: honor LIBGL_DRIVERS_PATH when loading DRI drivers
Allow switching to another driver build without a full installation.

Glamor already takes LIBGL_DRIVERS_PATH into account, so this change
makes sure that the same driver is used in both parts of the server.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk>
Tested-by: Ben Crocker <bcrocker@redhat.com>
2018-03-21 11:14:46 -04:00
Nicolai Hähnle
75a869a4e7 xfree86: replace all uses of xf86PrivsElevated with PrivsElevated
[... but leave it defined and exported, since we're ABI-frozen - ajax]

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk>
Tested-by: Ben Crocker <bcrocker@redhat.com>

restore abi
2018-03-21 11:14:07 -04:00
Nicolai Hähnle
1b6910af12 os: use PrivsElevated instead of a manual check
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk>
Tested-by: Ben Crocker <bcrocker@redhat.com>
2018-03-21 10:58:40 -04:00
Nicolai Hähnle
9ef602de46 os: move xf86PrivsElevated here
Having different types of code all trying to check for elevated privileges
is a bad idea. This implementation is the most thorough one.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk>
Tested-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-21 10:58:39 -04:00
Adam Jackson
1519475a43 appveyor: use meson
i686 cygwin build time with autotools:  16:22
i686 cygwin build time with meson:       6:56

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-21 10:16:44 -04:00
Adam Jackson
2415ef5b22 meson: Add the x(org)proto headers to the include path
Without this meson won't properly use headers installed into a
non-default location.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-21 10:16:33 -04:00
Emil Velikov
21e8a4a1b9 modesetting: remove fallback DRM_CAP_* defines
All the macros are available in the libdrm that we depend on.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-21 10:06:20 -04:00
Emil Velikov
d2568c0587 modesetting: remove always true DRM_IOCTL_CRTC_QUEUE_SEQUENCE guard
We already require libdrm 2.4.89 which provides the definition plus
guarding kernel UABI like that is generally a bad idea.

See previous commit for details why :-)

Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-21 10:06:18 -04:00
Emil Velikov
f368428ab8 modesetting: remove always true defined(DRM_CAP_PRIME) guards
The macro was available in libdrm for ages. Furthermore having a guard
like this is a very bad idea.

Building on an old server will result in a missing run-time functionality.
Since it's UABI one can use a local fallback, old kernels will return
-EINVAL and the fallback path will kick in.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-21 10:06:16 -04:00
Emil Velikov
22b489d273 Remove always true GLAMOR_HAS_DRM_* guards
With earlier commit the required version was bumped to 2.4.89, thus the
guards always evaluate to true.

Fixes: e4e3447603 ("Add RandR leases with modesetting driver support
[v6]")
Cc: Keith Packard <keithp@keithp.com>
Cc: Daniel Stone <daniels@collabora.com>
Cc: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-21 10:06:12 -04:00
Emil Velikov
e0748b10a8 configure: remove libdrm version check
We already require said version.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-21 10:06:07 -04:00
Adam Jackson
8718d46157 ci: Ignore builds for branches aimed at other CI services
Make appveyor ignore builds for /travis.*/ and vice versa. If you're
only testing a Windows change, building for OSX and Linux too is a bit
rude.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-21 09:35:38 -04:00
Emil Velikov
ae5c0dd199 dri3: cap the version returned to the client
As per the protocol, the server should not return version greater than
the one supported by the client.

Add a spec quote and tweak the numbers accordingly.

Fixes: 5631382988 ("dri3: Add DRI3 extension")
Cc: Daniel Stone <daniels@collabora.com>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-19 15:49:36 -04:00
Emil Velikov
6a5d51e082 present: cap the version returned to the client
As per the protocol, the server should not return version greater than
the one supported by the client.

Add a spec quote and tweak the numbers accordingly.

Fixes: 5c5c1b7798 ("present: Add Present extension")
Cc: Thierry Reding <treding@nvidia.com>
Cc: Daniel Stone <daniels@collabora.com>
Cc: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-19 15:46:41 -04:00
Thierry Reding
abb9b58d1a present: Advertise protocol version 1.2
Everything is implemented to support protocol version 1.2. Make it
official.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-19 15:44:46 -04:00
Alan Coopersmith
7fc89251ef Revert "modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD"
This reverts commit 8c455db0eb.

Since xf86platformBus.h is only included when XSERVER_PLATFORM_BUS is
defined, and configure.ac only defines that on systems with udev, this
commit breaks the build on non-udev systems like Solaris.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-03-15 13:45:49 -04:00
Adam Jackson
edf08bd654 appveyor: Switch to xorgproto
Also build with -j2, the builder VM has two cores.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-14 15:19:26 -04:00
Adam Jackson
8f628033be travis: Update OSX build
Install and use xorgproto, and build with optimization as clang has
warnings that only work above -O0. Also expand the build matrix for both
Xcode 8.3 and 9.2. Both images are OSX 10.12 at the moment so this is
really just a way to test with clang 8 vs 9.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-14 15:12:49 -04:00
Adam Jackson
1ca092f990 travis: Switch linux build from stretch to rawhide
Stretch's Mesa is too far behind, and building Mesa to build xserver is
not the sort of problem we're trying to solve here. But our Travis
scripts run inside a docker image, and that image can be whatever, so
since I have to keep rawhide building anyway let's switch to that for
now. The dockerfile can be found at:

https://github.com/nwnk/xserver-travis

The $DISTRO part of the change is foreshadowing for the day we readd a
(probably sid-based) debian image; patches for other environments are
welcome.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-14 15:08:34 -04:00
Michel Dänzer
17d30369f4 randr: Initialize RROuptutRec::nonDesktop
Flagged by valgrind:

==13695== Conditional jump or move depends on uninitialised value(s)
==13695==    at 0x22461C: RRNoticePropertyChange (rrproperty.c:150)
==13695==    by 0x22461C: RRChangeOutputProperty (rrproperty.c:263)
==13695==    by 0x222FC4: RROutputSetNonDesktop (rroutput.c:333)
==13695==    by 0x22319C: RROutputCreate (rroutput.c:122)
==13695==    by 0x1E1CE9: xf86RandR12CreateObjects12 (xf86RandR12.c:1734)
==13695==    by 0x1E1CE9: xf86RandR12Init12 (xf86RandR12.c:2375)
==13695==    by 0x1E1CE9: xf86RandR12Init (xf86RandR12.c:895)
==13695==    by 0x1D469B: xf86CrtcScreenInit (xf86Crtc.c:778)
==13695==    by 0xC095A54: RADEONScreenInit_KMS (radeon_kms.c:2436)
==13695==    by 0x161444: AddGPUScreen (dispatch.c:3966)
==13695==    by 0x1A3E46: InitOutput (xf86Init.c:763)
==13695==    by 0x1654A7: dix_main (main.c:193)
==13695==    by 0x7041A86: (below main) (libc-start.c:310)
==13695==  Uninitialised value was created by a heap allocation
==13695==    at 0x4C2CB8F: malloc (vg_replace_malloc.c:299)
==13695==    by 0x223083: RROutputCreate (rroutput.c:83)
==13695==    by 0x1E1CE9: xf86RandR12CreateObjects12 (xf86RandR12.c:1734)
==13695==    by 0x1E1CE9: xf86RandR12Init12 (xf86RandR12.c:2375)
==13695==    by 0x1E1CE9: xf86RandR12Init (xf86RandR12.c:895)
==13695==    by 0x1D469B: xf86CrtcScreenInit (xf86Crtc.c:778)
==13695==    by 0xC095A54: RADEONScreenInit_KMS (radeon_kms.c:2436)
==13695==    by 0x161444: AddGPUScreen (dispatch.c:3966)
==13695==    by 0x1A3E46: InitOutput (xf86Init.c:763)
==13695==    by 0x1654A7: dix_main (main.c:193)
==13695==    by 0x7041A86: (below main) (libc-start.c:310)

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2018-03-14 10:20:47 -07:00
Keith Packard
52048ce29f Xext/saver: Swap ScreenSaverSuspend 'suspend' field. Handle old XCB clients.
This field was defined as a Bool in the protocol headers and BOOL in
xcb. Bool is not a valid type for protocol fields. It is defined as
'int' by Xdefs.h, which we expect to be 32-bits on all machines.

The protocol headers and xcb have patches posted to switch to CARD32,
which is at least well defined.

This change adds the necessary byte swapping to handle other-endian
clients with this 32-bit field, and then changes the request
processing to compare all 32-bits against zero so that it works with
both new and old clients.

On MSB machines, Xlib will continue to work properly, but old XCB will
not interoperate with the X server (either before or after this patch).

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Mihai Moldovan <ionic@ionic.de>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-14 10:14:04 -07:00
Mario Kleiner
beda6afb3c glamor/xwayland: Add depth 30 format mapping for DRI 3.2 as well.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-03-09 13:11:12 -05:00
Jon Turney
07c369e05a meson: Require libdrm for dri1/2/3 when configured 'auto' as well as 'true'
If dri1/2/3 are configured for auto-detection, libdrm is required, as well
as the corresponding proto.  (Practically we will always have the
corresponding protos now, as they are part of xorgproto).

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-09 13:08:30 -05:00
Adam Jackson
f69cd2024e os: Define {ReadFdFrom,WriteFdTo}Client unconditionally
Otherwise this is broken on cygwin:

    rrlease.c: In function ‘ProcRRCreateLease’:
    rrlease.c:305:9: error: implicit declaration of function ‘WriteFdToClient’ [-Werror=implicit-function-declaration]
         if (WriteFdToClient(client, fd, TRUE) < 0) {

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-08 14:12:36 -05:00
Rodrigo Vivi
90e0cdd42d dri2: Sync i965_pci_ids.h from Mesa.
Copied from Mesa with no modifications.

Gives us Geminilake and Kaby Lake platform names updates and
sync on Coffee Lake PCI IDs.

Cc: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-07 15:58:31 -05:00