Commit Graph

2363 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
a56e1665a1 dix: inline SProcPoly()
Yet another step for getting rid of the unnecessarily complicated SProc*
machinery. Later, all those swap*() calls will be replaced by macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-07 11:06:37 +02:00
stefan11111
4984b12967 modesetting: Use the same cursor mask interleave as other drivers
There is no explanation for these values, but the one we are
currently using doesn't work.

Use the values from vendor-speciffic drivers, which do work.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-10-02 18:49:40 +02:00
Enrico Weigelt, metux IT consult
19921fd401 dix: unexport ConnectionInfo field
Not used by any drivers, so no need to keep it in public SDK.
Since it's not used by any drivers, effectively no ABI change, so
can be safely done within ABI-25.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-01 11:42:50 +02:00
Enrico Weigelt, metux IT consult
b306691c2d win32: move definition of sigset_t to os/osdep.h
Not needed by drivers (there aren't any on win32), so no need to
have it in public SDK header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 19:13:49 +02:00
Enrico Weigelt, metux IT consult
5ccaceb43c dix: inline SProcResourceReq()
Simplifying byte-swapping code flow by inlining SProcResourceReq()
instead of having complicated call chains.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 13:57:06 +02:00
Enrico Weigelt, metux IT consult
3bec112cf1 dix: drop obsolete SProcSimpleReq()
This function is really doing nothing except of calling into the
actual request handler, so not needed at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:23:21 +02:00
Enrico Weigelt, metux IT consult
4a75fb14b7 os: unexport ReplyCallback
It's only used by record extension, not used by any drivers at all
(neither FOSS nor proprietary), so it shouldn't be in the public SDK.

Since it's never been used by any driver, it's effectively no ABI change,
so we can safely do this within ABI-25.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:05:27 +02:00
Enrico Weigelt, metux IT consult
ca484055c7 dix: unexport screen saver parameters
Not used by any external drivers, so no need to keep them in public
SDK headers. Since they're never used by drivers, it's effectively
not an ABI change, so can safely be done within ABI-25.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:01:21 +02:00
Enrico Weigelt, metux IT consult
21fb27735a os: unexport XNFreallocarray()
Not used by any drivers, no no need to keep it in public SDK.
Since it's not used by drivers, it's effectively not an ABI change,
so can be done within ABI-25.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 10:53:15 +02:00
Enrico Weigelt, metux IT consult
8cd201d89a dix: unexport ResourceStateCallback (not used by drivers)
Only used by Xselinux extension, not by any drivers, so no need to
keep it exported.

Since it's never been used by drivers at all, it's effectively no ABI change,
so can safely be done within ABI-25.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 10:34:35 +02:00
Enrico Weigelt, metux IT consult
74e3f18204 os: unexport inSignalContext
Only used inside OS layer and xfree86 os-support, so no need to keep
it in public SDK.

Since never used by any drivers, it's not an actual ABI change, so
we can safely do it within ABI-25.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-26 15:58:04 +02:00
Enrico Weigelt, metux IT consult
da42cb968c os: move LogPrintMarkers() declaration into private header
Not exported, not used by any external modules, so no need to have
that declaration in a public SDK header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-26 11:50:59 +02:00
Enrico Weigelt, metux IT consult
16c0f1dfb8 dix: move struct _WorkQueue definition into dixutil.c
It's only used inside dixutil.c, nowhere else, especially not drivers,
so no need to keep it in public SDK. Safe for ABI-25.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-26 11:47:15 +02:00
Enrico Weigelt, metux IT consult
62174b33c3 include: move CharInfoPtr definition to gcstruct.h
Move it to where it's really needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-25 15:34:50 +02:00
Enrico Weigelt, metux IT consult
5cdfe6e5ab os: move enum ExitCode into private header
Not used by any external drivers, so no need to keep it public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-25 09:37:05 +02:00
Enrico Weigelt, metux IT consult
678b025df5 include: misc.h: drop duplicate definition of CallbackListPtr
This type is already defined in `include/callback.h` - anybody who wants it
most likely needs that include file, too.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-25 09:36:53 +02:00
Enrico Weigelt, metux IT consult
80e6e7693b os: log: make LogVHdrMessageVerb() static
Only used inside log.c and not exported, so can be made static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-24 11:58:46 +02:00
Enrico Weigelt, metux IT consult
9a920b8fc5 dix: make ProcBadRequest() static
Nobody outside tables.c is actually using it, so can be static.

The function used to be _X_EXPORT'ed, but there's no indication that any
external driver (not even proprietary NVidia) ever using it, so we can
get away w/o ABI version bump.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:49:22 +02:00
stefan11111
5943ca5a1d os: Fix builds with -Dxdmcp=false
Fixes: https://github.com/X11Libre/xserver/issues/239
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-22 12:00:14 +02:00
Enrico Weigelt, metux IT consult
d244e8a097 include: pixmapstr.h: inline PixmapBox() and fix signedness
Not used anywhere else than just once in this header, so we can directly
inline it. Also adding explicit typecast to silence signedness warning.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-18 20:26:31 +02:00
Enrico Weigelt, metux IT consult
37a17df4d5 include: misc.h: bytes_to_int32(): use CARD32 as return value
Callers usually need this value as CARD32 (the X11 protocol's native type
of the .length header field), so convert it here in order to reduce
unnecessary compiler warnings.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-17 09:37:43 +02:00
Enrico Weigelt, metux IT consult
ce69e8a520 dix: fix ClientRec->numSaved to unsigned
this field is used a counter, thus should be unsigned, instead of having
dozens of signess warnings or adding casts to suppress them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-16 19:13:46 +02:00
stefan11111
77b396d09b include: update comment about exported noPanoramiXExtension
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-15 10:26:11 +02:00
Enrico Weigelt, metux IT consult
56c4d68140 treewide: drop ScreenInfoPtr parameter from InitOutput()
Nobody's using this pointer anymore, everybody's using the global
screenInfo structure.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-12 19:49:23 +02:00
Enrico Weigelt, metux IT consult
9678c60ad1 dix: deprecate GetFontPath()
The function isn't used anymore, but still part of SDK/ABI. And it shouldn't
be used by drivers, ever. Marking it as deprecated now, so we can remove it later.

(it's also not present in recent proprietary NVidia drivers, btw)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:44:49 +02:00
Enrico Weigelt, metux IT consult
f32d06a101 dix: drop obsolete SGenericReply()
Not used anywhere, neither exported, so no need to keep it around
any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 17:23:16 +02:00
Enrico Weigelt, metux IT consult
f6bd4ab3d3 dix: drop obsolete CopySwap16Write()
Not used anywhere, neither exported, so no need to keep it
around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:39:16 +02:00
Enrico Weigelt, metux IT consult
065f8d4d75 dix: unexport internal QueryFont() function
This function is internal to DIX (used for assembling XQueryFont replies
and not used by any drivers (not even proprietary NVidia), and really
shouldn't ever called by them at all. It's been one the many victims of a
really unthoughtful mass export back 17 years ago.

That'S a necessary step for refactoring the RPC reply mechanics.

Since it's never used by any driver at all, we can easily to this change
within the current ABI level.

Fixes: d6cbd4511e
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:31:44 +02:00
Enrico Weigelt, metux IT consult
7655ee2631 dix: drop unused CopySwap32Write()
Not used anywhere, neither exported, so no need to keep it
around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:29:35 +02:00
Enrico Weigelt, metux IT consult
ae4912f837 dix: drop obsolete Swap32Write()
Not used anywhere, neither exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:55:40 +02:00
Enrico Weigelt, metux IT consult
c3e83fa555 include: os.h: fix extra ;
Fix pedantic warnings:

> ../include/os.h:144:71: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
>   144 | XNFalloc(unsigned long /*amount */ ) __attribute__((returns_nonnull));;

> ../include/os.h:158:76: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
>   158 | XNFcallocarray(size_t nmemb, size_t size) __attribute__((returns_nonnull));;

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 15:52:49 +02:00
stefan11111
cef7cda851 include: modesetting: rename LIBDRM_PLANE_SIZE_HINTS to LIBDRM_HAS_PLANE_SIZE_HINTS
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-29 12:01:18 +02:00
notbabaisyou
e6c980f08e hw/modesetting: Fix up cursor size probing.
modesetting has a sort of broken concept of getting the cursor dimensions since 1f41320e1c, which causes issues on virtual machines and older AMD hardware. Our solution is to use SIZE_HINTS which is available in i915 since 2023 otherwise fallback to getting the cursor size provided by the driver, if a driver wants to have a more optimal cursor size, it is more than welcome to implement SIZE_HINTS in it's DRM interface.

Taken from my own fork of Xorg.

v2: Fix some bugs in the implemenation.
2025-08-28 16:56:25 +02:00
Oleh Nykyforchyn
3817846c6d xserver: hw/xfree86,include: add a missed ifdef
It is patch 1/7 of a series that provides a convenient way to specify
IgnoreABI and module search paths on a per-driver basis.

It adds #ifdef CONFIG_LEGACY_NVIDIA_PADDING wherever it should be but
is missed.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-08-24 12:40:19 +02:00
stefan11111
90846d49cc xfree86: add (optional) ScreenRec padding for legacy Nvidia driver
Commit 3cb3024fea removed pScratchPixmap field
in ScreenRec, which broke legacy Nvidia (proprietary) drivers (470.x), thus
we should add an empty/dummy field here, to ensure correct padding. But this
would break ABI again - can't do that within minor release line.

As compromise, adding a *build time* option CONFIG_LEGACY_NVIDIA_PADDING for
this, so operators/packagers can opt-in to this change.

As it breaks ABI, the option is disabled by default until the next major release
and intended for EXPERTS ONLY who need nvidia390 or nvidia470 drivers.

Note that ALL DRIVERS should be rebuild if it is applied!

This compile-time option, along with the hacks needed to support it
in a non-abi-breaking way, should be droppen in the next major release.

Co-authored-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 17:02:12 +02:00
Enrico Weigelt, metux IT consult
7c3ddc80ef dix: drop obsolete WriteSwappedDataToClient() macro
This macro isn't and shouldn't be used anymore, so get rid of it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 15:45:47 +02:00
Enrico Weigelt, metux IT consult
e93dd75dd8 dix: fix int type mismatch on CURSOR_REC_SIZE and CURSOR_BITS_SIZE
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-15 12:55:40 +02:00
Enrico Weigelt, metux IT consult
34c3a9c7e2 treewide: fix serverGeneration int type mismatch
The global (exported) serverGeneration field is `unsigned long`, while
many other places copy it and compare it two other integer types, eg.
plain `int` (which is signed). Even if it's unlikely ever reaching such
high number of generations that it will ever make trouble, it's still
a good idea to clean this up and use the same type everywhere.

For clearity, introducing a typedef `x_server_generation_t` which is
used everywhere, instead of raw `unsigned long`.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:52:03 +02:00
Enrico Weigelt, metux IT consult
8d2860fd35 include: regionstr.h: fix int type mismatch in RegionNumRects() and RegionSize()
Fix compiler warnings by explicit type casts.

In this case, we know that those values can't be bigger than int can take,
neither become negative.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:13:01 +02:00
Enrico Weigelt, metux IT consult
566f961fd4 dix: fix int-type mismatches related to dixClientIdForXID()
The client index (in the client table) can never be negative, thus
make it an unsigned short.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 13:02:14 +02:00
b-aaz
6574903366 include: meson.build: Fixed broken dependency on epoll-shim on FreeBSD.
The epoll-shim dependency did not get detected on FreeBSD,
because of missing prefix and dependency arguments in has_function()
call in include/meson.build.
Also added the path of epoll-shim headers include directory
(/usr/local/include/libepoll-shim/) to the compiler include search
paths for proper detection and build.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-08-05 14:04:05 +02:00
Enrico Weigelt, metux IT consult
bbabd96e6c meson: rename symbol MITSHM to CONFIG_MITSHM
some bit better naming for config symbols.
Yet leaving the old one defined, until all drivers have kept up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:39:28 +02:00
Enrico Weigelt, metux IT consult
c25a0a533e glx: fix duplicate typedef
../glx/indirect_table.c
  In file included from ../glx/indirect_table.c:28:
  In file included from ../glx/glxserver.h:66:
  ../include/glx_extinit.h:33:28: warning: redefinition of typedef '__GLXscreen' is a C11 feature [-Wtypedef-redefinition]
     33 | typedef struct __GLXscreen __GLXscreen;
        |                            ^
  ../glx/glxscreens.h:113:28: note: previous definition is here
    113 | typedef struct __GLXscreen __GLXscreen;
        |                            ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 10:18:19 +02:00
Enrico Weigelt, metux IT consult
967ae609b6 dix: drop DDXBEFORERESET symbol
Reduce complexity for things that really don't matter much:

The ddxBeforeReset() function is called when the Xserver going to reset
(new server generation). Right now, the only DDX really needing that is
Xwin, on all the others it's just no-op.

We've got an extra complicated build logic, which ifdef's out this all when
Xwin isn't built at all. The saving is extremely minimal - just skipping
few stub functions, which in most sessions aren't even called.

Therefore, get rid of this extra complexity that isn't giving us any
notable gain.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 11:41:48 +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
Enrico Weigelt, metux IT consult
2bee97548e os: move X_NOTIFY_* defines to separate header
These defines are already public, used by consumers of SetNotifyFd(),
but also needed in places where os.h cannot be included.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 15:21:13 +02:00
Enrico Weigelt, metux IT consult
731ace6c13 dix: ProcGetMotionEvents(): simplify writing out xTimecoord
The swapping is so trivial, we don't need several extra functions
for that - just do it right where the header fields are swapped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-24 11:57:19 +02:00
Enrico Weigelt, metux IT consult
dcf7890076 Xace: always build xace
Xace callbacks are needed in many places, and the their overhead (when not
actually used) is really minimal. So it doesn't make much sense having
extra complexity for disabling it at build time.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-24 10:49:54 +02:00
Enrico Weigelt, metux IT consult
8d9d37935f include: dix.h: drop NullClient macro
Not used anymore, and not part of ABI.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:24:55 +02:00
Enrico Weigelt, metux IT consult
e3acb2454c include: drop obsolete WriteReplyToClient() macro
Not used anymore, and not part of ABI, so no need to keep it around
any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 05:25:56 +02:00