... 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>