Commit Graph

9890 Commits

Author SHA1 Message Date
stefan11111
9cadd707e9 xfree86: loader: Ignore abi mismatch for the proprietary nvidia DDX
This is a proprietary DDX driver made by nvidia.
We can't rebuild it against Xlibre, so the abi check would always fail.

See: https://github.com/X11Libre/xserver/pull/262
See: https://github.com/X11Libre/xserver/issues/447
See: https://forums.gentoo.org/viewtopic-t-1174826.html

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-31 10:28:08 +02:00
Enrico Weigelt, metux IT consult
f1c1293803 xwin: win.h: missing include of dix/dix_priv.h
Needed for dixAddAtom()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 20:40:38 +02:00
Enrico Weigelt, metux IT consult
0888156f31 xwin: fix missing prototype of parse_file()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 20:40:21 +02:00
callmetango
cd81282968 config: Preserve section data when parsing duplicate files
Previously, when parsing multiple configuration files containing the same
section names, only the last occurrence of each section would be retained.
Earlier definitions were silently discarded due to unconditional memory
allocation and overwriting of pointers during parsing.

This resulted in incomplete or incorrect configuration state when users
intended to merge or extend configuration through multiple files.

The section parsing functions in Files.c, Flags.c, and Module.c now
accept existing section pointers. These functions allocate new memory only
if the input pointer is NULL, preserving earlier data when re-parsing.

read.c has been updated to detect and pass existing section pointers when
encountering duplicate sections across files, preventing loss of prior content.

With these changes, the parser properly accumulates and merges configuration
data across multiple files, ensuring that all relevant settings are preserved.

Backport from Xorg.

References:
https://gitlab.freedesktop.org/xorg/xserver/-/issues/467
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2045

Fixes: #279
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-30 16:44:58 +02:00
Enrico Weigelt, metux IT consult
9986e17950 meson: move MAXCLIENTS and LIMITCLIENTS into dix-config.h
Both are potentially tunable variables, and MAXCLIENTS is (still) used by
intel-driver, but also by os specific parts that must not include misc.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 14:55:40 +02:00
stefan11111
61017cf734 xfree86: fbdevhw: first try /dev/fb, then /dev/fb* on the fallback probe
This commit changes legacy behavior, if anyone was relying on it,
they can make an issue and we can change it back.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
4f2f3ffca1 xfree86: fbdevhw: write more error diagnostics
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
1e7c19a2ec xfree86: fbdevhw: try framebuffers 1 through 7 on the fallback probe
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
9b30bb93f3 xfree86: fbdevhw: try the /dev/fb symlink on the fallback probe
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
e3af4da57b xfree86: fbdevhw: factor out code for checking devices passed by the user
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
731936d20b xfree86: fbdevhw: skip non-pci check on the fallback probe
if the framebuffer device was passed by the user and not guessed

Assume the user knows what they are doing if they tell us to
use a particular framebuffer device, and skip the checks we
have for guessed devices

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
d61cface87 xfree86: fbdevhw: factor out the code for setting the name of the card
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
6233fa8b9f xfree86: fbdevhw: use the fbdev passed by the user, if there is one
The fbdev pci probe doesn't use the fbdev passed by the user,
and instead tries to guess what framebuffer the user wants to use.

Only if that fails, fbdev falls back to the option passed by the user.

