Commit Graph

22327 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
65ed6145d8 xfree86: ddc: add xf86Monitor_gtf_supported()
replacement for GTF_SUPPORTED() macro that's not a good API isolation
at all. Drivers should use that function instead for checking whether
the monitor supports GTF.

Should be backported to older releases, too - so drivers don't need
extra per-Xserver-version tweaks.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-03 10:16:47 +01:00
stefan11111
4dbcbdc478 modesetting: Work around vm cursor pitch quirks
When running in a virtual machine, the cursor pitch
may not behave the same as it does on bare metal.

This patch disables a power consumption optimization
when running in a vm, working around the cursor pitch issues.

This means that some vm users who previously had a working
cursor pitch may now see some increased power consumption.

Fixes: https://github.com/X11Libre/xserver/issues/1816

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-02 17:12:31 +01:00
Enrico Weigelt, metux IT consult
d8a63a7f5f .github: util: add support for arbitrary refs to drv_tag() et al.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-27 11:57:50 +01:00
Enrico Weigelt, metux IT consult
e79765bdad xfree86: xlibre-server.h: fix missing HAVE_TIMINGSAFE_MEMCMP
os.h still defining our own timingsafe_memcmp() prototype when this
symbol isn't set - this is causing trouble with drivers on FreeBSD.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-22 12:38:39 +01:00
Enrico Weigelt, metux IT consult
cc81117c78 xfree86: add exported xf86GetConsoleFd()
This functions is designed for some legacy keyboard drivers
(eg. xf86-input-keyboard) that need to get the fd to the console
device, so they don't need to directly access xf86Info field anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-14 11:16:03 +01:00
Tautvis
80e3f5655f glx: glxext fix memory leak when calling DestroyPixmap
Call dixDestroyPixmap instead pScreen->DestroyPixmap, which is correct
call to free resources as since cece84fa93
the Screen->DestroyPixmap function is no longer wrapped.

Fixes: https://github.com/X11Libre/xserver/issues/1809

Signed-off-By: Tautvis <gtautvis@gmail.com>
2026-01-13 15:03:38 +01:00
Enrico Weigelt, metux IT consult
de8eb403aa hotfix release xlibre-xserver-25.1.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xserver-25.1.1
2026-01-08 17:50:07 +01:00
Enrico Weigelt, metux IT consult
84c858d189 xorg-server.m4: add helper macros for driver builds
Adding a bunch of autoconf macros easier building of drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-08 17:40:40 +01:00
Enrico Weigelt, metux IT consult
be91efa3df xorg-server.pc: add more variables for easier driver builds
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-08 17:28:38 +01:00
squishypinkelephant
12ef46b46c fully split, rename kdInitInputPre to KdAddConfigInputDrivers
Signed-off-by: squishypinkelephant <squishypinkelephant@gmail.com>
2026-01-08 11:03:38 +01:00
squishypinkelephant
71c1556125 split KdInitInput for Xephyr
Signed-off-by: squishypinkelephant <squishypinkelephant@gmail.com>
2026-01-08 11:03:38 +01:00
Enrico Weigelt, metux IT consult
a331b96ab0 xfree86: add macros for declaring XF86ModuleData fields
XF86_MODULE_DATA_INPUT() creates XF86ModuleData field for input driver,
while XF86_MODULE_DATA_VIDEO creating one for a video driver.

These are filled with given values, _X_EXPORT'ed and properly named so
the module loader can find them. Also creating the associated
XF86ModuleVersionInfo field and link them into the XF86ModuleData.

Example:

    XF86_MODULE_DATA_INPUT(
        egalax,
        eGalaxPlug,
        eGalaxUnplug,
        "egalax",
        PACKAGE_VERSION_MAJOR,
        PACKAGE_VERSION_MINOR,
        PACKAGE_VERSION_PATCHLEVEL);

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-07 20:52:00 +01:00
Enrico Weigelt, metux IT consult
8e947537ba xfree86: xf86Module.h: macro for declaring video driver module version
Reduce the effort of declaring/filling an video driver's module version
struct to short statement like this:

    XF86_MODULE_VERSION_VIDEO("ati",
                              PACKAGE_VERSION_MAJOR,
                              PACKAGE_VERSION_MINOR,
                              PACKAGE_VERSION_PATCHLEVEL);

This will create a properly filled XF86ModuleVersionInfo structure
named `modInfo`.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-07 20:30:20 +01:00
Enrico Weigelt, metux IT consult
a1e25d1789 xfree86: xf86Module.h: macro for declaring input driver module version
Reduce the effort of declaring/filling an input driver's module version
struct to short statement like this:

    XF86_MODULE_VERSION_INPUT("egalax",
                              PACKAGE_VERSION_MAJOR,
                              PACKAGE_VERSION_MINOR,
                              PACKAGE_VERSION_PATCHLEVEL);

This will create a properly filled XF86ModuleVersionInfo structure
named `modInfo`.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-07 20:06:02 +01:00
Enrico Weigelt, metux IT consult
e2310d0001 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:05 +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
Enrico Weigelt, metux IT consult
07b0c67c28 dix: inline SProcRotateProperties()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 11:58:53 +01:00
Enrico Weigelt, metux IT consult
7a2a3c9016 dix: inline SProcGrabPointer()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 11:58:41 +01:00
Enrico Weigelt, metux IT consult
a47b2ce91c dix: inline SProcGetProperty()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 11:58:24 +01:00
Enrico Weigelt, metux IT consult
ca35b825a3 dix: inline SProcLookupColor()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 11:58:11 +01:00
Oleh Nykyforchyn
ec49f5d24a xfree86/common: hide a variable behind XSERVER_LIBPCIACESS
A variable pci_other is declared and can be used only on libpciacceess builds.

Fixes: https://github.com/X11Libre/xserver/issues/1713
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-18 11:02:10 +01:00
Oleh Nykyforchyn
ccb9b1bd17 fb: reexport fbGetGCPrivateKey and add itw wrapped version
This patch reexports a symbol needed by NVidia 340 driver and adds
its "wrapped" version for libwfb to prevent XServer crashes.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-18 10:47:47 +01:00
Enrico Weigelt, metux IT consult
2285961661 dix: fix inttype mismatches in AllocARGBCursor & AllocGlyphCursor
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 16:28:25 +01:00
Enrico Weigelt, metux IT consult
aefde94a2d meson: drop obsolete vendor information options
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 13:52:37 +01:00
Enrico Weigelt, metux IT consult
266ca17cc8 meson_options.txt: move xf86-* driver flags to separate section
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 12:11:57 +01:00
Enrico Weigelt, metux IT consult
e11e90cab6 .github: compile-drivers.sh: add xf86-video-v4l driver
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 18:48:36 +01:00
Enrico Weigelt, metux IT consult
2fcd226852 .github: util.sh: fix driver clone subdir
missed the driver name from the driver clone subdir

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 18:39:18 +01:00
Enrico Weigelt, metux IT consult
e4fc8443be .github: compile-drivers.sh: add xf86-video-trident driver
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 18:30:02 +01:00
Enrico Weigelt, metux IT consult
9d6750322d .github: compile-drivers.sh: add xf86-video-suntcx driver
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 18:09:52 +01:00
Enrico Weigelt, metux IT consult
79c2e8de91 .github: compile-drivers.sh: add xf86-video-vbox driver
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 18:01:25 +01:00