Commit Graph

21460 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
d6cd58e04c fb: fix unused function fbInitializeDrawable()
>  ../fb/fbpixmap.c:32:20: warning: unused function 'fbInitializeDrawable' [-Wunused-function]
>      32 | static inline void fbInitializeDrawable(DrawablePtr pDrawable) {}

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 19:05:15 +02:00
Enrico Weigelt, metux IT consult
2a5bca08ef xfree86: x86emu: drop assert() on uninitialized variable
If assert()s actually enabled, we're having undefined behaviour.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 19:02: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
Enrico Weigelt, metux IT consult
cb0ab6ae0b Xi: ProcXIPassiveGrabDevice(): move rpcbuf declaration upwards
The code below the `out` label is using the rpcbuf variable, but we have
a jump site before the variable is declared. It had been overlooked, because
for yet unknown reasons the compiler doesn't complain at all about this.
We could assume that it at least moves the stack allocation upwards
(always could even happen even on function entry), but we don't know whether
the memory is already unitialized.

So, to be on safe-side, move the declaration upwards, before the first
jump site.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 14:32:39 +02:00
Enrico Weigelt, metux IT consult
0075fca5fb Xi: ProcXIPassiveGrabDevice(): use x_rpcbuf_t
use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 13:20:17 +02:00
Enrico Weigelt, metux IT consult
6413bd61d7 Xi: ProcXGetFeedbackControl(): use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 13:11:43 +02:00
Enrico Weigelt, metux IT consult
e46ea5c7eb Xi: ProcXGetDeviceMotionEvents(): use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 13:11:32 +02:00
Enrico Weigelt, metux IT consult
eee0a6b1fd Xi: ProcXGetDeviceModifierMapping(): use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 13:11:20 +02:00
Enrico Weigelt, metux IT consult
8ce6636973 Xi: ProcXGetDeviceControl(): use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 13:11:10 +02:00
Enrico Weigelt, metux IT consult
e45decb482 Xi: ProcXGetDeviceButtonMapping(): use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 13:10:59 +02:00
Enrico Weigelt, metux IT consult
61eb2e2675 Xi: make ListDeviceClasses() static
Only used within the same source file, so can be made static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 13:10:48 +02:00
stefan11111
5df7b1fa5c modesetting: Fix uninitialized drmmode_crtc->cursor_{width,height}
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-29 12:04: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
Enrico Weigelt, metux IT consult
64d465fdaf xkb: send simple replies via X_SEND_REPLY_SIMPLE()
Use the X_SEND_REPLY_SIMPLE() macro for sending simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 11:42:53 +02:00
Enrico Weigelt, metux IT consult
18d3fd9ac8 Xi: ProcXOpenDevice(): use x_rpcbuf_t
use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 11:42:31 +02:00
Enrico Weigelt, metux IT consult
68b7098173 Xi: ProcXQueryDeviceState(): use x_rpcbuf_t
use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 11:42:22 +02:00
Enrico Weigelt, metux IT consult
a7a48427f5 Xi: ProcXIQueryDevice(): use x_rpcbuf_t
use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 11:39:59 +02:00
Enrico Weigelt, metux IT consult
5281024261 Xi: ProcXIQueryPointer(): use x_rpcbuf_t
use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 11:39:51 +02:00
Enrico Weigelt, metux IT consult
ebeba052b5 .github: fix MacOS build
MacOS build suddenly missing xvfb-run, which did work up until few hours ago.
Therefore, make a quick workaround, until the situation is clearly resolved.

