Skip to content

Conversation

@notbabaisyou
Copy link
Collaborator

Imports the cursor fixes that came up, and applies a whole bunch of additional minor changes.

Merging blocked until I've tested this on AMD and NVIDIA.

@notbabaisyou notbabaisyou self-assigned this Dec 30, 2025
notbabaisyou and others added 9 commits December 30, 2025 16:20
Will be used by upcoming commits.
This switches up the for-loop into a switch statement, making it easier to handle different types of planes, not just primary ones.
modesetting has a sort of broken concept of getting the cursor dimensions since 1f41320, 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 falling back to getting the maximum 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.
Prevents possible memory allocation failure explosions.
Breaking CloseScreen() chain may cause resources leak.
The early dirtyfb check would use front bo's fb_id.
Direct leak of 1040 byte(s) in 1 object(s) allocated from:
    0x769755818bf0 in calloc /usr/src/debug/gcc/gcc/libsanitizer/lsan/lsan_interceptors.cpp:91
    0x635b83ec11c4 in cache_formats_and_modifiers ../spaghetti/dri3/dri3_screen.c:186
    0x635b83ec11c4 in dri3_get_supported_modifiers ../spaghetti/dri3/dri3_screen.c:233
    0x635b83ec0512 in proc_dri3_get_supported_modifiers ../spaghetti/dri3/dri3_request.c:395
notbabaisyou and others added 11 commits December 30, 2025 16:30
When compiling with gcc 15.2.0 using -O3 -m64 on Solaris SPARC & x64,
we'd get a test failure of:

Assertion failed: strcmp(logmsg, expected) == 0,
 file ../test/signal-logging.c, line 339, function logging_format

because 'num *= 1' produced a value that was out of the range of the
int64_t it was being stored in.  (Compiling with -O2 worked fine with
the same compiler/configuration/platform though.)
After moving CloseScreen() before dixFreeScreenSpecificPrivates(),
we need to make sure private keys available after CloseScreen().
We _shouldn't_ be reallocating the property count as this would leak memory, use BUG_WARN to log if such a scenario occurs.
We should also be doing this with a software cursor.
When reporting damage, the misprite swcursor will try to remove cursor
by restoring the under cursor area.

This will override the previous draw, so we need to move it before
the rendering.
This should be more useful for debugging.
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].

v2: Use a allowlist array for matching supported kernel devices. - notbabaisyou

Co-authored-by: notbabaisyou <though-went-some-simple@proton.me>
I want to squeeze in a new value called `universal_planes`, for this I want to reduce the padding in the struct. Also removes unused SaveGeneration variable.
This should fix up DRM leasing on modesetting, we also now only set DRM_CLIENT_CAP_UNIVERSAL_PLANES once instead of multiple times per-CRTC and during TearFree setup.
Watkurem and others added 4 commits December 30, 2025 16:31
When a group indicator is defined, e.g.:
  indicator "Scroll Lock" { groups = Group2; }
the logical and physical indicator state may desync if the keyboard
exposes multiple HID interfaces.

This is caused by XkbPushLockedStateToSlaves only pushing locked_mods to
the slave devices. Pushing locked_group along with locked_mods resolves
the issue.

The issue is not observed with API calls because a different code path
is taken (avoiding XkbPushLockedStateToSlaves altogether).
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
@notbabaisyou notbabaisyou force-pushed the cursor-probe branch 3 times, most recently from 1904cfe to 19bc1ad Compare December 30, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants