aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/libliftoff.c
AgeCommit message (Collapse)Author
2024-02-21backend/drm: don't destroy previous DRM master blobsSimon Ser
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
2024-02-15Define _POSIX_C_SOURCE globallySimon Ser
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.
2024-02-14backend/drm: atomically reset state after VT switchSimon Ser
Allows the KMS driver to parallelize the modesets, so should be faster than going through each CRTC one by one.
2024-02-14backend/drm: drop wlr_drm_backend arg from create_mode_blob()Simon Ser
No need for this, the backend can be grabbed from the connector.
2024-02-14backend/drm: fix fb_damage_clips_arr memory leakSimon Ser
2023-11-30backend/drm: split wlr_drm_fb related functions into separate fileSimon Ser
2023-11-19backend/drm: add wlr_drm_connector_state.nonblockSimon Ser
Instead of having this condition checked in multiple places, centralize it so that they don't go out-of-sync.
2023-11-17backend/drm: introduce page-flip tracking structSimon Ser
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
2023-06-30backend/drm: handle output layer damageSimon Ser
2023-06-22backend/drm: fix libliftoff_plane double-freeSimon Ser
Destroying the liftoff_device invalidates all of the liftoff_planes. Destroy the liftoff_planes before the liftoff_device to fix this.
2023-06-12backend/drm: clip FB damageSimon Ser
The kernel complains when the damage exceeds the FB bounds: [73850.448326] i915 0000:00:02.0: [drm:drm_atomic_check_only] [PLANE:31:plane 1A] invalid damage clip 0 0 2147483647 2147483647 Make the DRM backend behave like the Wayland one and allow compositors to damage (0, 0, INT32_MAX, INT32_MAX) to repaint everything without needing to know the exact buffer size. Closes: https://github.com/swaywm/sway/issues/7632
2023-05-11wlr_drm_format_set: Store formats on arrayAlexander Orzechowski
2023-04-20output-layer: add cropping supportSimon Ser
Add a src_box state field. Use the SRC_* KMS props in the DRM backend, reject the layers in the Wayland backend (for now, we can support it later via viewporter).
2023-04-04output-layer: add support for scaling buffersSimon Ser
This allows callers to set a destination size different from the buffer size to scale them. The DRM backend supports this. The Wayland backend doesn't yet (we'd need to wire up viewporter).
2023-02-21backend/drm: drop wlr_drm_layer.pending_{width,height}Simon Ser
No need to store this info in struct wlr_drm_layer. We can just extract the size when we need it.
2023-02-21backend/drm: drop unnecessary pixman_region32_t castsSimon Ser
The Pixman API now accepts const parameters.
2023-02-20backend/drm: send output layer feedback eventsSimon Ser
2023-02-20backend/drm: add support for output layersSimon Ser
2023-02-20backend/drm: add libliftoff composition layerSimon Ser
This will be useful for implementing the output layers API.
2023-02-20backend/drm: add libliftoff interfaceSimon Ser