Age | Commit message (Collapse) | Author |
|
This function fetches property IDs. These don't change for the
lifetime of the connector. Instead of refreshing the property IDs
on hotplug (and leaving property IDs unset for disconnected
connectors), only fetch the property IDs when we create the
connector.
|
|
|
|
|
|
Centralizes the logic to destroy a DRM blob: check whether it's
zero, and print a nice error message.
|
|
No need for this, the backend can be grabbed from the connector.
|
|
|
|
|
|
We only need base POSIX here.
|
|
- Add POSIX 1993.09 compliance macro in source files that use
"struct timespec";
- Add POSIX 2001.12 compliance macro in source files that use
"struct sigaction" and the SA_SIGINFO macro, or the fchmod()
function;
- Add POSIX 2008.09 compliance macro in source files that use the
getline() function.
These compliance macros are enough for wlroots to compile with the
git-master version of uClibc-ng.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
|
|
Since we only use the backend capabilities here we can simply pass
them in directly. This allows other locations to create an allocator
even if they don't have a backend. They can simply specify the caps
they want instead.
|
|
|
|
The protocol is no longer unstable.
|
|
This also fixes a memleak.
|
|
The kernel patches [1] have been merged.
[1]: https://patchwork.freedesktop.org/series/120103/
|
|
|
|
|
|
We can grab the event loop from the wlr_session instead.
|
|
|
|
|
|
We can grab the event loop from the wlr_session instead.
|
|
|
|
Leave it up to the compositor to decide what to do when a backend
becomes unavailable.
|
|
This makes it easy for compositors to handle situations where the
DRM or libinput backend becomes unavailable. Compositors can listen
the destroy event of the multi backend returned by
wlr_backend_autocreate() and decide what to do.
|
|
We'll need this in the next commit.
|
|
Some users might want to destroy the multi backend when a child
backend is being destroyed. However, they can't destroy the multi
backend if it's already in the process of being destroyed.
The destroy signal was changed to be emitted after destroying child
backends in babdd6ccf757 ("backend: fix use-after-free when destroying
backends"). However, this was done to accomodate for an old
"output_remove" event on backends, which has long been dropped in
favor of wlr_output.events.destroy.
This patch follows the same principle as 5d639394f3e8
("types/output: emit destroy event before destroying global").
|
|
|
|
|
|
|
|
This makes wlroots build in C23 mode.
C23 is more strict and rejects implicit conversions from bool to a
pointer.
|
|
wlr_output.refresh is populated by core wlr_output, and thus will
be zero for a custom mode with an unset refresh rate.
Save the refresh rate from the drmModeModeInfo in wlr_drm_connector
instead.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3791
|
|
`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It
detected minor infelicity in `calloc()` API usage in `wlroots`:
../backend/libinput/tablet_pad.c: In function 'add_pad_group_from_libinput':
../backend/libinput/tablet_pad.c:36:38: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
36 | group->rings = calloc(sizeof(unsigned int), group->ring_count);
| ^~~~~~~~
../backend/libinput/tablet_pad.c:36:38: note: earlier argument should specify number of elements, later size of each element
|
|
It can be useful for compositors to get the real DRM FD instead of
the one from the parent compositor. For instance, some compositors
might want to perform some DRM IOCTLs there to check the driver
name, fetch some DRM resources, etc. This will also be a requirement
for direct scanout on secondary GPUs.
|
|
Allows compositors to figure out whether a DRM backend is
secondary on a multi-GPU setup.
|
|
|
|
This is unused.
|
|
This function touches queued_fb/current_fb, which the renderer has
nothing to do with.
|
|
|
|
RMFB implicitly performs a modeset to turn off any CRTC which is
using the FB. This prevents seamless transitions between two DRM
masters from working.
Use the new CLOSEFB IOCTL which doesn't turn off anything and leave
it up to the compositor to turn off outputs on shutdown if it wants
to.
|
|
Under X11, ConfigureNotify means that the window has already been resized.
Sending ConfigureRequest with the received size is not only useless, but also
can confuse the window manager, which will probably reply with the current
(i.e. *old*) size causing a configure loop.
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3769
|
|
|
|
Many files used to require wlr_matrix but no longer do.
|
|
We don't need the whole wl_display here anymore. The wl_event_loop
is enough.
|
|
wl_display holds a lot more than wlr_session needs: wlr_session
only needs to wait for a FD to become readable, but wl_display
provides full access to the Wayland client and protocol objects.
Switch to wl_event_loop to better reflect the above.
|
|
These aren't really tied to wlr_output.
|
|
drm_crtc_commit() already ensures that atomic-only flags are
disallowed.
|
|
Instead of having this condition checked in multiple places,
centralize it so that they don't go out-of-sync.
|
|
This chunk of code was moved by mistake.
Fixes: 3b53d1cbf199 ("backend/drm: introduce page-flip tracking struct")
|
|
When we destroy the backend, page flips will no longer be invoked meaning
those won't clean up the page flips for us.
|
|
|
|
Introduce a per-page-flip tracking struct passed to the kernel
when we request a page-flip event for an atomic commit. The kernel
will pass us back this pointer when delivering the event.
This eliminates any risk of mixing up events together. In particular,
if two events are pending, or if the CRTC of a connector is swapped,
we no longer blow up in the page-flip event handler.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3753
|