Commit Graph

22158 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
01502a4ddd dix: request_priv.h: fix X_REQUEST_REST_COUNT_CARD16()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 14:26:41 +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
Enrico Weigelt, metux IT consult
1b9f88aa66 xfree86: dri2: drop unused variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 12:10:03 +01:00
Enrico Weigelt, metux IT consult
61fc8dac6a xquartz: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 12:08:57 +01:00
Enrico Weigelt, metux IT consult
d1dd9bc5e6 Xi: ProcXChangeDeviceControl() consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 11:47:41 +01:00
Enrico Weigelt, metux IT consult
b593cd50ee xfree86: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 18:58:20 +01:00
Enrico Weigelt, metux IT consult
72eec1a2e0 dri3: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 18:02:18 +01:00
Enrico Weigelt, metux IT consult
bfb2bc1919 composite: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 18:02:08 +01:00
Enrico Weigelt, metux IT consult
c654da4534 record: fix reply structs
Fixes: 4d4fd5866e
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 18:00:00 +01:00
Enrico Weigelt, metux IT consult
87468931cc dbe: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 17:34:35 +01:00
Enrico Weigelt, metux IT consult
3d43102e96 present: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 17:12:42 +01:00
Enrico Weigelt, metux IT consult
f26b31d8f7 randr: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 17:12:35 +01:00
Enrico Weigelt, metux IT consult
4d4fd5866e record: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 16:14:06 +01:00
Enrico Weigelt, metux IT consult
cbf814f375 xfixes: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 16:13:52 +01:00
Enrico Weigelt, metux IT consult
aa8064be86 render: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 15:16:37 +01:00
Enrico Weigelt, metux IT consult
de60ac5bbe xkb: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 15:03:11 +01:00
Enrico Weigelt, metux IT consult
1487c7c03f xkb: drop some junk comments
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 14:37:58 +01:00
Enrico Weigelt, metux IT consult
a173278c4f dix: make SwapLongs() inline
a) trade a little bit of code size for speed
   (depending on exact caller, compiler might also optimize a lot)
b) reduce the need for exported, but non-public symbol

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 14:30:02 +01:00
Enrico Weigelt, metux IT consult
090c68e13d Xext: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 14:29:29 +01:00
Enrico Weigelt, metux IT consult
341c890564 include: tiny indention cleanup
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 14:00:02 +01:00
Enrico Weigelt, metux IT consult
409e721e98 os: merge os/xstrans.c and os/transport.c
Since xtrans is now in-tree and already have been trimmed down
for only things needed by the Xserver, the split between xstrans.c
and transport.c isn't needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 13:15:58 +01:00
Enrico Weigelt, metux IT consult
d877b4830c xwin: drop unused variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 11:05:24 +01:00
Enrico Weigelt, metux IT consult
6a320e76cb dix: add macros for request handlers and swapping
add some macros for making request handlers and byte swapping easier:

    * X_REQUEST_HEAD_STRUCT(type) and X_REQUEST_HEAD_AT_LEAST(type)
      declare header struct pointers and check size
    * X_REQUEST_FIELD_CARD16(field)
      swaps a CARD16 (word) header field (if neccessary)
    * X_REQUEST_FIELD_CARD32(field)
      swaps a CARD32 (dword) header field (if neccessary)
    * X_REQUEST_REST_CARD16()
      swaps remaining CARD16 array payload (if necessary)
    * X_REQUEST_REST_CARD32()
      swaps remaining CARD32 array payload (if necessary)
    * X_REQUEST_REST_COUNT_CARD16(count)
      check swaps `count` CARD16 payload fields and checks size
    * X_REQUEST_REST_COUNT_CARD32(count)
      check swaps `count` CARD32 payload fields and checks size

How to use them:

    1. put X_REQUEST_HEAD_STRUCT() or X_REQUEST_HEAD_AT_LEAST() ontop of each Proc*()
    2. add X_REQUEST_FIELD_*() et al below, for all fields to be swapped and
       drop the corresponding SProc*()'s
    3. let the dispatchers call Proc*() instead of SProc*()

Notes:

    * the length field is already swapped before request handlers called

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 10:58:14 +01:00
Oleh Nykyforchyn
f4115e69eb dix: initialize all screens before proceeding to gc's, root windows etc
Current code walks along all screens and initializes screen resources,
then gc's, stipples, root windows for each of them, hence after
the first screen registering new private keys is no more possible.
This crashes modesetting driver if it is not initialized before others.

This patch makes screen resources for all screen initialize first, hence
all necessary private keys (including of the type PRIVATE_WINDOW) are
initialized before root windows are created.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-03 09:24:33 +01:00
stefan11111
3f821b291e modesetting: get more values from the fallback cursor probe
The space needed to store these extra values is at worst a few dozen bytes.
In exchange for these, larger cursors glyphs can use a more optimal cursor size.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-12-02 10:14:12 +01:00
Enrico Weigelt, metux IT consult
d0b6510b64 composite: declare and initialize reply struct when needed
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-01 16:15:46 +01:00
Enrico Weigelt, metux IT consult
7d8f084fbf dri: use static struct init on declaration & drop useless assignments
Make the code a bit easier to read by using initialization of the reply
structs, at the point of declaration. Most of them aren't written to later,
just passed into WriteReplyToClient(). Also dropping some useless zero
assignments (struct initializers automatically zero-out unmentioned fields).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-01 14:09:02 +01:00
Branimir Ri\v{c}ko
3b99373a17 Fixed a out of bounds read.
Signed-off-by: Branimir Ri\v{c}ko <rickobranimir@gmail.com>
2025-12-01 11:02:06 +01:00
stefan11111
c01c4e7c72 modesetting: Only close the dmabuf fd if it isn't -1
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-11-28 18:44:22 +01:00
Icenowy Zheng
03fa63778b modesetting: fix shared pixmap dmabuf fd leakage
After the dmabuf fd exported by another screen is imported to a pixmap,
the pixmap holds a reference for the buffer, thus the FD itself finished
its job and needs to be closed to prevent a stale reference to the
buffer.

