aboutsummaryrefslogtreecommitdiff
path: root/backend
AgeCommit message (Collapse)Author
2022-06-07backend/drm: unconditionally set "content type" to graphicsSimon Ser
CTA-861-G says that "graphics" is used to indicate non-analog (ie, digital) content. With that bit set, the sink should turn off analog reconstruction and other related filtering.
2022-06-02backend/drm: fix check for no-op commitsIsaac Freund
Since 6936e163b, we short-circut no-op commits as an optimization. However, the logic in the check was slightly off.
2022-06-02backend/drm: short-circuit no-op commitsSimon Ser
Some output commits (changing e.g. the output scale or transform) don't require any change in the KMS state. Instead of going through a KMS commit, return early. Blocking KMS commits can be expensive.
2022-06-01backend/drm: make commits without a buffer blockingSimon Ser
The wlr_output API requires compositors to wait for wlr_output.frame before submitting a new buffer. However, compositors can perform a commit which doesn't involve a buffer anytime. If the commit is a modeset, we set DRM_MODE_ATOMIC_ALLOW_MODESET and block until the commit is done. If it isn't, we currently always perform a non-blocking commit. This is an issue because a previous page-flip might still be in flight kernel-side, returning EBUSY. Fix this by using blocking commits when a buffer isn't submitted by the compositor. Closes: https://github.com/swaywm/sway/issues/6962 References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2239
2022-05-31backend/drm: improve atomic commit flag loggingSimon Ser
We weren't logging all of the flags, which made debugging more difficult.
2022-05-30output: pass wlr_output_state to backendSimon Ser
Groundwork for the following commits. The goal is to allow users to specify their own wlr_output_state instead of wlr_output.pending.
2022-05-27backend/x11: fix output model strdup callSimon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3434#note_1401193 Fixes: be86145322e6 ("output: turn make/model/serial into char *")
2022-05-26backend/drm: fix crash with null serialvaxerski
backend/drm: use serial_str instead
2022-05-26output: turn make/model/serial into char *Simon Ser
This allows the make/model/serial to be NULL when unset, and allows them to be longer than the hardcoded array length. This is a breaking change: compositors need to handle the new NULL case, and we stop setting make/model to useless "headless" or "wayland" strings.
2022-05-26backend/drm: fix crash in init_drm_surfaceSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3434
2022-05-25backend/drm: remove wlr_drm_surface.{width,height}Simon Ser
This information is stored in wlr_swapchain, no need to duplicate it.
2022-05-24backend/drm: allow non-linear modifiers for multi-GPUSimon Ser
Prior to [1], if an entry in a DRM format set was different than a single LINEAR modifier, implicit modifiers were always allowed. This has changed and now implicit modifiers are only allowed if INVALID is in the list of modifiers. So now we can safely enable explicit modifiers for cross-GPU imports, without risking receiving buffers with an implicit modifier. This should improve perf a bit on setups where two GPUs from the same vendor are used. This fixes the first bullet point from [2]. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3231 [2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3331
2022-05-11backend/drm: fetch EDID manufacturer from udev_hwdbSimon Ser
Maintaining our internal table up-to-date is tedious: one needs to manually go through the PnP ID registry [1] and check whether we're missing any entry. udev_hwdb already has an API to fetch a manufacturer name from its PnP ID. Use that instead. [1]: https://uefi.org/pnp_id_list
2022-05-10backend/headless: allow variable refresh rateSimon Ser
Instead of waking up each 16ms to emit a frame event, arm the timer when the output is committed. This allows the headless backend to idle when nothing changes on screen, and behaves similarly to the other backends.
2022-04-29backend/wayland: reset active pointer on destroyKirill Primak
2022-04-28Revert "backend/wayland: zero out finished input devices"Simon Ser
This reverts commit 03c88b07ba64185de7183f52f5f3e4875c5c1d5d. init functions now zero out the structs.
2022-04-28Zero-initialize structs in init functionsSimon Ser
Ensures there is no field left to its previous undefined value after calling an init function.
2022-04-22backend/wayland: zero out finished input devicesKirill Primak
2022-04-22backend/wayland/pointer: fix indentationKirill Primak
2022-04-22seat: Don't finish wlr_keyboard if server was never startedAlexander Orzechowski
2022-03-17types/wlr_touch: uniformize events nameSimon Zeni
2022-03-17types/wlr_tablet_tool: uniformize events nameSimon Zeni
2022-03-17types/wlr_tablet_pad: uniformize events nameSimon Zeni
2022-03-17types/wlr_switch: uniformize events nameSimon Zeni
2022-03-17types/wlr_keyboard: uniformize events nameSimon Zeni
2022-03-17types/wlr_pointer: uniformize events nameSimon Zeni
2022-03-17types/wlr_input_device: move width_mm and height_mm fields to wlr_tablet and ↵Simon Zeni
wlr_touch
2022-03-17types/wlr_input_device: move output_name field to wlr_pointer and wlr_touchSimon Zeni
2022-03-17backend/wayland: remove wl_seat_listener from public APISimon Zeni
2022-03-17backend/wayland: remove wlr_wl_input_deviceSimon Zeni
2022-03-17backend/wayland/tablet_v2: give wlr_tablet_* ownership to wlr_wl_seatSimon Zeni
2022-03-17backend/wayland: give wlr_touch ownership to wlr_wl_seatSimon Zeni
2022-03-17backend/wayland: drop wlr_switch supportSimon Zeni
2022-03-17backend/wayland: give wlr_pointer ownership to wlr_wl_seatSimon Zeni
All the code logic related to the pointer has been moved to its own file. The seat is responsible for the lifetime of its wlr_wl_pointer(s), and assigning them to the relevant wlr_wl_output. The wlr_wl_pointer becomes a simple helper to manager the wlr_pointer associated to the seat's wl_pointer and its lifetime.
2022-03-17backend/wayland: give wlr_keyboard ownership to wlr_wl_seatSimon Zeni
2022-03-13Pass O_CLOEXEC to drmModeCreateLease callsSamuel Čavoj
The lease_fd is currently being leaked to child processes Link: https://github.com/swaywm/sway/issues/4286#issuecomment-1065987957
2022-03-11types/wlr_tablet_tool: remove name ambiguityDavid96
It wasn't clear in the backend whether to use name or base.name, change it so base.name has to be used. Fixes https://github.com/swaywm/sway/issues/6884
2022-03-07types/wlr_input_device: move init and finish function to private APISimon Zeni
2022-03-07types/wlr_input_device: remove wlr_input_device_destroySimon Zeni
2022-03-07interface/wlr_touch: rework destroy sequenceSimon Zeni
The destroy callback in wlr_touch_impl has been removed. The function `wlr_touch_finish` has been introduced to clean up the resources owned by a wlr_touch. `wlr_input_device_destroy` no longer destroys the wlr_touch, attempting to destroy a wlr_touch will result in a no-op. The field `name` has been added to the wlr_touch_impl to be able to identify a given wlr_touch device.
2022-03-07interface/wlr_tablet_tool: rework destroy sequenceSimon Zeni
The destroy callback in wlr_tablet_tool_impl has been removed. The function `wlr_tablet_tool_finish` has been introduced to clean up the resources owned by a wlr_tablet_tool. `wlr_input_device_destroy` no longer destroys the wlr_tablet_tool, attempting to destroy a wlr_tablet_tool will result in a no-op. The field `name` has been added to the wlr_tablet_tool_impl to be able to identify a given wlr_tablet_tool device.
2022-03-07interface/wlr_tablet_pad: rework destroy sequenceSimon Zeni
The destroy callback in wlr_tablet_pad_impl has been removed. The function `wlr_tablet_pad_finish` has been introduced to clean up the resources owned by a wlr_tablet_pad. `wlr_input_device_destroy` no longer destroys the wlr_tablet_pad, attempting to destroy a wlr_tablet_pad will result in a no-op. The field `name` has been added to the wlr_tablet_pad_impl to be able to identify a given wlr_tablet_pad device.
2022-03-07interface/wlr_switch: rework destroy sequenceSimon Zeni
The destroy callback in wlr_switch_impl has been removed. The function `wlr_switch_finish` has been introduced to clean up the resources owned by a wlr_switch. `wlr_input_device_destroy` no longer destroys the wlr_switch, attempting to destroy a wlr_switch will result in a no-op. The field `name` has been added to the wlr_switch_impl to be able to identify a given wlr_switch device.
2022-03-07interface/wlr_pointer: rework destroy sequenceSimon Zeni
The destroy callback in wlr_pointer_impl has been removed. The function `wlr_pointer_finish` has been introduced to clean up the resources owned by a wlr_pointer. `wlr_input_device_destroy` no longer destroys the wlr_pointer, attempting to destroy a wlr_pointer will result in a no-op. The field `name` has been added to the wlr_pointer_impl to be able to identify a given wlr_pointer device.
2022-03-07interface/wlr_keyboard: rework destroy sequenceSimon Zeni
The destroy member in wlr_keyboard_impl has been removed. The function `wlr_keyboard_finish` has been introduce to clean up the resources owned by a wlr_keyboard. `wlr_input_device_destroy` no longer destroys the wlr_keyboard, attempting to destroy a wlr_keyboard will result in a no-op. The field `name` has been added to the wlr_keyboard_impl to be able to identify a given wlr_keyboard device.
2022-03-02backend/libinput: public API cleanupSimon Zeni
2022-03-02backend/libinput: rework tablet_pad interfaceSimon Zeni
The wlr_libinput_input_device now owns its wlr_tablet_pad, instead of creating a new wlr_libinput_input_device for it.
2022-03-02backend/libinput: rework tablet interfaceSimon Zeni
The wlr_libinput_device owns its wlr_tablet and its associated wlr_tablet_tools
2022-03-02backend/libinput: rework touch interfaceSimon Zeni
The wlr_libinput_input_device now owns its wlr_touch, instead of creating a new wlr_libinput_input_device for it.
2022-03-02backend/libinput: rework switch interfaceSimon Zeni
The wlr_libinput_input_device now owns its wlr_switch, instead of creating a new wlr_libinput_input_device for it.