Commit Graph

10187 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
b-aaz
b71e2a9a23 arm_video.c: Fixed xf86_os_support.h's #include.
The 'h' in the file suffixed was mistakenly removed, fixed it.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-15 19:43:54 +01:00
Enrico Weigelt, metux IT consult
c95748921a xfree86: drop obsolete xf86SetTVOut() and xf86SetRGBOut()
These are only defined on NetBSD and not used anywhere, and not
functional at all (just killing the Xserver). No need to carry
them around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-14 11:24:39 +01:00
Enrico Weigelt, metux IT consult
16d4d44551 os: drop symbol TCPCONN
It's been always enabled for aeons, so no practical need to
disable it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-13 15:59:07 +01:00
Oleh Nykyforchyn
ee73f84c65 xfree86/common: make screenConfig take autoAddGPU into account
This patch puts configServerFlags() before configScreen()'s and
makes the latter to use xf86Info.autoAddGPU value.

Fixes: https://github.com/X11Libre/xserver/issues/1658
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-13 15:27:06 +01:00
Enrico Weigelt, metux IT consult
43c5b45f4a mingw32: fix winsock2.h include
winsock2.h needs to be included before windows.h

> /usr/share/mingw-w64/include/winsock2.h:15:2: error: #warning Please include winsock2.h before windows.h [-Werror=cpp]
>    15 | #warning Please include winsock2.h before windows.h
>       |  ^~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-12 19:41:55 +01:00
Enrico Weigelt, metux IT consult
3c2bf225ca xnest: silence type mismatch warning on ming32
KeySym and xcb_keysym_t should both be 32bit, but for the compiler
they're long vs int, so it's spitting out a warning here. That's
coming from xorgproto's weird way of defining those types.

