Commit Graph

22341 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
706310d1c9 1 2026-01-05 17:25:15 +01:00
Enrico Weigelt, metux IT consult
3244e38cdd [PR #1777] os: xtrans: drop some unused defines
PR: https://github.com/X11Libre/xserver/pull/1777
2026-01-05 17:25:15 +01:00
Enrico Weigelt, metux IT consult
1189bbdb40 xfree86: little documentation on XF86ModuleData
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-05 16:12:05 +01:00
Enrico Weigelt, metux IT consult
0b1e8a759c stop defining _XF86DRI_SERVER_
This once was needed on including xf86driproto.h, but these day
have gone now for aeons.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-05 14:42:01 +01:00
stefan11111
186e269a9d glamor/glamor_egl.c: Skip modifiers that do not result in images
that can be rendered to

According to https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt ,
there is an interface that allows us to detect if a given format modifier is supported.

For example, nvidia uses this to report that pitch-linear images can't be
rendered to.

Since we are only interested in formats that we can actually render to,
we should strip these formats from the modifier list.

See:
https://github.com/elFarto/nvidia-vaapi-driver/issues/15#issuecomment-1015827050
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1444#note_2450902

v2: Faster and simpler filter thanks to @algrid

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-05 14:18:08 +01:00
Enrico Weigelt, metux IT consult
6890d547f2 dri: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-05 14:16:31 +01:00
stefan11111
dc39eda42b treewide: Move the dri2 extension to Xext and use it for all X servers
This is needed to get proton working in Xfbdev, but is probably useful in other places too.

Xephyr has some unrelated issues regaring Xinput, so steam doesn't work there.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-02 17:51:43 +01:00
Alan Coopersmith
2a41522349 os: make FormatInt64() handle LONG_MIN correctly
When compiling with gcc 15.2.0 using -O3 -m64 on Solaris SPARC & x64,
we'd get a test failure of:

Assertion failed: strcmp(logmsg, expected) == 0,
 file ../test/signal-logging.c, line 339, function logging_format

because 'num *= -1' produced a value that was out of the range of the
int64_t it was being stored in.  (Compiling with -O2 worked fine with
the same compiler/configuration/platform though.)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2117>
2026-01-01 13:23:22 +01:00
Oleh Nykyforchyn
3a367c5a47 xfree86/common: omit unnecessary search for matching devices
It is patch 3/3 of a series that makes adding GPU screens
more controllable.

If AutoAddGPU is "off", matching devices for autoconfigured
drivers are sought for anyway, and then the unused list is
freed. This patch cancels an unnecessary search.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2026-01-01 13:23:22 +01:00
Oleh Nykyforchyn
1dea31ce5c xfree86/man: add SingleDriver server flag to man page
It is patch 2/3 of a series that makes adding GPU screens
more controllable.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2026-01-01 13:23:22 +01:00
Oleh Nykyforchyn
c79f376594 xfree86/common: introduce SingleDriver server flag
It is patch 1/3 of a series that makes adding GPU screens
more controllable.

If SingleDriver option is set to "on", then only the first
successfully probed driver adds non-GPU screens, others
may add secondary GPU screens only.

Fixes github.com/X11Libre/xserver/issues/1669

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2026-01-01 13:23:22 +01:00
stefan11111
8cb69cd810 modesetting: clear bo in drmmode_create_front_bo
Fixes: https://github.com/X11Libre/xserver/issues/1740

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
05fe0b519f Xext: selinux: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
8ff401cde1 Xext: xres: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
0616d9b325 composite: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
a0cd40d5af Xext: xvmc: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
d5e3eaeba2 xfixes: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
f3b783ec3d dri3: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
Aggelos Tselios
4bf912f92b hw: xfree86: seatd: remove unnecessary semicolons
Functions don't need to be terminated by semicolons, so this only
generates warnings.

Signed-off-by: Aggelos Tselios <aggelostselios777@gmail.com>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
095ea152b4 xfree86: dri2: use rpcbuf and sender macros
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
callmetango
db9b427f3e .github: 01-bug-report: add version 25.1.X
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
f122e2bb86 Xext: shm: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
dcb9329b37 Xext: saver: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
2a6b886563 Xext: dpms: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
polaris
7b72ce3a23 Only call xf86platformVTProbe() when defined
Signed-off-by: 9olaris <251053665+9olaris@users.noreply.github.com>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
86a0ae295a .github: move signed-off check into main xserver build workflow
Reduce the number of total workflows, so the list isn't so crowded.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: artist <artist@artixlinux.org>
2025-12-22 23:16:14 +01:00
Enrico Weigelt, metux IT consult
32050edf76 .github: cygwin: skip setup signature check
Cygwin currently has some mirror problem: it's missing the signature file
for the setup program, thus our build job is failing.

https://github.com/cygwin/cygwin-install-action/issues/39

Temporary workaround: just skip the signature check.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-22 13:34:44 +01:00
Enrico Weigelt, metux IT consult
2ada6f5178 .github: downgrade vmactions/dragonflybsd-vm to 1.1.4
Latest vmactions/dragonflybsd-vm release (1.1.4) broke several things,
eg. not chdir'ing into the working tree.

For the time being, it's better to go back to 1.1.4.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-22 13:20:28 +01:00
Enrico Weigelt, metux IT consult
32210c1990 .github: downgrade vmactions/netbsd-vm to 1.2.3
Latest vmactions/netbsd-vm release (1.2.4) broke several things,
eg. not chdir'ing into the working tree and NetBSD became *extremely*
slow (5mins job now slowed down to hours).

For the time being, it's better to just go back to 1.2.3.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-22 13:17:45 +01:00
Enrico Weigelt, metux IT consult
306e4a8a3f release 25.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xserver-25.1.0
2025-12-21 15:53:30 +01:00
b-aaz
b4f0ee1b59 Added Cygwin builds to CI.
Bringing back Cygwin support!
This will add Cygwin builds on windows-latest in our CI.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-21 12:59:03 +01:00
b-aaz
8368df64d1 Xext: xf86bigfont: Include osdep.h for OsSignal.
osdep.h holds the definition for OsSignal, and it was not included in
xf86bigfont which used it. This lead to build errors on Cygwin.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-21 12:59:03 +01:00
b-aaz
d334e01e31 os: osdep: Disabled a section on Cygwin that was redundant.
The section does some mappings between POSIX and windows APIs that are
already handled by Cygwin. This caused build errors on Cygwin due to
redefinition of things like the sigset_t struct.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-21 12:59:03 +01:00
b-aaz
2c9d6b38d1 xwin: ddraw: Moved the include guard to its correct location.
The include guard in this file has been incorrectly moved up breaking
the #include_next behavior on MS Windows builds.
Moved it to its correct location.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-21 12:59:03 +01:00
b-aaz
7f7efe8195 Revert 9a82f5c, bring back Cygwin support.
Brought back the code removed in that commit so that we can bring back
Cygwin support.
Small changes are done in the process of resolving conflicts against the
current head.

Some checks have not been reverted, because they were not necessary
anymore.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-21 12:59:03 +01:00
Enrico Weigelt, metux IT consult
9bd66fc97d Xext: security: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-21 12:04:33 +01:00
Enrico Weigelt, metux IT consult
e85db86ced Xext: damage: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-21 12:01:33 +01:00
Enrico Weigelt, metux IT consult
ec973853c9 Xext: xtest: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-21 11:57:12 +01:00
Enrico Weigelt, metux IT consult
6f7aa46c51 Xext: geext: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-21 11:54:29 +01:00
Enrico Weigelt, metux IT consult
2e6a9a1fbc Xext: bigreq: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-21 11:54:12 +01:00
b-aaz
a53697e70e xfree86: meson: Use install_symlink function instead of a hack.
This was a old hack used before Meson 0.61.0 added install_symlink, we
are at the meson release 1.10.0 so it is safe to use the new proper
function for this task.

Also used the X server's executable name as the link target name, and as
the SUID wrapper's name.

Moved the minimum Meson version up to 0.61.0.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-21 11:39:23 +01:00
Mikhail Dmitrichenko
252dda933a os: avoid closing null fd at Fopen
In `Fopen` function variable `iop` may store NULL as a result of `fopen`
call. In this case, if later privileges couldn't be restored (`seteuid`
call fails), further `fclose(iop)` call will cause runtime error.

