Commit graph

19196 commits

Author SHA1 Message Date
Arthur Williams
3cf58e0d7c Merge branch 'segfault_when_removing_masters' into 'main'
Xi: Fix segfault when removing slave

See merge request xorg/xserver!876
2026-03-26 08:09:41 +00:00
Jeremy Huddleston Sequoia
fbff1312ce xquartz: Bump copyrights in Info.plist to 2026
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2026-03-25 23:47:00 -07:00
Jeremy Huddleston Sequoia
d2e83a266c rootless: Protect alpha channel for Render operations
The Render extension operates on PictFormats rather than GC, so it
bypasses the rootless layer's GC-based alpha protection
(ROOTLESS_PROTECT_ALPHA).  Depth-24 windows use PICT_x8r8g8b8 where
the 'x' tells pixman the high byte is padding it may freely zero.
The macOS compositor needs this byte to be 0xFF (opaque).

Before each Render operation that targets a rootless window,
temporarily upgrade the destination Picture's format from
PICT_x8r8g8b8 to PICT_a8r8g8b8.  This tells pixman that the alpha
channel is significant and must not be optimized away.  The format
is restored after the operation completes.

This parallels how ROOTLESS_PROTECT_ALPHA handles GC operations (by
masking alpha out of the planemask) and how ROOTLESS_SAFEALPHA
handles PaintWindow (by forcing alpha in solid fills).  The
save/restore approach is analogous to rootlessGC.c's GC_SAVE /
GC_RESTORE pattern.

Fixes [2/2]: https://github.com/XQuartz/XQuartz/issues/31

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2026-03-24 20:22:58 -07:00
Jeremy Huddleston Sequoia
40b762cf6d rootless: Add Trapezoids, Triangles, and CompositeRects wrapping
The Render extension's Trapezoids and Triangles operations
(fbTrapezoids, fbTriangles) render directly via pixman through
fbShapes without going through ps->Composite, so RootlessComposite
never fires for these operations.  This means RootlessStartDrawing
is not called and the macOS compositor is not notified of changed
pixels.

Add RootlessTrapezoids and RootlessTriangles wrappers following the
same pattern as RootlessComposite: call RootlessStartDrawing before
the operation, then compute the bounding box via miTrapezoidBounds or
miTriangleBounds and call RootlessDamageBox after.  The default
miTriStrip and miTriFan implementations decompose their input into
triangles and dispatch through ps->Triangles, so the RootlessTriangles
wrapper covers TriStrip and TriFan as well.

Also add a RootlessCompositeRects wrapper as defense-in-depth.  The
current miCompositeRects implementation already has partial rootless
coverage: PictOpSrc/PictOpClear go through the GC layer, and other
ops route through CompositePicture -> RootlessComposite.  Wrapping at
the PictureScreen level ensures robustness regardless of the underlying
implementation.

Fixes [1/2]: https://github.com/XQuartz/XQuartz/issues/31

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2026-03-24 20:22:58 -07:00
Jeremy Huddleston Sequoia
e8936920ee rootless: Fix Glyphs damage bounding box to correctly compute union
RootlessGlyphs used max() for box.x1 and box.y1 when accumulating the
bounding box across glyphs in a list.  Computing the union of bounding
boxes requires min() for the lower coordinate corner and max for the
higher coordinate corner.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2026-03-24 20:09:37 -07:00
Olivier Fourdan
0e580872b0 xwayland: Use viewport scale for warping coordinates
When Xwayland is used rootful with hidpi, a viewport is in effect and a
scale applied.

This is however "transparent" to the Xserver which uses unscaled
coordinates, so to set the fake cursor position with a viewport and a
scale applied, we need to factor the scale to the coordinates before
passing the coordinate to the Wayland compositor through the method
zwp_locked_pointer_v1_set_cursor_position_hint().

Failing to do that will introduce a shift when warping the cursor
position.

v2: Use an xwl_window instead of an xwl_seat to improve readability
(Michel)

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1875
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2145>
2026-03-23 08:19:50 +00:00
Alan Coopersmith
210372ea09 CI: Update debian image from bullseye (11) to bookworm (12)
Drop local build of libxcvt now that bookworm has a package for it

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2141>
2026-03-16 19:12:05 -07:00
Alan Coopersmith
7f8570bfa1 os: include <assert.h> in ospoll.c
Fixes build failure in mingw-cross-build:

../os/ospoll.c: In function ‘ospoll_destroy’:
../os/ospoll.c:266:9: error: implicit declaration of function ‘assert’
 [-Werror=implicit-function-declaration]
  266 |         assert (ospoll->num == 0);
      |         ^~~~~~