This is backwards, if the user explicitly passes a framebuffer
device to use, the X server should use that, and fall back on
guessing if that fails.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
ca7a1e1e39 xfree86: fbdevhw: drop 'mode' argument from open() calls
The 'mode' argument for open() is only used when files
are created, and files aren't created here.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
Enrico Weigelt, metux IT consult
aca6872193 xfree86: drivers: move inputtest into input subdir
In preparation of potentially more drivers being move in-tree,
put the input drivers into `input` subdirectory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 17:54:22 +02:00
Enrico Weigelt, metux IT consult
baa36c8a39 xfree86: drivers: move modesetting into video subdir
In preparation of potentially more drivers being move in-tree,
put the video drivers into `video` subdirectory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 17:54:22 +02:00
stefan11111
bd1e299837 kdrive: add OS/platform callback for event polling
And OS/platform callback by which individual server implementations
can extra event polling, eg. device IO.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 16:41:33 +02:00
stefan11111
b75dfe3d58 kdrive: add OS/platform callback for screen enable/disable
New OS/platform callbacks that are called when screens are enabled
or disabled. This allows individual Kdrive implementations to take
specific action, eg. configure/reset graphics hardware.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 16:41:33 +02:00
stefan11111
889dc612cf kdrive: add OS/platform specific bell callback
Allow OS/platform specific bell implementation.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 16:41:33 +02:00
Collin
8ba351aa96 screen: initialize rootDepth to zero to fix uninitialized-variable warning 2025-07-23 16:09:52 +02:00
Enrico Weigelt, metux IT consult
e7a26255f7 xfree86: meson.bulid: move driver specific build logic to drivers/ subdir
For better code structuring, move the meson logic for drivers into the
drivers/ subdir.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 15:24:38 +02:00
Enrico Weigelt, metux IT consult
8454c94773 xwin: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
b001470c81 xquartz: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
9217a30960 xnest: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
77a91598fe vfb: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
ec277d2c0b xfree86: use dixAddAtom()
Use the new helper for creating atoms.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
02a88519a2 xfree86: xf86UpdateHasVTProperty(): always create atom
No need to have extra check for whether the Atom already exists,
just create it on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
171862626e xfree86: i2c: constify I2CBusRec::name
The bus name is always assigned to string literals, thus pointing to
constant data.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 11:17:09 +02:00
Enrico Weigelt, metux IT consult
e0440a0b42 xfree86: simplify match group destruction
Reducing repeated code patterns by simple function call.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-22 16:43:12 +02:00
Enrico Weigelt, metux IT consult
85a66a723f xfree86: fbdevhw: fix bdevHWInit() parameter
device name should be const char *.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-21 22:24:18 +02:00
Enrico Weigelt, metux IT consult
d9e43d0a98 xfree86: fbdevhw: fix fbdevHWProbe() parameter
the device name parameter should be const char *.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-21 22:24:18 +02:00
Enrico Weigelt, metux IT consult
be380d1778 xfree86: fix xf86I2CBusInit() prototype
name parameter should be const char *

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-21 19:07:08 +02:00
Enrico Weigelt, metux IT consult
a830e4eff5 os: xtrans: drop XSERV_t and x11_t defines
These are always enablde (x11_t is defined when XSERV_t is defined),
so no need for the #ifdef's anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
b17fe4128b os: xtrans: drop ifdef TRANS_SERVER
it's always defined, no extra guards needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
d5d19ac6f0 os: use internal xtrans instead of external library
Now that we've got xtrans bundled in our source tree, use this one and
drop the external dependency.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/691
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:29:38 +02:00
Enrico Weigelt, metux IT consult
1d1ae20e75 xwin: use NULL instead of NullClient
No need to have another name for NULL, we can use NULL directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:24:55 +02:00
Enrico Weigelt, metux IT consult
1975ae8a5f kdrive: use NULL instead of NullClient
No need to have another name for NULL, we can use NULL directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:24:55 +02:00
Enrico Weigelt, metux IT consult
030745a0e7 dix: move inpututils.h and rename it to inpututil_privs.h
it's a private header, thus should not be in public include directory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 04:51:30 +02:00
stefan11111
e89fd17340 kdrive: constitfy kdOsFuncs & document KdOsInit()
Not supposed to be written to (once the pointer is assigned),
so should be marked const. Also document KdOsInit()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 04:51:30 +02:00
stefan11111
512fd49def kdrive: ephyr: initialize OS specific callback vectors
These will be used by subsequent commits for generic Kdrive
functions calling back into the OS specific parts

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-18 04:51:30 +02:00
stefan11111
d0a7d42090 kdrive: add KdOsInit
Kdrive X servers used to do the OS-speciffic init part using KdOsInit.
This was changed in modern Xorg because Xephyr is the only kdrive
X server there, so there was no need to keep this generic.
Since we want to eventually add Xfbdev, we need to add this back.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-18 04:51:30 +02:00
Enrico Weigelt, metux IT consult
36125623fd modesetting: fix skipping on empty properties in drmmode_output_set_property()
We actually need to skip the entry if p->atoms is NULL.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 04:46:57 +02:00
fish4terrisa-MSDSM
c754162a36 modesetting: ignore the drmmode if p->atoms is null
Some display drivers might cause p->atoms to be null if the display is
disabled. This will cause segfault when checking
if p->atoms[0] != property .
Some display drivers owned by qualcomm is known to cause this bug.

Signed-off-by: fish4terrisa-MSDSM <flyingfish.msdsm@gmail.com>
2025-07-11 17:14:07 +02:00
Enrico Weigelt, metux IT consult
dfcfdd67a6 xquartz: drop using HAVE_DIX_CONFIG_H
This symbol is always defined, and the header is always present,
so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-08 17:43:07 +02:00
Enrico Weigelt, metux IT consult
2c50fedc2d xfree86: inputtest: use FatalError() instead of abort()
Directly calling abort() doesn't print a stack trace, nor any useful message.
Instead FatalError() should be used in cases, where there's really no other
way than terminating the Xserver. The FatalError function also tries to make
a smooth shutdown (eg. resetting video mode), so console doesn't end up locked.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-08 15:56:06 +02:00
stefan11111
c4df9ecdc5 kdrive: add documenation for mouse arguments
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-08 13:13:20 +02:00
stefan11111
d0c507d9e7 kdrive: const-qualify KdAddConfig{Keyboard,Pointer}'s argument
The passed name buffer isn't changed by those functions ever
(it would be a bug if they did so), therefore it should be const.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-08 13:13:20 +02:00
stefan11111
836013edca kdrive: move a local variable declaration to the top of the scope
Makes the code more consistent with the rest of the codebase

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-08 13:13:20 +02:00
stefan11111
2884ede393 kdrive: fix incorrect NULL-check
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-08 13:13:20 +02:00
Enrico Weigelt, metux IT consult
c6777fe48e xnest: drop unused DarwinHandleGUI()
Obsolete since 17 years now, probably just forgotten to clean up.

Fixes: ef1c520537
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:10:02 +02:00