Commit Graph

16525 Commits

Author SHA1 Message Date
Adam Jackson
debf75bd0b xserver 1.20 RC2
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-28 16:34:36 -04:00
Adam Jackson
726839459c autotools: Derive xkb configuration from xkbcomp.pc
... if available, falling back to the current heuristics otherwise. This
_finally_ gets me to being able to run util/modular/release.sh without
overriding $prefix.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-28 16:34:36 -04:00
Adam Jackson
d11d5bb80d glamor: Hide new DRI behind Option "Debug" "dmabuf_capable"
... for xfree86, at least for now. Things appear to work for Xwayland
but not yet for modesetting. Hopefully we can fix that before 1.20 but
in the meantime this makes testing both paths easier than a rebuild.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-28 16:34:28 -04:00
Adam Jackson
df13ea7da9 xfree86: Add Option "Debug" to ServerFlags
This provides a generic way to control obscure runtime behavior knobs
without making interface promises.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-28 16:33:52 -04:00
Antoine Martin
c95361465e os: Fix -logfile when used with -displayfd
Trivial way to reproduce the bug:

$ Xorg -logfile /tmp/mylog -config /etc/xpra/xorg.conf -displayfd 2

The server then moans:

Failed to rename log file "/tmp/mylog" to "/tmp/mylog": No such file or directory

And the log file is created but immediately renamed to "/tmp/mylog.old".
This is caused by the changes to the log file handling introduced by
this commit:

https://cgit.freedesktop.org/xorg/xserver/commit/?id=edcb6426f20c3be5dd5f50b76a686754aef2f64e

To fix this, only rename the logfile if the log filename contains the
magic substitution string "%s".

Signed-off-by: Antoine Martin <antoine@nagafix.co.uk>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-03-28 15:16:02 -04:00
Olivier Fourdan
b355e55f50 automake: Fix 'make dist'
Automake would skip a few meson files that would prevent to build with
meson a dist file previously generated by automake.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
2018-03-28 15:11:16 -04:00
Kyle Brenneman
16639ab77d Don't delete GLX's extensionInitCallback list during a reset.
When a callback list is initialized using CreateCallbackList via AddCallback,
the list gets added to the listsToCleanup array, and as a result the list gets
deleted at the end of the server generation.

But, vendor libraries add themselves to that callback list only once, not once
per generation, so if you delete the list, then no vendor will register itself
on the next generation, and GLX breaks.

Instead, use a static CallbackListRec for the extensionInitCallback list. That
way, it doesn't get added to listsToCleanup, and doesn't get deleted during a
reset.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 15:04:39 -04:00
Daniel Stone
7004a7c3c9 modesetting/drmmode: Remove unused flink call
We don't use flink in the GetFB import path anymore, as we do an
FD-based import instead.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-28 14:53:23 -04:00
Roman Gilg
be087778a0 xwayland: Activate Present flips in rootless mode with Glamor
Link the newly introduced support for Present flips. For now flips can only
be used in rootless mode together with Glamor.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:37:01 -04:00
Roman Gilg
07750ff3c0 xwayland: Implement queuing present vblanks
Queue present events to msc values. Fake msc events with a refresh rate of
about 60fps when flips are not possible. When flips are executed rely on
frame callbacks with a slow updating timer as fallback.

This is important for applications, that want to limit their framerate.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:59 -04:00
Roman Gilg
86df366973 xwayland: Add fallback timer for msc counting
When the compositor is not sending frame callbacks while we still wait
on buffer release events fake a continuous msc counter with a timer.

Having this timer is a prerequisite for queuing events.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:55 -04:00
Roman Gilg
0fb2cca193 xwayland: Preliminary support for Present's new window flip mode
Introduce support for Present's window flip mode. The support is not yet
complete, but works reasonable well for the most important use case, that
is fullscreen applications.

We take a Present flip and if the xwl_window->window has the same dimensions
as the presenting window, the flip is represented by a wl_buffer and attached
to the main wl_surface of the xwl_window.

After commit we are listening for the sync callback in order to tell Present,
that the pixmap flip is not longer pending, for the frame callback in order
to update the msc counter and for the buffer release callback in order to tell
Present that the pixmap is idle again.

The following functionality is missing from this patch:
* (slowed down) flips in case the compositor is not sending frame callbacks,
* queuing events to MSC times,
* per window flips for child windows with smaller size than the xwl_window.