The only impact is that some XTS tests (which are ignored on MacOS anyways)
might not work properly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-28 23:26:12 +02:00
stefan11111
8c2b6dec47 kdrive: replace dix-config.h with kdrive-config.h
In preparation for adding the Xfbdev kdrive X11 server

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-28 18:51:55 +02:00
Enrico Weigelt, metux IT consult
7689a31866 dix: rpcbuf: add x_rpcbuf_write_INT32s()
litle wrapper for directly writing INT32 arrays w/o signess warnings.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-28 17:22:30 +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
notbabaisyou
e7455f48a3 hw/modesetting: Add drmmode_get_cursor_limit.
Used in upcoming commit.
2025-08-28 16:56:25 +02:00
notbabaisyou
c390441ca9 hw/modesetting: Add required structs and data.
Will be used by the next commits.
2025-08-28 16:56:25 +02:00
Enrico Weigelt, metux IT consult
a43941be91 .github: make release message job depend on builds
Make sure the release message won't be created when build jobs on the
release tag didn't succeed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-28 12:56:32 +02:00
Enrico Weigelt, metux IT consult
c78d68af05 .github: don't ignore failing tests anymore
Now that the test suite has been fixed to work on the CI, we no longer
need (and should) ignore broken test runs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-28 12:06:32 +02:00
Enrico Weigelt, metux IT consult
1115ac52ac test: allow skipping tests on Xephyr with GLES
The GLES tests need an actual GPU (/dev/dri/* device), which is not available
within github CI runners, so we need to skip those when running there.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-28 11:48:02 +02:00
Enrico Weigelt, metux IT consult
dad67772fb .github: ubuntu: tests: enforce using llvmpipe
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-28 11:19:20 +02:00
stefan11111
c0017acbaf Xext: add missing implicit padding to vidmode fillModeInfoV2
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-28 10:28:53 +02:00
Enrico Weigelt, metux IT consult
825e908d54 .github: fix tetexec.cfg creation
We need to run the Xts build inside Xvfb, because it needs a running
Xserver for creating tetexec.cfg.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-27 18:53:26 +02:00
stefan11111
dc6c3c39c2 Xext: Fix Xv reply
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-27 16:36:18 +02:00
Enrico Weigelt, metux IT consult
f9bc5a29ac test: run various common commands like dpyinfo
Run various common checking commands like xdpyinfo, xvinfo, etc
on both Xvfb directly, as well as Xephyr inside Xvfb.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-27 14:44:34 +02:00
Enrico Weigelt, metux IT consult
68151adf35 test: make rendercheck triangles optional
The triangles test of rendercheck is known to be (partially broken on Xephyr,
since it doesn't fully support transparency (eg. a8 surfaces).

Therefore make it optional, so we're not spammed too much by false alarms

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-27 14:34:10 +02:00
Enrico Weigelt, metux IT consult
e1e10bd9c2 .github: update piglit version
Update piglit version used within the test stage to current master.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-27 12:50:24 +02:00
Enrico Weigelt, metux IT consult
a77ae86800 .github: catch piglit results as artifacts
Also store the piglit results into the build artifacts, so we can now
easily look at them later.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-27 12:47:36 +02:00
Enrico Weigelt, metux IT consult
627fde42df Xext: xres: fix XResQueryClientResources request
been using the wrong index for retrieving the resource type atom.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-27 11:39:53 +02:00
Enrico Weigelt, metux IT consult
a8de19aca3 .github: use a smarter cloning script
Several sites we need to clone our dependencies from (eg. freedesktop.org)
have pretty unreliable servers, so our CI jobs often fail just because
of temporary clone failure.

Therefore adding a separate cloning script, which is more clever with automatic
retries, but it also tries to keep the traffic low (eg. trying shallow clones
if possible) and automatically detecting whether we're pulling a ref or a
direct commit.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-27 11:17:14 +02:00
stefan11111
70f3b3abf3 dix: fix X_SEND_REPLY{,_WITH_RPCBUF} macros
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-27 09:46:33 +02:00
Enrico Weigelt, metux IT consult
6b7728bf7b .github: win32: several retries on git clones
The mingw32 build job often fails due frequent temporary problems on
cloning vom savannah. Retry several times, hoping to fix it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-26 12:47:36 +02:00
Enrico Weigelt, metux IT consult
a9fce3b3c2 xkb: XkbAssembleGeometry(): use x_rpcbuf_t
Use x_rpcbuf_t for assembling / byte-swapping reply payload.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-26 11:03:17 +02:00
Enrico Weigelt, metux IT consult
84dd2a5039 xkb: ProcXkbGetKbdByName(): extra payload size sanity check
Add extra check for comparing the actually written sub-payload sizes
with their previously computed ones. This is meant for troubeshooting
while still stabelizing the previous, not entirely trivial commits.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-26 11:02:44 +02:00
Enrico Weigelt, metux IT consult
e1315e22db Xext: security: use x_rpcbuf_t for reply payload assembly
Use x_rpcbuf_t for reply payload and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-26 10:52:14 +02:00
Enrico Weigelt, metux IT consult
cd86e5f69a Xext: canonical naming for reply structs
Let all reply structs be called `reply`.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-26 10:15:40 +02:00
Enrico Weigelt, metux IT consult
e6c7bd7c86 randr: ProcRRGetOutputProperty(): use x_rpcbuf_t for payload assembly
Use x_rpcbuf_t for request assembly and X_SEND_REPLY_WITH_RPCBUF()
for finally sending out everything together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-26 10:15:09 +02:00
Enrico Weigelt, metux IT consult
1102a0b6ce dix: let X_SEND_REPLY_SIMPLE() return X11 result code
Let X_SEND_REPLY_SIMPLE() macro return the X11 result code `Success`.
No change in semantics, just allowing a bit shorter typing, so one
can now directly write `return X_SEND_REPLY_SIMPLE(...)` in one line.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-25 16:47:59 +02:00
callmetango
d7c11245b0 dix: remove duplicate Xdefs include in dix_priv.h
Fixes: #800
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-08-25 14:42:38 +02:00
Enrico Weigelt, metux IT consult
29e1905935 dix: fix X_REPLY_HEADER_UNITS()
Needs to be bytes_to_int32() instead of pad_to_int32(), since we want
the amount of units instead of bytes here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-25 11:48:03 +02:00
Martin von Gagern
7789b3ff88 modesetting: Check for NULL mode_output before printing warning message
Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1816

Signed-off-by: Martin von Gagern <gagern@google.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1938>
2025-08-25 11:33:39 +02:00
Alan Coopersmith
40845a467e xfree86: Fix builds with gcc -Wpedantic
```
../hw/xfree86/loader/loadmod.c:85:33: warning: ISO C forbids empty
 initializer braces before C23 [-Wpedantic]
   85 | static int ModuleDuplicated[] = { };
      |                                 ^
../hw/xfree86/loader/loadmod.c:85:12: error: zero or negative size array
 ‘ModuleDuplicated’
   85 | static int ModuleDuplicated[] = { };
      |            ^~~~~~~~~~~~~~~~
```

Signed-off-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2054>
2025-08-25 11:24:56 +02:00
Enrico Weigelt, metux IT consult
35d72a759a dix: let X_SEND_REPLY_WITH_RPCBUF() return status code
Check for rpcbuf error and return BadAlloc then, otherwise return Success.
This way, callers don't need to check their rpcbuf for error on their own
anymore, but can just do return X_SEND_REPLY_WITH_RPCBUF(...).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-25 11:25:10 +02:00