../os/ospoll.c:59:1: note: ‘assert’ is defined in header ‘<assert.h>’;
 did you forget to ‘#include <assert.h>’?
   58 | #include "xserver_poll.h"
  +++ |+#include <assert.h>
   59 | #define POLL            1
../os/ospoll.c:266:9: warning: nested extern declaration of ‘assert’
 [-Wnested-externs]
  266 |         assert (ospoll->num == 0);
      |         ^~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2141>
2026-03-14 17:07:55 -07:00
Alan Coopersmith
16ea45e931 os: use winsock2.h definitions on mingw in xserver_poll.h
Avoids build warnings & failures, such as:

../os/xserver_poll.h:40: warning: "POLLNVAL" redefined
   40 | #define POLLNVAL        0x20
      |
/usr/share/mingw-w64/include/winsock2.h:1190: note: this is the location
 of the previous definition
 1190 | #define POLLNVAL   0x0004
      |
../os/xserver_poll.h:42:8: error: redefinition of ‘struct pollfd’
   42 | struct pollfd
      |        ^~~~~~
/usr/share/mingw-w64/include/winsock2.h:1192:16: note: originally defined here
 1192 | typedef struct pollfd {
      |                ^~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2141>
2026-03-14 17:00:26 -07:00
Alan Coopersmith
2cad349818 CI: update to libX11 1.8.2 & drop -fcommon workaround in cross-prereqs-build
xorg/lib/libx11@487e9489d1e086cc62c53045206ab6d6d9d02031
fixed the libX11 build to work with -fno-common (the new gcc default)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2141>
2026-03-14 16:39:50 -07:00
Alan Coopersmith
8b9ce15294 CI: update URLs for freetype and font/util in cross-prereqs-build.sh
Clone freetype from its new home on freedesktop.org instead of its
old home on the GNU savannah

Remove extra / from font/util URL path

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2141>
2026-03-14 16:28:07 -07:00
Diego Viola
7e7d1f027f treewide: fix typos
Signed-off-by: Diego Viola <diego.viola@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2138>
2026-03-14 16:52:19 +00:00
Alan Coopersmith
94acecdeaf ephyr: show that -name & -title take non-optional arguments in usage output
Fixes: f028e245a ("Bug #10016: Implement WM_CLASS hints in Xephyr.")
Fixes: e3c65cf1d ("xephyr: Add -title option.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2137>
2026-03-09 18:35:44 -07:00
Alan Coopersmith
0df19c5001 ephyr: add -name to Xephyr man page
Fixes: f028e245a ("Bug #10016: Implement WM_CLASS hints in Xephyr.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2137>
2026-03-09 18:35:33 -07:00
Alan Coopersmith
45607067cf ephyr: add -title to Xephyr man page
Fixes: e3c65cf1d ("xephyr: Add -title option.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2137>
2026-03-09 18:35:20 -07:00
Alan Coopersmith
f8355b8821 os: fix sha1 build error with Nettle 4.0
Nettle 2.6 (released in 2013) split the sha.h header into sha1.h & sha2.h,
but left the sha.h header for compatibility until the recent Nettle 4.0
release finally removed it.

Nettle 4.0 also dropped the length argument from the sha1_digest function.

Closes: #1871
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2133>
2026-03-07 18:51:19 +00:00
Diego Viola
67c82078fe Restore correct spelling of "Avance Logic"
Fixes: e8f452231 ("Fix typos")
Signed-off-by: Diego Viola <diego.viola@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2136>
2026-03-03 09:13:24 -08:00
Michel Dänzer
c76d495612 Revert "xwayland: Call register_damage depending on ensure_surface_for_window"
There've been reports downstream of Xwayland segfaulting in the function
xwl_present_execute() because xwl_window_get_damage_region() returned an
invalid pointer:

 #10 RegionUninit at ../include/regionstr.h:165
 #11 RegionEmpty at ../include/regionstr.h:194
 #12 xwl_present_execute at ../hw/xwayland/xwayland-present.c:1138
 #13 xwl_present_pixmap at ../hw/xwayland/xwayland-present.c:1274
 #14 present_pixmap at ../present/present.c:249
 #15 proc_present_pixmap_common at ../present/present_request.c:166
 #16 proc_present_pixmap at ../present/present_request.c:186
 #17 Dispatch at ../dix/dispatch.c:550
 #18 dix_main at ../dix/main.c:277

The most likely reason for this is that window_get_damage() returned
NULL, which might happen if xwl_window_update_surface_window() didn't
call register_damage().

To avoid that issue, move the call to register_damage() back to
xwl_realize_window before calling ensure_surface_for_window().

This reverts commit 07f6032627.

See-also: https://bugzilla.redhat.com/2329815
See-also: https://bugzilla.redhat.com/2428249
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1862
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2135>
2026-03-03 14:05:15 +01:00
Michel Dänzer
0472d7389e xwayland: Use WindowPtr for damage closure again
This reverts commit d3448f7aad.

Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2135>
2026-03-03 14:02:49 +01:00
Michel Dänzer
ceb313f277 xwayland: Update surface window from xwl_unrealize_window
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2135>
2026-03-03 14:02:49 +01:00
Diego Viola
e8f4522312 Fix typos
Signed-off-by: Diego Viola <diego.viola@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2134>
2026-03-03 06:50:01 -03:00
Thomas Zimmermann
c12cf4f585 xf86: Accept devices with the kernel's corebootdrm driver
Add a workaround to accept devices of the kernel's corebootdrm
driver. Makes Xorg work on pre-configured displays with coreboot
and the DRM graphics stack. Review of the corebootdrm driver
happens at [1].

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/series/159820/ # [1]
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2132>
2026-02-28 02:09:35 +00:00
Alan Coopersmith
2e338890ee os: add a generic -verbose option instead of making each server add its own
Replaces Xwayland's server-specific implementation, but leaves Xorg's
since it sets global variables in the xfree86 ddx layer.  Also leaves
Xephyr's differently-spelled "-verbosity" for backwards compatibility.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2131>
2026-02-28 02:03:10 +00:00
Alan Coopersmith
12791f5027 xfree86: issue error if too many clocks entries are listed in config
Changes message issued for too many clocks from the confusing:
    "29.0" is not a valid keyword in this section.
to the more obvious:
    More than 128 Clocks defined.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2130>
2026-02-22 13:23:45 -08:00
Mario Limonciello (AMD)
2c7d03c082 Disable pciaccess for mingw
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2038>
2026-02-22 07:36:50 -06:00
Mario Limonciello
4ba1df3ce6 Add compatibility define for pci_device_is_boot_display()
It will take some time for a new libpciaccess to be released and
even then bumping the dependency for libpciaccess isn't attractive.
If an older libpciaccess is used just add a static inline define.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2038>
2026-02-22 07:36:50 -06:00
Mario Limonciello
41c58693c3 Add check for pci_device_linux_sysfs_boot_display()
In the case of multiple display devices that are not VGA devices
the 'boot_display' attribute read by libpciaccess can disambiguate.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2038>
2026-02-22 07:36:45 -06:00
Julian Orth
aaa8d5a955 xwayland: don't allow clients to modify the keymap
Xwayland has no way to affect the keymap of the compositor. If clients
modify the keymap, it will stay out of sync with the compositor until
some unspecified time in the future when the compositor sends the keymap
again, which might be never, requiring Xwayland to be restarted.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1953>
2026-02-19 13:52:28 +01:00
Alan Coopersmith
88c5aea5d3 gitlab CI: add main branch to exception list for check-commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2129>
2026-02-17 14:57:07 -08:00
Jon Turney
9c35efe978 hw/xwin: Allow DefWindowProc to SetFocus() as needed after WM_ACTIVE
Don't indicate we've processed WM_ACTIVATE, so DefWindowProc can do
not-clearly specified default things with the focus.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/736>
2026-02-15 18:58:01 +00:00
Jon Turney
64d7a6b4a0 hw/xwin: More adjustments to multiwindow mode focus handling
The previous change is not enough, as WM_KILLFOCUS can apparently be
sent to the window losing focus after WM_ACTIVATE has been sent to
the window gaining focus.

Try using WM_SETFOCUS instead, as that has the correct ordering and seems
more logical.

The test "!pWin || !pWin->overrideRedirect" is confusingly written: It's
true if:

(a) pWin is NULL (= X window doesn't exist, shouldn't happen), or
(b) pWin->overrideRedirect is FALSE

i.e. the intended effect is "don't give focus to override redirect windows"

There seem to be some cases where this still isn't quite correct: A
reproduction isn't known, but it seems to be related to minimizing a
maximized Windows window, and having window activation move to a
maximized X window beneath it.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/736>
2026-02-15 18:58:01 +00:00
Jon Turney
d7d2dd8286 hw/xwin: Always set the X input focus to none when an X window loses focus
In the multiwindow WM, we need to cancel the X input focus if the
Windows input focus has gone to the desktop, or another application's
window.

We could maybe avoid some unneeded work by not doing this if the
WM_KILLFOCUS wParam is another window owned by us, which is immediately
going to be given the X input focus.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/736>
2026-02-15 18:58:00 +00:00
Jon Turney
1afb9c6a7c hw/xwin: Use revert-to-parent X focus mode in multiwindow WM
Use revert-to-parent X focus mode, as recommended in ICCCM 4.1.7

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/736>
2026-02-15 18:58:00 +00:00
Christian Göttsche
db7b149b0c selinux: only generate audit events for avc and error messages
Only generate audit events for messages of the type avc (permission
denied) and error (e.g. invalid context).
For example avoid USER_SELINUX_ERR for policy load events:
    audit[980]: USER_SELINUX_ERR pid=980 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xorg_t:s0 msg='avc:  op=load_policy lsm=selinux seqno=8 res=1 exe="/usr/lib/xorg/Xorg" sauid=0 hostname=? addr=? terminal=?'

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/801>
2026-02-15 10:43:28 -08:00
Christian Göttsche
f0103cf051 selinux: remap security classes on policyload
Re-map the SELinux security classes on policy loads, as the mapping will
be desynchronized (see man:selinux_set_mapping(3)) and audit messages
will not show the actual class and permission names:

    USER_AVC pid=24283 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xorg_t:s0 msg='avc:  denied  { 0x10 } for request=XFIXES:SelectSelectionInput comm=/usr/bin/python3 resid=6400001 restype=WINDOW scontext=xuser_u:xuser_r:systemd_user_instance_generic_bin_t:s0 tcontext=xuser_u:object_r:xorg_t:s0 tclass=(null) permissive=1

In addition use type-safe assignments.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/801>
2026-02-15 10:43:28 -08:00
Benjamin Valentin
907c501926 xf86: check return value of XF86_CRTC_CONFIG_PTR in xf86CompatOutput()
If privates[xf86CrtcConfigPrivateIndex].ptr is NULL, this will cause
a segfault.

Possible fix for !1241

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/835>
2026-02-15 18:34:26 +00:00
Edênis Freindorfer Azevedo
444822f7c1 Support XDG Base Dir Spec 0.8.
This version of the spec (latest as of 27.12.2021) adds a variable
`$XDG_STATE_HOME` that may be used for log files, as described:

```
...
$XDG_STATE_HOME defines the base directory relative to which user-specific
state files should be stored. If $XDG_STATE_HOME is either not set or
empty, a default equal to $HOME/.local/state should be used.

The $XDG_STATE_HOME contains state data that should persist between
(application) restarts, but that is not important or portable enough to
the user that it should be stored in $XDG_DATA_HOME. It may contain:

actions history (logs, history, recently used files, …)
...
```

- https://specifications.freedesktop.org/basedir/0.8/

Signed-off-by: Edênis Freindorfer Azevedo <edenisfa@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/836>
2026-02-15 10:15:19 -08:00
Konstantin
78c557d974 xv: change FOURCC_RGBA32 to AMD one
Initally we used value of DRM_FORMAT_ARGB8888, but it seems than
xf86-video-ati has established other value for years. So, change it to
well established one.

Because we define a different values, this breaks compilation of xf86-video-ati.
I am unsure, who is right in this situation, but I guess better to use
an established value, to make AMD xorg driver compile.

I do not aware about any of the side effects of this change.

Fixes: 15412e78c8 - glamor: xv: add rgba32 format
Signed-off-by: Konstantin <ria.freelander@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1321>
2026-02-15 01:39:55 +00:00
Dongwon Kim
2114016ea0 modesetting: Empty damage once dispatch is done
This commit is to fix some regression caused by

commit 995e60a919

where DamageEmpty on damage was missing in several
places.

Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1486>
2026-02-15 01:28:48 +00:00
Patrick Lerda
5582e45d94 modesetting: find the first compatible dri device as default
This change replaces the default "/dev/dri/card0" by a loop which
searches for the first compatible device.

This change avoids the error below which happens on some ARM boards:
(EE) No devices detected.
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1496>
2026-02-14 17:19:52 -08:00
hongao
1443fd34ea randr: clear primary screen's primaryOutput when the output is deleted
This fix use after free when a pluggable gpu screen (such as displaylink)
was set as primary screen and unpluged.

gdb backtrace:
 #0 OssigHandler (signo=11, sip=0x7fff2e0a50f0, unused=0x7fff2e0a4fc0) at ../../../../os/osinit.c:138
 #1 <signal handler called>
 #2 rrGetscreenResources (client=0x3195160, query=0) at ../../../../randr/rrscreen.c:577
 #3 0x0000000000562bae in ProcRRGetscreenResourcesCurrent (client=0x3195160) at ../../../../randr/rrscreen.c:652
 #4 OxOOOOB0000054de63 in ProcRRDispatch (client=0x3195160) at ../../../../randr/randr.c:717
 #5 0x00000000004322c6 in Dispatch () at ../../../../dix/dispatch.c:485
 #6 0x0900900990443139 in dix_main (argc=12, argv=0x7fff2e0a5f78, envp=0x7fff2e0a5fe0) at ../../../../dix/main.c:276
 #7 0X0000000000421d9a in main (argc=12, argv=0x7fff2e0a5f78, envp=0x7fff2e0a5fe0) at ../../../../dix/stubmain.c:34

Signed-off-by: hongao <hongao@uniontech.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1553>
2026-02-14 17:03:30 -08:00
Sultan Alsawaf
4689e5744e modesetting: Don't recursively force present to unflip
Present calls drmmode_set_mode_major() as part of ms_present_unflip(),
which leads to a crash due to the recursive attempt to force present to
unflip when it already is.

Fix it by simply skipping the forced present unflip when present itself is
unflipping. This also speeds up drmmmode_prepare_modeset() when present
isn't even flipping to begin with.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1791
Fixes: 899c87af1 ("modesetting: unflip before any setcrtc() calls")
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1793>
2026-02-14 16:04:01 -08:00
matt335672
75b7f87dd9 Add docs for some internal methods
Doxygen headers added for XkbGetCoreMap() and XkbSetRepeatKeys()

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1851>
2026-02-14 23:52:50 +00:00
Povilas Kanapickas
5fa59f2333 Revert "glamor: explicitly draw endpoints of line segments"
This reverts commit 530e80375e.

The commit breaks xts5/Xlib9/XDrawLines/XDrawLines test as per
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1801#note_2812218

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1858>
2026-02-14 23:44:16 +00:00
Thomas Zimmermann
34a53a5746 xf86: Accept devices with the kernel's vesadrm driver
Add a workaround to accept devices of the kernel's vesadrm driver.
Makes Xorg work on pre-configured displays with VESA and the DRM
graphics stack. Review of the vesadrm driver happens at [1].

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/series/146477/ # 1
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1879>
2026-02-14 23:39:34 +00:00
Thomas Zimmermann
b6b7218aed xf86: Accept devices with the kernel's efidrm driver
Add a workaround to accept devices of the kernel's efidrm driver.
Makes Xorg work on pre-configured displays with UEFI and the DRM
graphics stack. Review of the efidrm driver happens at [1].

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/series/146477/ # 1
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1879>
2026-02-14 23:39:34 +00:00
Timo Aaltonen
e45516afa6 xf86pciBus.c: use Intel ddx only for pre-gen3 hardware
Use intel ddx only on pre-gen4 hw, newer ones will fall back to modesetting.

Instead of defaulting to the Intel driver for all Intel hardware, only
default it for older hardware for which it has shown to be better for.

Note that Debian/Fedora and their derivatives, as well as the yocto project
have been carrying this patch for many years:
192254841a
ee515e44b0

so this simply aligns xserver upstream with Linux distributions.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Co-authored-by: Balló György <ballogyor@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1887>
2026-02-14 23:33:49 +00:00
Icenowy Zheng
4165516ac4 randr: do full transform when checking SetScreenSize size
When validating the size passed to SetScreenSize, the CRTC mode size
needs to be applied the full CRTC transform, otherwise the check may
bogusly fail.

Do a full transform on the CRTC mode size when checking the
SetScreenSize request size instead of the current code that only
manually handles rotation.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1971>
2026-02-14 15:20:23 -08:00
Icenowy Zheng
febc30a75b modesetting: properly use fb_id of front_bo for reverse PRIME CRTC
When doing reverse PRIME, the buffer being scaned out is still the front
BO.

Properly reuse its fb_id, to prevent adding a FB for the front_bo each
time the fb_id is requested.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2064>
2026-02-14 14:28:20 -08:00
Pierre Le Marre
c49cbc176a xkb: Fix serialization of key type without level names
Before this commit the count of key type level names was wrongly set
in `XkbGetNames`: for key type without names, it was set to the level
count, while it should be 0:
- `XkbComputeGetNamesReplySize()` does not account key type without
  level names;
- `XkbSendNames()` does not write any level entry for key types without
  level names.

This causes a mismatch offset while parsing the response and its
processing would ultimately fail.

Fixed by setting the correct level name count: 0 if there is no level
name, else the number of levels.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2082>
2026-02-14 13:06:31 -08:00