Commit Graph

21747 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
36facd71b5 dix: move request/response related functions to new request_priv.h header
Move functions/macros dealing with request parsing or reply assembly/write
out of the big dix_priv.h into their own headers. This new header will also
get more of those function/macros soon (yet still in the pipeline).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-24 11:32:50 +02:00
Enrico Weigelt, metux IT consult
ec16f09861 compext: replace tabs by whitespaces
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-24 11:32:32 +02:00
Enrico Weigelt, metux IT consult
7b37b0c28b dbe: formatting cleanup
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-24 11:32:02 +02:00
Enrico Weigelt, metux IT consult
8fb8ce515e treewide: replace PICT_FORMAT by PIXMAN_FORMAT
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-23 18:20:09 +02:00
Enrico Weigelt, metux IT consult
3e5bb95a82 xace: drop obsolete/unused XaceAuditRec
This struct isn't used anymore for almost a decade, just a left over from
audit hooks removal, back in 2016.

Fixes: 6cb34816af
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-23 12:14:14 +02:00
Enrico Weigelt, metux IT consult
ac0a267f1d xace: drop unused XACE_AUTH_AVAIL
Not used anymore for almost two decades, so no need to keep it.

Fixes: eafaf40fb3
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-23 11:44:14 +02:00
Enrico Weigelt, metux IT consult
96b5da5a0d dix: replace XACE_EXT_ACCESS and XACE_EXT_DISPATCH by direct callback
Move the callbacks directly into DIX, since it's actually core infrastructure.
Also simplifying the whole machinery, by just using a simpel CallbackListPtr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-23 11:37:50 +02:00
Enrico Weigelt, metux IT consult
d82aa8308d xace: drop never used XACE_KEY_AVAIL
This hook was never used, so no need to keep around something that's
really not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-23 11:26:19 +02:00
Enrico Weigelt, metux IT consult
25f1614127 present: tiny whitespace cleanup
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 16:42:23 +02:00
Enrico Weigelt, metux IT consult
85cf8f0be4 Xext: Xv: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:55:13 +02:00
Enrico Weigelt, metux IT consult
3179c51bee Xext: Xv: use return value X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:49:55 +02:00
Enrico Weigelt, metux IT consult
39d0d9cb96 xselinux: use return code of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:49:43 +02:00
Enrico Weigelt, metux IT consult
94fc59c292 xselinux: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:49:33 +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
Enrico Weigelt, metux IT consult
48c72edf38 Xi: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:43:31 +02:00
Enrico Weigelt, metux IT consult
90a258d08a Xi: inline swapped property request handlers
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:43:21 +02:00
Enrico Weigelt, metux IT consult
53338710d0 render: consolidate byte-swapping in ProcRenderCreatePicture()
No need for extra functions and call tables for the few trivial lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:43:10 +02:00
Enrico Weigelt, metux IT consult
b96cffc80e render: consolidate byte-swapping in ProcRenderReferenceGlyphSet()
No need for extra functions and call tables for the few trivial lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:42:57 +02:00
Enrico Weigelt, metux IT consult
c2a2ce1d7e Xi: inline SProcXAllowDeviceEvents()
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:42:44 +02:00
Enrico Weigelt, metux IT consult
08d60b4083 composite: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:42:33 +02:00
Enrico Weigelt, metux IT consult
bb591fb1fd dix: AllocGlyphCursor(): make color parameters unsigned short
These values are assigned to `unsigned short` fields, and we're only
getting in smaller numbers that fit well into it. So fixing compiler
warning on type size mismatch by using short args.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:18:15 +02:00
Enrico Weigelt, metux IT consult
9856372932 dix: add callback before ClientRec is being destroyed
Existing client-state hook isn't sufficient for this, and so easy to
be extended cleanly (*1). Adding a new callback is trivial and cheap,
so preferring this way, instead of trying to tweak the existing hook
for something it's never been designed for.