Add static type size assert and hard typecast to silence it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-12 19:41:55 +01:00
Enrico Weigelt, metux IT consult
05893d65c9 xquartz: declare variables when needed
Declare some more variables when actually needed / assigned first time.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 20:38:44 +01:00
Enrico Weigelt, metux IT consult
01768051cf xwin: drop wrapping on ScreenRec->CloseScreen()
Instead of complicated wrapping, just call fbCloseScreen() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 20:33:13 +01:00
Enrico Weigelt, metux IT consult
a0c67bd720 xquartz: drop obsolete _mesa_free() and _mesa_malloc()
These macros are always defined to free() and malloc(), so we don't
really need them, instead can use those functions directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 20:30:47 +01:00
Enrico Weigelt, metux IT consult
0a18956047 kdrive: ephyr: add noreturn attribute to ephyrProcessErrorEvent()
>  ../hw/kdrive/ephyr/ephyr.c:977:1: warning: function 'ephyrProcessErrorEvent' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
>    977 | {
>        | ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 14:34:16 +01:00
Enrico Weigelt, metux IT consult
f590b320cc xfree86: silence warnings on SYSCALL() macro
> ../hw/xfree86/os-support/shared/posix_tty.c:366:38: warning: while loop has empty body [-Wempty-body]
>    366 |     SYSCALL(r = read(fd, buf, count));
>        |                                      ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 14:33:53 +01:00
Enrico Weigelt, metux IT consult
f4b90697ce xfree86: fix include of xf86VGAarbiter_priv.h
Needs to be included also in non-pciaccess case, so the dummy
functions are declared.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 15:24:08 +01:00
Enrico Weigelt, metux IT consult
01777ec8dd xfree86: fix xf86VGAarbiterWrapFunctions() definition in non-libpciaccess case
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 15:24:08 +01:00
Oleh Nykyforchyn
ae689438dc xfree86/modesetting: prevent modesetting driver from
grabbing claimed slots

This patch makes modesetting driver use the return value of the extended
xf86ClaimFbSlot to prevent crashes.

Fixes: https://github.com/X11Libre/xserver/issues/1505
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-10 15:00:31 +01:00
Oleh Nykyforchyn
9307a252c9 xfree86/common: introduce generic xf86CheckSlot() function
This function will be used by xf86Claim{Fb,Pci,Platform}Slot()
to prevent them from claiming already used slots.

Fixes: https://github.com/X11Libre/xserver/issues/1505
Fixes: d3fd8c385b
Fixes: d09b3dae3e
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-10 15:00:31 +01:00
Enrico Weigelt, metux IT consult
90c8af27bd include: move writing xorg-config.h to the end
This allows us to move around probing DDX specific logic out of the fat
include/meson.build to more appropriate places, eg. xfree86/meson.build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 14:54:28 +01:00
Enrico Weigelt, metux IT consult
9ddce7292d xfree86: doc: drop mentioning xf86MapPciMem()
This function has been removed decades ago.

Fixes: 46f55f5dea
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 12:47:30 +01:00
Enrico Weigelt, metux IT consult
6e560bf9c6 xfree86: doc: drop mentioning xf86GetPciVideoInfo()
This function had been removed back two decades ago, so it's time to update
documentation now.

Fixes: 46f55f5dea
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 12:47:23 +01:00
Enrico Weigelt, metux IT consult
84bfff6672 kdrive: fix missing include to ddx_priv.h
Fix missing prototype for OsVendorInit()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 19:51:11 +01:00
stefan11111
58143b96fd modesetting: don't leak memory for the cursor plane if libdrm is too old
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-12-08 14:23:09 +01:00
stefan11111
5ade87efc7 modesetting: Use don't skip planes that are not on the current crtc
This breaks on some nvidia cards.

Fixes: ed49ae8fe7

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-12-08 14:23:09 +01:00
Enrico Weigelt, metux IT consult
609ea42a62 include: don't install client.h anymore
not included by any drivers, so doesn't need to be in SDK anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-05 19:44:59 +01:00
Enrico Weigelt, metux IT consult
800d37edcb xfree86: common: move enum ActionEvent to private header
Not needed by any driver - only use as parameter to xf86ProcessActionEvent(),
which already is private.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-05 12:30:46 +01:00
Tautvis
64326cc92e Patch 5/5 modesetting: try to get gpu device fd from seatd arbiter
The device node opening with seatd, like with systemd-logind can done during probe
(see get_drm_info in hw/xfree86/os-support/shared/drm_platform.c),
but in case of failure, the modesetting driver tries to open device
node directly (open_hw function in modesetting/driver.c).

This enchanes open_hw function to try use seatd arbiter for opening device node
in as last resort manner.

To make it functional seatd_libseat_open_graphics needs to have _X_EXPORT

Signed-off-by: tautvis <gtautvis gmail com>
2025-12-05 12:29:52 +01:00
Tautvis
10a8565465 Patch 4/5 xfree86: libseat support, wire-up support seatd-libseat.h into Xserver
Add necessary code into Xserver to support libseat (this time enabling
functionality).

Code used from Devuan repository + local changes to make functional in Xlibre

Co-Authored-By: Mark Hindley <mark@hindley.org.uk>
Co-Authored-By: Ralph Ronnquist <rrq@rrq.au>
Signed-off-By: Tautvis <gtautvis@gmail.com>
2025-12-05 12:29:52 +01:00
Tautvis
1ac940c01d Patch 3/5 os-support: add xf86VTKeepTtyIsSet
Add xf86VTKeepTtyIsSet function to export KeepTty state.

When seatd activates, it takes control of current vt (in global sense)!,
this code only activates sesion control code when XServer started
using same vt (for more context see c88a325899 commit ).

Signed-off-By: Tautvis <gtautvis@gmail.com>
2025-12-05 12:29:52 +01:00
Tautvis
8d90cd0060 Patch 2/5 xfree86: libseat support, wireup libseat
Refactor libseat code for Xlibre and add to meson.build:

* update meson for seat-libseat
* refactor code:
  * seatd-libseat.c - add aditional private include headers
  * add cast to libseat_set_log_handler argument 1 for (libseat_log_func),
  for warning silencing
  * make seatd_libseat_init to accept keeptty state as parameter
  * include xf86Events, xf86_priv - make visible xf86VTLeave for seatd code (it
    is neccesary because seatd can force console leave)

Signed-off-By: Tautvis <gtautvis@gmail.com>
2025-12-05 12:29:52 +01:00
Tautvis
6de8136907 Patch 1/5 xfree86: libseat support, the seatd-libseat.{c,h} code
This is initial patch for libseat. Technicaly almost verbatim code (with style changes)
from Devuan xorg server moved to os-support/shared directory as it can support other
oses than linux.

The original repository: https://git.devuan.org/devuan/xorg-server.git
The patch between fc24510f17e89a5bbac1065abab758a4d0c42634 and
6bf62381d0

Co-Authored-By: Mark Hindley <mark@hindley.org.uk>
Co-Authored-By: Ralph Ronnquist <rrq@rrq.au>
Signed-off-By: Tautvis <gtautvis@gmail.com>
2025-12-05 12:29:52 +01:00
Enrico Weigelt, metux IT consult
19ee44b607 treewide: drop including <dix-config.h> from private includes
All .c sources must include <dix-config.h> at the very first.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 19:50:44 +01:00
Enrico Weigelt, metux IT consult
2e631d1454 xwin: fix compiler warning on potential buffer read overflow
> ../hw/xwin/InitOutput.c: In function ‘XwinExtensionInit’:
> ../hw/xwin/InitOutput.c:142:5: warning: ‘LoadExtensionList’ reading 12 bytes from a region of size 0 [-Wstringop-overread]
>   142 |     LoadExtensionList(xwinExtensions, ARRAY_SIZE(xwinExtensions), TRUE);
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../hw/xwin/InitOutput.c:142:5: note: referencing argument 1 of type ‘const ExtensionModule[0]’
> In file included from ../include/extnsionst.h:53,
>                  from ../randr/randrstr.h:40,
>                  from ../hw/xwin/win.h:174,
>                  from ../hw/xwin/InitOutput.c:35:
> ../include/extension.h:100:23: note: in a call to function ‘LoadExtensionList’
>   100 | extern _X_EXPORT void LoadExtensionList(const ExtensionModule ext[],
>       |                       ^~~~~~~~~~~~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 15:10:51 +01:00
Enrico Weigelt, metux IT consult
beb15972d3 xwin: silence warning on missing prototype for OsVendorFatalError()
Just need to include ddx_priv.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 14:50:05 +01:00
Enrico Weigelt, metux IT consult
a2304300aa xwin: silence const char* assignment warnings
the target struct type defines char* fields, but we're sure they'll
never be written into, so just add typecast for silencing the warning.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 14:27:01 +01:00
Enrico Weigelt, metux IT consult
f00b684cb1 xfree86: dri2: inline load_swap_reply()
very tiny and only called once, so no need to have a separate function.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 12:10:36 +01:00