To make use of this functionality Xwayland must run rootless and with
Glamor/GBM.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:51 -04:00
Roman Gilg
8fba2a03f1 xwayland: Add arguments to glamor_pixmap_get_wl_buffer
Add arguments to give the caller more information and control
over the creation of a wl_buffer with GBM, in particular let
the caller determine the size of the buffer.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:45 -04:00
Roman Gilg
902429f077 present: Add exported init function of window flip mode
Allow drivers now to initialize window flip mode.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:44 -04:00
Roman Gilg
a337949f99 present: Add cleanups for window flip mode
Make sure that vblanks and windows get cleaned up correctly
in window flip mode.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:42 -04:00
Roman Gilg
66a5c0bccb present: In window flip mode report damage on flip to driver
Calculate damage before trying to flip and report it to the driver.
This allows drivers to optimize their rendering.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:39 -04:00
Roman Gilg
029608dd80 present: Add window flip mode
In contrast to screen flip mode this mode:
* supports flips per windows (these windows currently need to have the same
  size as their parent windows with the same pixmap),
* sends pixmap idle signals to the client only after the driver has given
  an additional event notify.

This patch only introduces the new mode as a stub. It additionally needs a
driver hook, such that it can get initialized and appropriate cleanup
functions.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:36 -04:00
Roman Gilg
8d370fcdca present: Add driver facing window flip mode hooks
To enable special functionality of window flips introduce for window flips
a separate set of driver facing function hooks.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:34 -04:00
Roman Gilg
7b071b4e44 present: Adapt flip mode API hooks for window flip mode
Flipping pixmaps per window needs additional arguments in the
flip mode API. Add these as preperation for window flip mode.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:33 -04:00
Roman Gilg
92b91b8cf3 present: Add flip_idler vblank property
Introduce vblank property for flip modes, that demand explicite
allowance by the driver for vblanks to become idle.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:31 -04:00
Roman Gilg
84e47f3fe6 present: Add present_window_priv properties for window flip mode
For window flip mode data about flips needs to be stored per window.
Add properties to 'present_window_priv' and initialize them on creation.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:30 -04:00
Roman Gilg
3aaaac0be5 present: Refactor present_screen_init
To initialize easily different flip modes, refactor
'present_screen_init'.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:28 -04:00
Roman Gilg
6d813bbd5e present: Add more hooks to internal flip mode API
Add hooks to query caps, get crtcs, abort vblanks and destroy
a flip.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:27 -04:00
Roman Gilg
6a338b5959 present: Move timings adjustment in common part of flip mode API
To reduce future code duplication refactor timings adjustment out
as a separate function.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:25 -04:00
Roman Gilg
84112a1d0b present: Add flip mode API hook for present_can_window_flip
Flip modes can now have different implementations of
present_can_window_flip.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:24 -04:00
Roman Gilg
1db7cf0429 present: Add flip mode API hook for present_pixmap
Make present_pixmap a common function callable by any
flip mode.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:22 -04:00
Roman Gilg
679ffbf5f3 present: Refactor execute in separate file
To be shared by multiple flip modes, refactor execute functionality,
such that logical chunks can go in new separate file.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:20 -04:00
Roman Gilg
1e7d8902bf present: Add flip mode API hooks for several functions
Add 'queue_vblank', 'flush' and 're_execute' hooks, that
are supposed to be shared with other flip modes.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:18 -04:00
Roman Gilg
5365ece70a present: Move vblank functionality in seperate file
With the new internal flip mode API move vblank creation
and so on into a seperate file, such that it can be shared
between flip modes.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:16 -04:00
Roman Gilg
c5c50c6db1 present: Preliminary internal flip mode API
Add some basic function hooks to our future present-internal flip mode API,
that will allow us to share functionality in between modes and move more code
in separate files.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:14 -04:00
Roman Gilg
dda7efec36 present: Move screen flip functionality in separate file
As a preperation for future flip mode alternatives move most of the
functionality from 'present.c' into a separate file.

Leave some functions needed by future other flip modes in 'present.c'.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 14:36:12 -04:00
Thierry Reding
4303deae78 meson: Properly extract ABI versions for xorg-server.pc
The newline in the middle of the awk expression confuses Meson and
causes it to pass only the string before the newline to awk, which will
subsequently fail because it encounters an unterminated string.

One fix would be to escape the newlines ('\\n'), but that causes the
newline to end up in the pkg-config file and separate the ABI version
lines by blank lines.

Instead, simply drop the newlines to make the generated pkg-config file
look more like the one generated as part of the autotools-based build.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 09:54:27 -04:00
Thierry Reding
465b38cadd meson: Fix generation of xorg-server.pc
Meson stores relative paths for includedir, libdir and friends. These
have to be concatenated with the ${prefix} or ${exec_prefix} variables
to create a working pkg-config file.

While at it, set a default value for the module_dir option so that it
points to the same location as used in the autotools-based build.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 09:54:26 -04:00
Thierry Reding
d905e3330f meson: Fill in missing data for xorg-server.h
Provide more values for the definitions in xorg-server.h for Meson
builds. The only missing defines left after this are _BSD_SOURCE,
_POSIX_SOURCE and _XOPEN_SOURCE, but Meson seems to already define
these via the command-line if necessary.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 09:54:24 -04:00
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