XLibre Xserver
Go to file
Erik Kurzinger d5192ba8eb xwayland: use write fence in xwl_glamor_dmabuf_import_sync_file
The functions xwl_glamor_dmabuf_import_sync_file and
xwl_glamor_dmabuf_export_sync_file are used to ensure proper
synchronization between clients using PresentPixmapSynced and
compositors that do not support the wp_linux_drm_syncobj_v1 protocol
when presenting by flipping. The acquire point's fence will be imported
as the DMA-BUF's implicit fence before handing it off to the compositor,
and then, after the DMA-BUF has been released, its new implicit fence
will be exported and become the release point's fence which the client
is expected to wait for before re-using the buffer.

Both functions currently set the flags arguments of their respective
ioctls to DMA_BUF_SYNC_READ. When importing a sync file, this means that
any subsequent implicitly synchronized reads from the buffer will not
wait for the fence, and when exporting a sync file it means that the
returned fence may be signaled before preceeding reads from the buffer
have completed.

While this is correct for xwl_glamor_dmabuf_export_sync_file since the
compositor will never write to the buffer, it is incorrect for
xwl_glamor_dmabuf_import_sync_file. To avoid corruption, we need any
reads from the buffer by the compositor to wait on the acquire point's
fence.

As a fix, instead of setting the DMA_BUF_SYNC_READ flag in
xwl_glamor_dmabuf_import_sync_file, we set the DMA_BUF_SYNC_WRITE flag.
This *does* provide the necessary guarantees.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1509>
2024-04-30 13:18:30 +00:00
.gitlab-ci Update CI for Xwayland explicit sync 2024-04-09 06:11:03 +00:00
Xext include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
Xi include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
composite include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
config include: move dbus-core.h to config 2024-04-23 01:46:24 +00:00
damageext include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
dbe include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
dix include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
doc prevent name clash on Windows w/ RT_* defines 2024-04-15 18:59:23 -07:00
dri3 include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
exa include: drop obsolete check for typeof operator 2024-04-22 22:15:45 +00:00
fb render: move private definitions out of public glyphstr.h 2024-03-03 22:54:16 +00:00
glamor xwayland/glamor: Handle depth 15 in gbm_format_for_depth 2024-04-25 17:17:55 +02:00
glx include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
hw xwayland: use write fence in xwl_glamor_dmabuf_import_sync_file 2024-04-30 13:18:30 +00:00
include include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
man Xserver.man: Note that -byteswappedclients is the default in this release 2024-03-23 10:27:03 -07:00
mi include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
miext os: unexport Os*() functions 2024-04-16 14:20:30 +02:00
os include: move private defs to dixstruct_priv.h 2024-04-30 00:47:38 +00:00
present rename remaining RT_* defines to X11_RESTYPE_* 2024-04-15 19:00:47 -07:00
pseudoramiX include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
randr include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
record include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
render include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
test include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
xfixes include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
xkb include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
.appveyor.yml appveyor: Add libxcvt build dep 2021-11-04 13:03:25 +00:00
.dir-locals.el .dir-locals.el: Add missing final newline 2019-10-01 17:05:28 +00:00
.gitignore Clean up the .gitignore file 2024-01-12 00:50:24 +00:00
.gitlab-ci.yml Update CI for Xwayland explicit sync 2024-04-09 06:11:03 +00:00
.mailmap Add a .mailmap file to canonicalize author names and emails 2023-03-15 18:10:51 +00:00
.travis.yml travis: Add OSX meson build to matrix 2019-05-02 15:42:58 +00:00
COPYING modesetting: Merge modesetting's COPYING into the xserver's. 2014-09-15 12:46:02 -07:00
README.md Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
meson.build xwayland: add support for wp_linux_drm_syncobj_v1 2024-04-09 06:11:03 +00:00
meson_options.txt os: secure-rpc: make build option tristate 2024-04-17 23:38:25 +00:00
xorg-server.m4 xorg-server.m4: just all cflags instead of just sdkdir 2018-09-20 20:12:24 +01:00
xorg-server.pc.in xfree86: link modules against Xorg symbols on Cygwin 2012-04-05 21:57:07 -05:00
xserver.ent.in doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00

X Server

The X server accepts requests from client applications to create windows, which are (normally rectangular) "virtual screens" that the client program can draw into.

Windows are then composed on the actual screen by the X server (or by a separate composite manager) as directed by the window manager, which usually communicates with the user via graphical controls such as buttons and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the following article: https://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the Xorg mailing list:

https://lists.freedesktop.org/mailman/listinfo/xorg

The primary development code repository can be found at:

https://gitlab.freedesktop.org/xorg/xserver

For patch submission instructions, see:

https://www.x.org/wiki/Development/Documentation/SubmittingPatches

As with other projects hosted on freedesktop.org, X.Org follows its Code of Conduct, based on the Contributor Covenant. Please conduct yourself in a respectful and civilized manner when using the above mailing lists, bug trackers, etc:

https://www.freedesktop.org/wiki/CodeOfConduct