Age | Commit message (Collapse) | Author |
|
|
|
init_plane tries to free a single plane on error, but this is an element
in a calloc'd array by the caller that we should not touch.
|
|
|
|
On startup, we fetch the previous MODE_ID blob ID so that
compositors can keep using the previous mode if they want to.
However, that blob doesn't belong to us, it belongs to the
previous DRM master. As a result, we get an error when trying to
destroy it.
Fix this by tracking whether the blob belongs to us or not.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3811
|
|
The Linux graphics section of 01.org is no more. Link to more
official docs instead.
|
|
|
|
An assert was added in [1] to avoid tracking the same output multiple
times. However, this is cumbersome for compositors [2]: they need to
add a special check for this. Additionally, this is inconsistent with
wlr_output_layout_add().
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4380
[2]: https://github.com/cage-kiosk/cage/pull/315
|
|
Stop trying to maintain a per-file _POSIX_C_SOURCE. Instead,
require POSIX.1-2008 globally. A lot of core source files depend
on that already.
Some care must be taken on a few select files where we need a bit
more than POSIX. Some files need XSI extensions (_XOPEN_SOURCE) and
some files need BSD extensions (_DEFAULT_SOURCE). In both cases,
these feature test macros imply _POSIX_C_SOURCE. Make sure to not
define both these macros and _POSIX_C_SOURCE explicitly to avoid
POSIX requirement conflicts (e.g. _POSIX_C_SOURCE says POSIX.1-2001
but _XOPEN_SOURCE says POSIX.1-2008).
Additionally, there is one special case in render/vulkan/vulkan.c.
That file needs major()/minor(), and these are system-specific.
On FreeBSD, _POSIX_C_SOURCE hides system-specific symbols so we need
to make sure it's not defined for this file. On Linux, we can
explicitly include <sys/sysmacros.h> and ensure that apart from
symbols defined there the file only uses POSIX toys.
|
|
snprintf() is actually ISO C99.
We still need POSIX for clock_gettime().
|
|
If all connectors and planes already have the right CRTC set, or
are disabled, we can skip the device-wide reset after a VT switch.
I've contemplated using a more fine-grained logic to only reset
the connectors, CRTCs and planes that need to be migrated. However,
writing a correct algorithm for this would be quite involved, and it
doesn't seem worth the trouble anyways.
Closes: https://github.com/swaywm/sway/issues/7956
|
|
|
|
We'll need to use a bunch of internal functions from that file in
the next commits.
|
|
Allows the KMS driver to parallelize the modesets, so should be
faster than going through each CRTC one by one.
|
|
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.
|
|
|
|
|
|
This extracts common string updating logic into a function and fixes a
possible NULL dereference.
|
|
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>
|
|
This implements the new ext-foreign-toplevel-list-v1 protocol [1].
Implemented analog to the zwlr-foreign-toplevel-management-v1 implementation.
The additional _ext_ in the names was added to avoid name collisions.
[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/187
Co-authored-by: Leon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>
|
|
|
|
|
|
Compositors now are expected to wait for an initial commit by checking
wlr_xdg_surface.initial_commit on every surface commit and send
(schedule) configure events manually.
|
|
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.
|
|
|
|
|
|
This is incorrectly leads to buffer reuploading.
|
|
|
|
Fixes: 4462f5dcb38b8b4ddc4c1eb888aa0d0c859a10a1
|
|
Fixes: 71fb55f3 ("render/pixel-format: Move has_alpha into it's own array")
|
|
Some opaque pixel formats (nv12, p010) require per-plane bytes_per_block
info. However, it doesn't make sense to store them in
wlr_pixel_format_info, as they will never be useful (currently, this
info is used for shm, which doesn't have a concept of multi-planar
buffers.)
Let's define a separate array and function for determining whether a
pixel format has alpha.
|
|
|
|
We already send a protocol error when the modifiers aren't the same
for all planes.
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/224
|
|
The protocol is no longer unstable.
|
|
|
|
This also fixes a memleak.
|
|
The seq based implementation is complex to reason about and doesn't even
work.
|
|
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3795
|
|
The kernel patches [1] have been merged.
[1]: https://patchwork.freedesktop.org/series/120103/
|
|
Once a shm buffer is uploaded there's no reason for wlr_scene_buffer
to keep it locked any further. Allow the compositor to re-use it.
|
|
|
|
|
|
|
|
|
|
We can grab the event loop from the wlr_session instead.
|
|
|