aboutsummaryrefslogtreecommitdiff
path: root/backend
AgeCommit message (Collapse)Author
2023-06-30backend/drm: use panel_orientation if it is setClayton Craft
This fixes an issue where the panel_orientation parameter was set but wlroots was ignoring it and returning OUTPUT_TRANSFORM_NORMAL. Fixes 2e12de96
2023-06-30backend/drm: handle output layer damageSimon Ser
2023-06-30backend/wayland: handle output layer damageSimon Ser
2023-06-27backend/headless: leave new outputs disabled by defaultSimon Ser
2023-06-27backend/x11: leave new outputs disabled by defaultSimon Ser
2023-06-27backend/wayland: mark new outputs as disabledSimon Ser
Leave it up to the compositor to enable new outputs (just like the DRM backend does).
2023-06-27backend/headless: add support for disabled outputsSimon Ser
We have nothing to do when a headless output is enabled/disabled.
2023-06-27backend/headless: only schedule a new frame if buffer was submittedSimon Ser
A no-op commit should not schedule a new frame. This aligns the headless backend with the rest of the backends. This will be important to handle the enabled → disabled transition.
2023-06-27backend/x11: unmap when output is disabledSimon Ser
2023-06-27backend/wayland: unmap when output is disabledSimon Ser
2023-06-27output: Set output mode during main commitAlexander Orzechowski
Removes duplication across all the backends to finally apply the mode to the output.
2023-06-27backend/wayland: Reject non 0 refresh rate mode setsAlexander Orzechowski
2023-06-27backend/x11: Reject non 0 refresh rate mode setsAlexander Orzechowski
2023-06-27backend/drm: Don't add pollute fixed modes list with custom modesAlexander Orzechowski
Nobody remembers why this is done and it isn't that great if people use a lot of custom modes.
2023-06-26backend/drm: remove duplicate needs_frame() in set_cursor()Simon Ser
wlr_output_update_needs_frame() is called unconditionally at the end of the function already.
2023-06-23output: add wlr_output_state_init()Simon Ser
This changes the semantics of wlr_output_state. Instead of having fields with uninitialized memory when missing from the committed bitflag, all fields are always initialized (and maybe NULL/empty), just like we do in wlr_surface_state. This reduces the chances of footguns when reading a field, and removes the need to check for the committed bitfield everywhere. A new wlr_output_state_init() function takes care of initializing the Pixman region.
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-21backend/drm: Fix typoAlexander Orzechowski
2023-06-19backend/drm: Use texture blend_mode for multigpu blitAlexander Orzechowski
2023-06-14backend/libinput: use struct initializers for eventsSimon Ser
This is more readable and consistent with the rest of wlroots.
2023-06-14backend/libinput: ignore multiple events for same pointer buttonSimon Ser
If the same button is pressed on two devices on the same seat, ignore the second event. This is also what Mutter does. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3665
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-06-05add render timer APIRose Hudson
Based on five calls: wlr_render_timer_create - creates a timer which can be reused across frames on the same renderer wlr_renderer_begin_buffer_pass - now takes a timer so that backends can record when the rendering starts and finishes wlr_render_timer_get_time - should be called as late as possible so that queries can make their way back from the GPU wlr_render_timer_destroy - self-explanatory The timer is exposed as an opaque `struct wlr_render_timer` so that backends can store whatever they want in there.
2023-06-05backend/wayland: add support for cropping output layersSimon Ser
2023-06-05backend/wayland: add scaling support for output layersSimon Ser
Use the viewporter protocol to scale output layers.
2023-05-31backend/drm: introduce wlr_drm_mode_get_info()Simon Ser
This allows compositors to get back the raw drmModeModeInfo and look at DRM-specific fields and flags.
2023-05-30backend/drm: use new rendering APISimon Ser
2023-05-17drm_plane_pick_render_format: return false if no format could be foundAustin Shafer
Commit 90d08f8f1c40e2a302d62052435ff2abdb08a854 changed the way wlr_drm_format_intersect worked, including passing in a destination format list. This breaks scenarios where the intersection doesn't find any matching formats, since we still have a valid destination format set. This changes it to only return true if more than one matching format is present in the intersection list.
2023-05-15backend_destroy: Similiar logic like DRM backendTobias Predel
In the logic of the DRM backend in backend_destroy, wlr_backend_finish is called first, then the outputs are destroyed and then the display->destroy.link is removed from the list. This commit applies the same order to the headless backend.
2023-05-11wlr_drm_format_set: Store formats on arrayAlexander Orzechowski
2023-05-11wlr_drm_format: Rework wlr_drm_format_intersectAlexander Orzechowski
Now it takes a reference to a destination format
2023-05-11wlr_drm_format: Introduce drm_format_finishAlexander Orzechowski
2023-05-08backend/drm: fix di_info memory leakzhoulei
2022-05-01backend/x11: prevent segfault on empty DRI3 responseptrcnull
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-03-28backend/wayland: only unmap layers when necessarySimon Ser
2023-03-28backend/wayland: only update layer position when necessarySimon Ser
2023-03-28backend/wayland: only re-order sub-surfaces when necessarySimon Ser
2023-03-24backend/wayland: support touch cancel eventsRose Hudson
since wayland doesn't provide a touch id in cancel events, track what points are active so we can cancel all of them timestamp is also not provided - use 0 because no one's paying attention to that anyway Closes #3000
2023-03-20backend/drm: log drm_connector_alloc_crtc() failuresSimon Ser
Helps figuring out why e.g. get_primary_formats fails.
2023-03-10output-layer: require all layers in wlr_output_state.layersSimon Ser
- Simplifies the backends - Avoids having two ways to do the same thing: previously one could disable a layer by either omitting it from wlr_output_state.layers, or by passing a NULL buffer - We can change our mind in the future: we can allow users to omit some layers and define a meaning without breaking the API. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4017#note_1783997
2023-03-01backend/wayland: fix leak of some globalsSimon Ser
Fix a few globals which weren't properly cleaned up. Discovered in [1]. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3604
2023-02-28backend/wayland: destroy zwp_linux_buffer_params_v1 objectsSimon Ser
Don't leak these.
2023-02-28backend/drm: use libdisplay-info for CVT mode generationSimon Ser
2023-02-28backend/drm: use libdisplay-info to parse EDIDSimon Ser
2023-02-27backend: move #ifdefs to nested functionsSimon Ser
Instead of littering #ifdefs everywhere, move them to the dedicated attempt_XXX_backend() functions. This makes the logic in wlr_backend_autocreate() more readable, and provides better error messages when the X11/Wayland backends are disabled at compile-time, or when WLR_BACKENDS contains a backend disabled at compile-time.
2023-02-27backend: make wlr_backend_autocreate() fail when DRM is missingSimon Ser
When we change the required dependencies for the DRM backend, Meson might auto-disable the backend for users missing the new requirements. This results in confused users [1] because they don't notice the "drm-backend: NO" line burried in the Meson logs, and then get a black screen when starting the compositor. Update wlr_backend_autocreate() to refuse to create a backend with only libinput (without DRM). Users really wanting to start their compositor with a libinput backend and without a DRM backend can manually set WLR_BACKENDS. [1]: https://github.com/swaywm/sway/issues/7457
2023-02-21render/swapchain: make publicSimon Ser
We've had this struct for a while. It'd be useful for compositors if they want to manage the swap chains themselves instead of being forced to use wlr_output's. Some compositors might also want to use a swapchain without an output.
2023-02-21backend: disable DRM backend monitor when WLR_DRM_DEVICES is usedSimon Ser
WLR_DRM_DEVICES specifies a static list of DRM devices to open at startup. Do not create DRM backends for hotplugged DRM devices when it's set. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3595