aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-24tinywl: fix extra whitespaceSimon Ser
2023-01-21wlr_scene: Send intersecting list of scene outputs for outputs_update signalAlexander Orzechowski
2023-01-21output-layout: improve closest point for no outputs caseKirill Primak
Without outputs, all points are equally invalid anyway, but for e.g. cursor warping it makes more sense to preserve the original position.
2023-01-19render/vulkan: check that requested size is smaller than maxSimon Ser
Fail with a clearer error when the requested size is too large. Without this, we allocate a buffer with a size smaller than what was requested. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3975
2023-01-18vulkan: increase max stage size to support large buffersBrett Ernst
2023-01-18backend/drm: disable all CRTCs after VT switchSimon Ser
When the user switches away from the VT where wlroots is running, the new DRM master may mutate the KMS state in an arbitrary manner. For instance, let's say wlroots uses the following connector/CRTC mapping: - CRTC 42 drives connector DP-1 - CRTC 43 drives connector DP-2 Then the new DRM master may swap the mapping like so: - CRTC 42 drives connector DP-2 - CRTC 43 drives connector DP-1 wlroots needs to restore its own state when the user switches back. Some state is attached to wlr_drm_crtc (e.g. current FB), so reading back and adopting the CRTC/connector mapping left by the previous DRM master would be complicated (this was the source of other bugs in the past, see [1]). With the previous logic, wlroots merely tries to restore the state of each connector one after the other. This fails in the scenario described above: the kernel refuses to use CRTC 42 for DP-1, because that CRTC is already in-use for DP-2. Unfortunately with the legacy uAPI it's not possible to restore the state in one go. We need to support both legacy and atomic uAPIs, so let's fix the bug for the legacy uAPI first, and then improve the situation for the atomic uAPI as a second step [2]. We need to disable the CRTCs we're going to switch the connectors for. This sounds complicated, so let's just disable all CRTCs to simplify. This causes a black screen because of the on/off modesets, but makes VT switch much more reliable, so I'll take it. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/c6d8a11d2c438d514473b1cbe20e5550e7227472 [2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3794 Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3342
2023-01-18render/vulkan: use correct source offset in read_pixelsllyyr
2023-01-16backend/x11: fix delta_discrete valueKirill Primak
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3563
2023-01-04subcompositor: Clean up subsurface_consider_mapAlexander Orzechowski
check_parent was unecessary: it only served to skip a trivial check and added more complexity than it was worth.
2023-01-04subcompositor: Clarify comment on subsurface mapped considerationAlexander Orzechowski
2023-01-04tinywl: Nuke view->{x, y}Alexander Orzechowski
Instead use the scene node position.
2023-01-03tablet-tool: revert bitfield in enum wlr_tablet_tool_tip_stateSimon Ser
This was changed to a bitfield by mistake. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3484#note_1697926
2023-01-03backend/x11: fix initial value of wlr_x11_buffer.n_busySimon Ser
We lock the buffer there, so we need to initialize the n_busy count to 1 as well. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3556
2022-12-23session-lock: send more protocol errorsIsaac Freund
The invalid_destroy and invalid_unlock protocol errors aren't currently sent by wlroots and instead left up to the compositor. However, we can handle these as well without much additional complexity. This also adds a missing wl_resource_destroy() call if the lock is inert in lock_handle_unlock_and_destroy().
2022-12-22addon: Remove extra newline from loggingAlexander Orzechowski
2022-12-22addon: Add more loggingAlexander Orzechowski
2022-12-22presentation-time: finish surface addonKirill Primak
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3554
2022-12-22xwayland/xwm: remove unnecessary surface_id resetSimon Ser
xwayland_surface_associate() already does this.
2022-12-22xwayland/xwm: assert that we're not overwriting when associatingSimon Ser
Make sure xwayland_surface_associate() is not called twice in a row without a xwayland_surface_dissociate() call in-between.
2022-12-22xwayland/xwm: dissociate even if surface is NULLKirill Primak
If a window is unmapped too quickly, we might receive UnmapNotify before we get the corresponding wl_surface, which will later lead to associating the same window twice. To fix this, move the NULL surface check to xwayland_surface_dissociate(), which makes resetting the unpaired link and the wl_surface object ID unconditional. Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3552
2022-12-22util/addon: ensure the set is empty after finishKirill Primak
2022-12-22render/vulkan: always finish buffer addon on texture destroyKirill Primak
2022-12-22render/vulkan: remove NULL renderer check on texture destroyKirill Primak
2022-12-20cursor: compare to scaled coordsbi4k8
2022-12-18xwayland/xwm: constify needlesKirill Primak
2022-12-16backend/drm: check return value of get_drm_{connector,crtc}_props()Simon Ser
We already do it for get_drm_plane_props().
2022-12-15keyboard: improve documentationSimon Ser
2022-12-15backend/drm: remove wlr_drm_crtc.legacy_crtcSimon Ser
We only need it for one thing: gamma size. Moreover, some bits in the drmModeCrtc will become out-of-date, for instance the current mode, so let's avoid caching the whole struct and only keep what we know won't change.
2022-12-15backend/drm: fetch fresh legacy CRTC in connector_get_current_mode()Simon Ser
connect_drm_connector() may be called long after create_drm_connector(). During that time the DRM mode might have changed. Avoid working with stale information.
2022-12-14keyboard: only update LEDs when changedxiliuya
2022-12-13backend/drm: drop unused arg in connector_get_current_mode()Simon Ser
2022-12-13backend/drm: prevent out-of-bounds array access on unknown subpixelSimon Ser
If the kernel adds new enum entries for subpixel, don't read past the end of the subpixel_map array.
2022-12-13backend/drm: refuse to switch CRTC for enabled connectorSimon Ser
match_obj() might return a configuration where the CRTC for an enabled connector is switched to another one. We don't support this correctly: the wlr_output common code would need to query again the supported formats, re-allocate the swapchain, etc. What's more, the kernel doesn't even support this [1]: it requires planes to be disabled to change their CRTC, it rejects commits directly switching the CRTC used by a plane. [1]: https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/drm_atomic.c?h=6e90293618ed476d6b11f82ce724efbb9e9a071b#n697
2022-12-13backend/drm: rename wlr_drm_backend.outputs to connectorsSimon Ser
This list contains wlr_drm_connector entries, and there is no guarantee that the wlr_output fields are initialized.
2022-12-13backend/drm: clear pending cursor FB in drm_connector_commit_state()Simon Ser
Ensure we unlock any pending cursor FB when disabling a connector.
2022-12-13backend/drm: update wlr_drm_connnector.crtc in drm_connector_commit_state()Simon Ser
If the commit fails, then our local state becomes out-of-sync with the kernel's. Additionally, when disabling a connector without going through dealloc_crtc(), conn->crtc would still be set. Fix this by updating conn->crtc in drm_connector_commit_state().
2022-12-13backend/drm: print stringified connector status in realloc_crtcs()Simon Ser
The raw enum value wasn't informative enough. It's not trivial to tell whether 0 means connected or disconnected. Drop the status from the state after realloc, since the exact same information is printed right above.
2022-12-13backend/drm: add drm_connector_status_str()Simon Ser
Helper to stringify a connector status.
2022-12-13render/egl: stop advertising render support for external-only formatsSimon Ser
Some formats like YUV are only supported by Mesa for sampling, not for rendering. However we always unconditionally added the INVALID modifier to the list of render formats. Check whether all modifiers are external-only, in that case, don't add INVALID to the list of render formats.
2022-12-12egl: consistently use EGLint for DMA-BUF formatSimon Ser
EGL_EXT_image_dma_buf_import_modifiers [1] uses EGLint to carry formats. We were casting it to int (which may not be the same width) and uint32_t (which may change the value). Instead, use EGLint everywhere. [1]: https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt
2022-12-09util/region: forbid "shrinking" a region with wlr_region_expand()Kirill Primak
The logic isn't correct.
2022-12-08render/pixman: skip mask for opaque texture renderingSimon Ser
2022-12-08xwayland: use HAVE_ prefix for xcb_xfixes_set_client_disconnect_modeSimon Ser
86fc2199f85a ("build: unify naming for HAVE_* defines") has switched over all other feature defines from HAS_* to HAVE_*, but missed this one.
2022-12-08xwayland: remove find_program() fallback when dep is not foundSimon Ser
The dep allows us to check dep variables to discover supported features. With the binary we assume none of the features are supported. If a user forgets to install the pkg-config file (e.g. because it's in a split package) we end up incorrectly disabling all features. Instead let's error out.
2022-12-07backend/drm: store pending FB in stateSimon Ser
Instead of having a pending_fb field on the struct wlr_drm_plane, move it to struct wlr_drm_connector_state. That way, there's no risk having a stale pending FB around: the state doesn't survive across tests and commits. The cursor is a special case because it's disconnected from the atomic state: the wlr_backend_impl.set_cursor hook sets the cursor for the next commit. Move the field to wlr_drm_connector.cursor_pending_fb.
2022-12-07backend/drm: use separate field to store pending cursor FBSimon Ser
We'll move the pending primary FB into the connector state in the next commit, dropping wlr_drm_plane.pending_fb in the process. Introduce a dedicated field for the cursor, which has to be managed in a special way due to our set_cursor API.
2022-12-07backend/drm: pass fb as arg in set_plane_props()Simon Ser
plane_get_next_fb() will go away in subsequent commits. Primary and cursor will differ with the new logic. Let's prepare for this.
2022-12-07backend/drm: stop using goto in set_plane_props()Simon Ser
We only have one error code-path, no need for goto here.
2022-12-07backend/drm: simplify dealloc_crtc() commitSimon Ser
No need to manually call drm_connector_state_init() here, we can just let drm_connector_commit_state() handle it.
2022-12-07xdg-shell: use defunct_role_object errorKirill Primak