Signed-off-by: Icenowy Zheng's avatarIcenowy Zheng <uwu@icenowy.me>
2025-11-28 18:44:22 +01:00
stefan11111
6be7fe9d12 modesetting: print message when reverse prime mode is enabled
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-11-28 18:44:22 +01:00
Marc-Alexandre Espiaut
e1b3bbafa8 dix: remove dixLookupBuiltinColor() unused screen argument
Signed-off-by: Marc-Alexandre Espiaut <76531574+malespiaut@users.noreply.github.com>
2025-11-28 18:43:40 +01:00
Herman Semenoff
fc8f9f4331 xfree86: fix infinite boot when parsing incorrect BusID section Device
This change checks if there is a colon after the bus name. If there is none, *retID will point to the final null character of the original string.
2025-11-28 10:07:46 +01:00
Enrico Weigelt, metux IT consult
e14d352661 dix: move GCAllBits define into private header
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 20:05:59 +01:00
Enrico Weigelt, metux IT consult
e0ddc62bd0 os: add header for math related functions (possibly OS optimized)
Adding a new header for math related functions, beginning with new
MIN/MAX macros, which will be used by subsequent commits.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 19:58:33 +01:00
Enrico Weigelt, metux IT consult
33729b1361 include: windowstr.h: unexport w*() macros
These aren't used by any drivers, so no need to keep them public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 19:54:42 +01:00
Enrico Weigelt, metux IT consult
ff8d26df21 include: windowstr.h: unexport SameBackground() and SamBorder() macros
Not used by any drivers, so no need to keep them public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 19:49:14 +01:00
Enrico Weigelt, metux IT consult
2fe5e2519a os: move OsCommRec/Ptr and related functions into own header
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 19:36:00 +01:00
Enrico Weigelt, metux IT consult
4af16f4ede composite: dont include <dix-config.h> from headers
This file is supposed to be included from each source file at the
very top.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 19:35:46 +01:00
Enrico Weigelt, metux IT consult
9b8d7d1eb9 treewide: don't include <region.h> anymore
Nothing in there that we need, include <regionstr.h> instead.
But keeping the file in place, until all external consumer have
been migrated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 19:27:27 +01:00
JSOwens
d4e67aa773 .github: add a check for pull request commits to be signed off
Added a workflow to check the commit messages of a PR to make sure each is
signed off by the author. A repo token is required, here named SECRET_TOKEN,
which has access to read and write PR comments.

Signed-off-by: JSOwens <josephs.owens@gmail.com>
2025-11-27 19:27:15 +01:00
Chase
644d151173 .github: install-prereq.sh: move xproto to meson
Signed-off-by: Chase <chinkle3@illinois.edu>
2025-11-27 19:04:19 +01:00
Enrico Weigelt, metux IT consult
a72972274e mi: drop intToCoord() macro
Not used anywhere, no need to keep it around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 18:25:12 +01:00
Oleh Nykyforchyn
0230c6e074 dix: reexport ConnectionInfo for NVidia 390
This patch exports ConnectionInfo in server_priv.h and references
it in globals.c to force exporting.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-11-27 17:06:36 +01:00
Chase
341b7f19f8 dbe.c: remove DISABLE_MI_BY_DEFAULT macro 2025-11-27 17:05:31 +01:00
Enrico Weigelt, metux IT consult
bddf4ae8e8 xfree86: move over xf86vidmode extension to hw/xfree86
This extension is private to the xfree86 DDX, no other one supports it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 14:03:37 +01:00
Enrico Weigelt, metux IT consult
b7e9544318 Xext: xvmc: drop dead SHM code path
Xvmc isn't using SHM for over 20 years now. There's still a code path for it
that could be enabled explicitly by manually setting HAS_XVMCSHM, but no
indication whatsoever that this ever has been done.

Considering that Xvmc in general already is obsolete for very long time now,
we can safely assume this code path is really dead and can be removed.

Fixes: 9a26d6f39e
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 13:50:11 +01:00
Enrico Weigelt, metux IT consult
0b3fb18754 xfree86: drop xf86CursorScreenKey macro
Use the actual field directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 13:48:22 +01:00
Enrico Weigelt, metux IT consult
c503343a6b Xext: Xvmc: drop XvMCScreenKey macro
Directly use the actual field instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 13:47:59 +01:00
Enrico Weigelt, metux IT consult
d7b773c174 xfree86: vgaarbiter: drop VGAarbiterScreenKey and VGAarbiterGCKey macros
Use the actual fields directly instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 13:47:05 +01:00