Commit Graph

21475 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
91e04e4ec6 record: use X_SEND_REPLY_SIMPLE() for simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:21:36 +02:00
Enrico Weigelt, metux IT consult
5ea2496d20 treewide: clean up static zero initialization
Do it the ISO C way.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:21:16 +02:00
Enrico Weigelt, metux IT consult
331510cc8f randr: use X_SEND_REPLY_SIMPLE() for sending simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:19:23 +02:00
Enrico Weigelt, metux IT consult
4aff0544ea dix: screen_hooks: drop extra ; on DECLARE_SCREEN_HOOK()
This isn't allowed by C standard, so getting warnings using -pedantic.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:18:39 +02:00
Enrico Weigelt, metux IT consult
286a15de4c xfree86: dri: use X_SEND_REPLY_SIMPLE() for simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:17:06 +02:00
Enrico Weigelt, metux IT consult
a27f18d1c6 Xi: ProcXGetDeviceControl() also use x_rpcbuf_t for byte-swapping
Use x_rpcbuf_t also for writing individual fields and so let it also
do the byte-swapping.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:16:18 +02:00
Enrico Weigelt, metux IT consult
72083eb117 glamor: don't use anonymous structs and unions in glamor_composite_shader
Anonymous structs and unions are a GNUism, violating C standard, thus
better not using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:14:48 +02:00
Enrico Weigelt, metux IT consult
54d430f893 pseudoramiX: use X_SEND_REPLY_SIMPLE() for sending simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:14:21 +02:00
Enrico Weigelt, metux IT consult
e223abb80e Xi: ProcXISelectEvents() declare variables where needed
For better readability, declare the variables only where they're used,
and try to scope them, instead of declaring them all on the very top.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 10:04:27 +02:00
Enrico Weigelt, metux IT consult
37ebc7d74b treewide: explicitly cast %p printf parameters to void*
Do it the ISO C way, so -pendantic is shouting a little bit less.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 10:03:34 +02:00
stefan11111
65a7f1d6a1 kdrive: add build system bits for kdrive input drivers
They are all disabled for now, build options for enabling them
will be added when Xfbdev is added.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-31 10:02:32 +02:00
stefan11111
dcc29cce96 kdrive: small C cleanups we missed
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-31 10:02:32 +02:00
stefan11111
133bf69eb5 meson.build: add Xephyr to the list of X servers we mention at build time
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-31 10:02:32 +02:00
Enrico Weigelt, metux IT consult
c4b492b36d xkb: ProcXkbGetDeviceInfo(): use x_rpcbuf_t for reply payload assembly
At this point just use it as allocator, so we can use the
X_SEND_REPLY_WITH_RPCBUF() macro for final sending.

Follow-up commits will change the whole call stack to operate on
x_rpcbuf_t directly, so it's also doing the byte-swap for us.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 10:00:40 +02:00
Enrico Weigelt, metux IT consult
4160338f3a dix: devices: use x_rpcbuf_t for payload assembly
Use x_rpcbuf_t for reply payload assembly, so we can uniformly use the
X_SEND_REPLY_WITH_RPCBUF() macro for final write out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 09:59:36 +02:00
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