This commit adds check `iop` for NULL before calling `fclose` to prevent
potential NULL pointer dereference.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2115>
2025-12-19 18:31:23 +01:00
Enrico Weigelt, metux IT consult
7fef1f9246 xorg-server.pc: add variables for input and video driver directories
Future driver versions should query those for their installation dirs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 17:47:35 +01:00
Enrico Weigelt, metux IT consult
eecea2e1fc xorg-server.pc: add xserverconfigdir variable
That variable is supposed to be used by drivers to query the path to
the xserver config directory (eg /etc/X11/xorg.conf.d), if they have
to install config snippets. It's supposed to replace / phase-out the
sysconfigdir variable, which has a bit misleading name.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 17:28:03 +01:00
Enrico Weigelt, metux IT consult
f40ebcd068 .github: compile-drivers: use new driver versions
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:37:26 +01:00
Enrico Weigelt, metux IT consult
49c15555f9 meson.build: install xlibre-server.h in addition to xorg-config.h
Both files are equal, but drivers should gradually migrate to the
new one, while the old one is phased out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 12:54:57 +01:00
b-aaz
a5f87f20b2 os: Cleaned up the log functions and handled return values.
The old function used int for write() return values, that could overflow.
And the return values of the write calls were discarded and not checked.

Now if the write() to the log file fails, a warning will be logged to
stderr and the log message will be appended after the warning.

If writes to stderr fail, a warning will be logged to stdout and the log
message will be appended after the warning.

If writes to stdout fail, we can't really do anything else and will
continue on silently.

Also used the length returned by strftime for the next write call to
eliminate an extra use of strlen.

The -1 was also removed from the buflen argument of strftime because it
was unnecessary.

Did some small formatting changes too.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-19 12:21:44 +01:00
Enrico Weigelt, metux IT consult
d45aeab1b6 dix: inline ProcQueryExtension()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 12:01:03 +01:00
Enrico Weigelt, metux IT consult
b19f3babe7 dix: inline SProcCreateGlyphCursor()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 12:00:50 +01:00
Enrico Weigelt, metux IT consult
5c3980b407 dix: inline ProcSetScreenSaver()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 11:59:08 +01:00