*1) see discussion here: https://github.com/X11Libre/xserver/pull/1077

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:15:31 +02:00
Enrico Weigelt, metux IT consult
4486a554f8 dbe: Xi: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:14:12 +02:00
Enrico Weigelt, metux IT consult
5720e3d375 randr: Xi: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:13:58 +02:00
Enrico Weigelt, metux IT consult
e4e99bff2d compext: Xi: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:13:43 +02:00
Enrico Weigelt, metux IT consult
a6f629cbaa Xext: Xi: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:13:27 +02:00
stefan11111
a4d08427cf Xext: composite: xfixes: Fix warnings when building with -Dxinerama=false
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-22 12:12:48 +02:00
stefan11111
0cfe43853e os: hw/xfree86/x86emu: Silence warnings on gcc
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-22 12:12:48 +02:00
Enrico Weigelt, metux IT consult
a6b880a368 dix: Xi: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:06:04 +02:00
Enrico Weigelt, metux IT consult
05b832e8b2 dri3: Xi: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:05:52 +02:00
Enrico Weigelt, metux IT consult
809b0a7999 glx: Xi: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:05:39 +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
stefan11111
f252e04a78 fbdevhw: Restore accel flags when unmapping mmio
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-22 11:57:41 +02:00
stefan11111
e3aff38742 fbdevhw: Fix -Wunused-result warning in fbdev_open_pci
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-22 11:57:41 +02:00
sesankm
22a51912d1 glx: vndcmds: save unecessary calls to clear current context for same vendor
Signed-off-by: sesankm <26676400+sesankm@users.noreply.github.com>
2025-09-22 11:26:53 +02:00
callmetango
dc390bf006 README.md: update XLibre Test Drivers link
Changed the XLibre Test Drivers link from the discussion of the idea
to the real wiki page. Fixed two typos as well.

Fixes: X11Libre/misc#353
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-09-22 11:25:37 +02:00
stefan11111
4b54da3fc6 fbdevhw: handle 2 digit framebuffer devices in the fallback probe
According to linux's Documentation/admin-guide/devices.txt,
framebuffers are named /dev/fb[0-31].
As such, we have to handle 2 digit numbers in framebuffer devices.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-19 14:03:30 +02:00
stefan11111
698d8a631a fbdevhw: Only accept framebuffers that match the passed pci device in the pci probe
The pci probe was broken already, lots of pci devices were not detected as such.
Since fixing it properly required a bit of extra code complexity,
and those devices would be detected on the fallback probe, I didn't
bother fixing it untill now.

However, there is another problem created by this.
The pci probe was accepting the device passed by the user without
doing any checks on it.
This means that in multi-card setups, fbdevhw might claim the
wrong pci slot.
Fixing this requires fixing the pci probe in order to try and determine
whether the device passed by the user is the same as the pci device
passed to the pci probe.

This commit fixes the pci probe.
If no device is passed by the user, the probe finds a pci framebuffer device.
If a device is passed, the pci probe only return TRUE if the pci device
passed to it is the same as the device passed by the user.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-19 14:03:30 +02:00
stefan11111
c6d39ecc3f fbdevhw: Use a wrapper around open()
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-19 14:03:30 +02:00
Enrico Weigelt, metux IT consult
d1deec0008 xfree86: platform bus: move raw device list to internal header
These xf86_num_platform_devices and xf86_platform_devices fields aren't
_X_EXPORTED, so no drivers can use them - and none are trying so.

Thus move them to internal / non-sdk header.

Not an ABI change.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-19 14:02:30 +02:00
stefan11111
74102a1126 modesetting: Only paint as much of the cursor image as needed
We often use very large cursor sizes, compared to the sizes of the
curor glyphs, e.g. 64x64 cursors and 16x16 or smaller glyphs.

This patch makes is so that we only paint the size of the new
cursor glyph and clear the old one if needed, instead of painting
the entire cursor buffer, which is often far larger than the glyphs.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-19 14:02:03 +02:00
stefan11111
460c5b7d6c modesetting: fix edge cases in cursor size calculations
Split from https://github.com/X11Libre/xserver/pull/840

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-19 14:01:04 +02:00
Enrico Weigelt, metux IT consult
4edc5ceaf7 dix: dixutils: fix signedness of numHandlers and sizeHandlers
These are used as counters / sizes, and we're getting lots of warnings
on signedness mismatches. So use size_t instead of (signed) int here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-18 20:27:02 +02:00
Enrico Weigelt, metux IT consult
12b003a975 dix: dixutils: fix signedness of numCallbackListsToCleanup
It's a counter and size value - we're getting lots of signedness warnings,
so use size_t instead of (signed) int.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-18 20:26:49 +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
55140c469d dix: fix parameter types of SetClipRects()
Use the X11 protocol types where possible and fix signedness warnings.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-18 20:26:13 +02:00
b-aaz
679d1796c5 meson.build: Enable epoll-shim for DFBSD.
DragonFlyBSD also uses epoll-shim and it is necessary for DRI3.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-09-17 13:47:28 +02:00
Enrico Weigelt, metux IT consult
9e209798f1 Xext: panoramix: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-17 09:46:27 +02:00
Enrico Weigelt, metux IT consult
a040a93f59 Xi: inline SProcXChangeDeviceKeyMapping()
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-17 09:43:47 +02:00
Enrico Weigelt, metux IT consult
1bc760156f dix: dix_priv.h: cast size sequenceNumber value
The X11 protocol defines the sequenceNumber reply fields as `CARD16`, but the
Xserver is traditionally sloppy and using just `int`. Need to explicitly cast,
in order to silence compiler warnings.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-17 09:37:53 +02:00