aboutsummaryrefslogtreecommitdiff
path: root/backend
AgeCommit message (Collapse)Author
2019-06-11Remove WLR_DRM_NO_ATOMIC_GAMMA workaroundScott Anderson
This is fixed on amdgpu, so we don't need this anymore.
2019-06-07backend/drm: add support for multiplanar BOsSimon Ser
2019-06-07backend/drm: fallback to drmModeAddFB2Simon Ser
2019-06-07backend/drm: reject DMA-BUFs with flagsSimon Ser
2019-06-07backend/drm: hold buffers while scanning outSimon Ser
2019-06-07output: fix attach_buffer semanticsSimon Ser
2019-06-07output: change set_dmabuf to attach_bufferSimon Ser
2019-06-07backend/drm: strip alpha channel on scan-outSimon Ser
2019-06-07backend/drm: check format when scanning out DMA-BUFSimon Ser
2019-06-07backend/drm: add basic support for direct scan-outemersion
2019-06-02drm: legacy: issue a NULL modeset on disableRouven Czerwinski
The DRM subsystem needs a NULL modeset for connectors which disappear from the system to disable the hardware pipes, otherwise the pixels get rendered but are sent nowhere. The atomic backend does the equivalent by removing the properties and issuing a commit. Fixes #1706
2019-05-22session/logind: check for XDG_SESSION_ID firstJan Chren
In order to support compositors running as systemd user units without display manager, a mechanism for specifying session ID exactly must exist. Checking for `XDG_SESSION_ID` mimics loginctl behaviour https://github.com/systemd/systemd/blob/e95be7def26c6c5feaf08a4135aa4f50c53263a8/src/login/loginctl.c#L856.
2019-05-22session/logind: specify seat exactlyJan Chren
"/org/freedesktop/login1/seat/self" path triggers seat-finding code path in logind, which currently relies on getting the session based on caller's PID. This behaviour is deprecated in logind as it doesn't work eg. with systemd user units, which run outside of user session. We check for "seat0" in logind_change_vt() already as introduced in 47985d2dc56a6af469ac9375e7548136765aff16, so hard-coding it here is not a problem, otherwise sd_session_get_seat() could be used.
2019-05-15Merge pull request #1696 from RedSoxFan/logind-stay-active-on-goneScott Anderson
session/logind: keep active for pause_device gone
2019-05-13Fixes #1689 RDP RemoteFX crashMichiel
When using the rdp backend and connecting with xfreerdp ... --rfx, wlroots crashes in backend/rdp/output.c while attempting to realloc(..., 0). This commit guards against that and instead returns true, resulting in no rfx message being sent. This prevents the crash and appears to work, but it's not obvious if this is correct from a specification perspective.
2019-05-13session/logind: keep active for pause_device goneBrian Ashworth
This appears to be a quick fix for compositors freezing when a dock is disconnected. Disconnection of the dock is causing `pause_device` for the DRM devices associated with the dock. Since these devices major number is `DRM_MAJOR`, the session was being set to inactive. This just makes it so the session is not set to inactive when the device's state is `gone`.
2019-05-06backend/wayland: remove wl_shmSimon Ser
We bind to it but never use it.
2019-05-06backend/wayland: use xdg-decoration-unstable-v1Simon Ser
This allows the toplevel to have proper decorations on compositors that support xdg-decoration-unstable-v1.
2019-04-29backend/noop: disallow renderingSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/1662
2019-04-23backend/wayland: fix wlr_wl_pointer use-after-freeSimon Ser
2019-04-23output: rename needs_commit to needs_frameSimon Ser
This new name makes more sense, since it is a request from the backend to get a new frame. In the future a commit may not convey a new frame.
2019-04-23output: refactor backend APISimon Ser
This updates the backend part of the output API. This is mostly renaming: make_current becomes attach_render and swap_buffers becomes commit. This also fixes the RDP backend to support NULL damage.
2019-04-22Fix missing headers when building without X11Alyssa Ross
The deleted includes are redundant, because other headers will include the necessary files. Additionally, they cause build failures, because including EGL/egl.h or EGL/eglext.h directly, instead of through wlr/render/egl.h or wlr/render/interface.h, will mean that MESA_EGL_NO_X11_HEADERS will not have been defined, and so the EGL headers will attempt to pull in unnecessary X11 headers that may not exist on the system. For the headers produced by glgen.sh, the includes couldn't simply be deleted, because no other header would include the EGL headers. Neither wlr/render/egl.h or wlr/render/interface.h felt appropriate to include, so I opted instead to copy the MESA_EGL_NO_X11_HEADERS definition before the EGL includes.
2019-04-08backend: unbreak on 32-bit architecturesJan Beich
backend/headless/output.c:132:3: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] ++backend->last_output_num); ^~~~~~~~~~~~~~~~~~~~~~~~~~ backend/noop/output.c:72:3: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] ++backend->last_output_num); ^~~~~~~~~~~~~~~~~~~~~~~~~~ backend/wayland/output.c:294:3: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] ++backend->last_output_num); ^~~~~~~~~~~~~~~~~~~~~~~~~~ backend/x11/output.c:150:3: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] ++x11->last_output_num); ^~~~~~~~~~~~~~~~~~~~~~
2019-04-08noop: implement setting a custom modeIlia Bozhinov
2019-04-08Add FreeRDP backend for remote desktop supportDrew DeVault
2019-03-21wlr_output: Add preferred property (#1625)Guido Günther
* wlr_output: Indicate modes link * wlr_output: Introduce preferred flag This indicates an outputs preferred mode. * drm: Set preferred flag for an outputs preferred mode
2019-03-19s/lid_switch/switch_deviceRyan Walklin
Rename lid_switch to switch_device to disambiguate lid and tablet mode switches.
2019-03-15backend/noop: improve output number handlingBrian Ashworth
This improves the way the output numbers are handled for the noop backend. Instead of using the number of active outputs plus one, the last used number is stored and new outputs will increment it. This fixes the situation where you start with one output, create a second, close the first, and create a third. Without this, both outputs will be NOOP-2, which causes an issue since the identifier will also be identical. With this, the last output is NOOP-3 and the outputs can be distinguished.
2019-03-15backend/headless: improve output number handlingBrian Ashworth
This improves the way the output numbers are handled for the headless backend. Instead of using the number of active outputs plus one, the last used number is stored and new outputs will increment it. This fixes the situation where you start with one output, create a second, close the first, and create a third. Without this, both outputs will be HEADLESS-2, which causes an issue since the identifier will also be identical. With this, the last output is HEADLESS-3 and the outputs can be distinguished.
2019-03-15backend/x11: improve output number handlingBrian Ashworth
This improves the way the output numbers are handled for the x11 backend. Instead of using the number of active outputs plus one, the last used number is stored and new outputs will increment it. This fixes the situation where you start with one output, create a second, close the first, and create a third. Without this, both outputs will be X11-2, which causes an issue since the identifier will also be identical. With this, the last output is X11-3 and the outputs can be distinguished.
2019-03-15backend/wayland: improve output number handlingBrian Ashworth
This improves the way the output numbers are handled for the wayland backend. Instead of using the number of active outputs plus one, the last used number is stored and new outputs will increment it. This fixes the situation where you start with one output, create a second, close the first, and create a third. Without this, both outputs will be `WL-2`, which causes an issue since the identifier will also be identical. With this, the last output is `WL-3` and the outputs can be distinguished.
2019-03-06backend/session: Allow setting a custom tty via WLR_DIRECT_TTYNiklas Schulze
2019-03-05backend/drm: Don't fail on failing to find overlay formatScott Anderson
Some hardware exists which doesn't support XRGB/ARGB overlays, and we aren't even using overlay planes, so don't fail on trying to find a format.
2019-03-05backend/session: open TTY with O_CLOEXEC for direct sessionemersion
2019-03-02backend/session: add noop sessionemersion
This is the first step towards being able to run via DRM leasing and on render nodes. Test with: export WLR_BACKENDS=drm export WLR_SESSION=noop export WLR_DRM_DEVICES=/dev/dri/renderD128
2019-03-01meson: enable more compiler warningsemersion
2019-02-24backend/drm: Unset cursor on cleanupScott Anderson
This will prevent the cursor from persisting on the Linux framebuffer terminal on exit.
2019-02-21backend/drm: fix memory leak in realloc crtcsRouven Czerwinski
If *changed_outputs is not supplied by the calling function, track the local allocation with a bool variable and free the allocation at the end of the function.
2019-02-19backend/drm: fix modeset on drm fd resumeBrian Ashworth
On DRM resume, such as switching back to a TTY, the output needs to be modeset to the current mode. However, wlr_output_set_mode will return early when attempting to set the mode to the current mode. This just steps around wlr_output_set_mode and calls drm_connector_set_mode directly.
2019-02-18backend/drm: fix NULL dereference when unsetting cursoremersion
This segfault happens on multi-GPU systems. Fixes https://github.com/swaywm/sway/issues/3717
2019-02-15Merge pull request #1537 from VincentVanlaer/cursor-dmabuf-nouveauDrew DeVault
Add workaround for hardware cursors on nouveau
2019-02-15Add workaround for hardware cursors on nouveauVincent Vanlaer
2019-02-15Revert "drm: do not modeset to current mode"Drew DeVault
This reverts commit 72c76b128e562c482868b42b1945ed49cbd44353.
2019-02-14Copy cursor surface to secondary gpu if necessaryVincent Vanlaer
2019-02-14drm: do not modeset to current modeBrian Ashworth
There is no point in modesetting an output to a mode that it is already set to. Modesetting will cause the output to briefly flicker which is undesirable for a noop. This returns early in `drm_connector_set_mode` when attempting to modeset to the current mode.
2019-02-04Merge pull request #1526 from VincentVanlaer/cursor-dmabufScott Anderson
Allow cursor render surface to be used as fb
2019-02-04Allow cursor render surface to be used as fbVincent Vanlaer
In order for a surface to be used as a cursor plane framebuffer, it appears that requiring the buffer to be linear is sufficient. GBM_BO_USE_SCANOUT is added in case GBM_BO_USE_LINEAR isn't sufficient on untested hardware. Fixes #1323 Removed wlr_drm_plane.cursor_bo as it does not serve any purpose anymore. Relevant analysis (taken from the PR description): While trying to implement a fix for #1323, I found that when exporting the rendered surface into a DMA-BUF and reimporting it with `GBM_BO_USE_CURSOR`, the resulting object does not appear to be valid. After some digging (turning on drm-kms debugging and switching to legacy mode), I managed to extract the following error: ``` [drm:__setplane_check.isra.1 [drm]] Invalid pixel format AR24 little-endian (0x34325241), modifier 0x100000000000001 ``` The format itself refers to ARGB8888 which is the same format as `renderer->gbm_format` used in master to create the cursor bo. However, using `gbm_bo_create` with `GBM_BO_USE_CURSOR` results in a modifier of 0. A modifier of zero represents a linear buffer while the modifier of the surface that is rendered to is `I915_FORMAT_MOD_X_TILED` (see https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/uapi/drm/drm_fourcc.h?h=v4.20.6#n263). In order to fix this mismatch in modifier, I added the `GBM_BO_USE_LINEAR` to the render surface and everything started to work just fine. I wondered however, whether the export and import is really necessary. I then decided to test if the back buffer of the render surface works as well, and at least on my hardware (Intel HD 530 and Intel UHD 620) it does. This is the patch in this PR and this requires no exporting and importing. I have to note that I cheated in order to import DMA_BUFs into a cursor bo when doing the first tests, since on import the Intel drivers check that the cursor is 64x64. This is strange since cursor sizes other than 64x64 have been around for quite some time now (https://lists.freedesktop.org/archives/mesa-commit/2014-June/050268.html). Removing this check made everything work fine. I later (while writing this PR) found out that `__DRI_IMAGE_USE_CURSOR` (to which `GBM_BO_USE_CURSOR` translates) has been deprecated in mesa (https://gitlab.freedesktop.org/mesa/mesa/blob/master/include/GL/internal/dri_interface.h#L1296), which makes me wonder what the usecase of `GBM_BO_USE_CURSOR` is. The reason we never encountered this is that when specifying `GBM_BO_USE_WRITE`, a dumb buffer is created trough DRM and the usage flag never reaches the Intel driver directly. The relevant code is in https://gitlab.freedesktop.org/mesa/mesa/blob/master/src/gbm/backends/dri/gbm_dri.c#L1011-1089 . From this it seems that as long as the size, format and modifiers are right, any surface can be used as a cursor.
2019-02-03Allow compositors to run as systemd user unitsmnussbaum
When a wlroots compositor runs as a systemd user unit there is no session associated with the compositor process. Instead we need to attach to an active and graphical user session. This change first looks for an available session for the process, and if there isn't one falls back to display in the oldest available graphical session. This work was modeled after a similar change to mutter - https://gitlab.gnome.org/GNOME/mutter/merge_requests/150.
2019-01-31backend/session/logind: dup FD with CLOEXECemersion