aboutsummaryrefslogtreecommitdiff
path: root/backend
AgeCommit message (Collapse)Author
2020-12-13backend/x11: fix xinput mask mixed up with presentSimon Ser
Don't mix xinput and present flags. Fixes: d79a00bf0208 ("backend/x11: switch to wlr_swapchain")
2020-12-13backend/x11: query modifiers supported by X11 serverSimon Ser
2020-12-13backend/x11: switch to wlr_swapchainSimon Ser
2020-12-13backend/wayland: query render formatsSimon Ser
2020-12-13backend/wayland: use wlr_swapchain for cursor surfaceSimon Ser
2020-12-13backend/wayland: use wlr_swapchain for main surfaceSimon Ser
The cursor surface still uses a wl_egl_window. References: https://github.com/swaywm/wlroots/issues/1352
2020-12-13backend/wayland: stop rendering black frame on initSimon Ser
Instead of rendering a black frame, schedule a frame event to ask the compositor to render a proper frame.
2020-12-13output: stop assuming a frame is pending in initSimon Ser
- The DRM backend initially doesn't have a frame scheduled initially. However the compositor is expected to set a mode to start the rendering loop (frame_pending is set to true in drm_crtc_pageflip). - The headless and X11 backends have a timer to schedule frames, so they ignore this hint completely. - The Wayland backend renders a fake frame to start the rendering loop. It's the only case where a frame is pending on init, move the assumption there.
2020-12-11backend/drm: remove workaround for amdgpu DP MSTSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/2533
2020-12-09backend/drm: remove EGL configSimon Ser
Since we're using wlr_swapchain, we don't need to provide an EGL config.
2020-12-08backend/drm: fix missing wlr_drm_format.capSimon Ser
This caused issues with wlr_drm_format_dup.
2020-12-08backend/headless: add support for direct scan-outSimon Ser
I was about to add a check to fail instead of crash when the compositor uses direct scan-out, but with renderer v6 it's so simple to just add support for direct scan-out, why bother? Closes: https://github.com/swaywm/wlroots/issues/2523
2020-12-08backend/drm: don't assume possible_crtcs has only one bit setStephane Chauveau
This isn't necessarily the case [1]. This should fix an assertion failure on Raspberry Pi 4 dual screen. [1]: https://lists.freedesktop.org/archives/dri-devel/2020-August/275142.html Closes: https://github.com/swaywm/wlroots/issues/1943 Co-authored-by: Simon Ser <contact@emersion.fr>
2020-12-08backend/drm: stop tracking overlay planesSimon Ser
We don't do anything with them. Once we do, we can easily add this back.
2020-12-08backend/drm: unset current surface before importingSimon Ser
drm_fb_import_wlr may need to change the current EGL context. For instance by calling drm_fb_clear, which calls wlr_buffer_unlock, which may destroy a buffer if the cursor swapchain size has changed, which calls gles2's destroy_buffer, which calls glDeleteFramebuffers. Closes: https://github.com/swaywm/wlroots/issues/2479
2020-12-07backend/drm: use EGL_PLATFORM_GBM_KHRSimon Ser
This is just the vendor-agnostic define for the GBM platform. It has the same value as EGL_PLATFORM_GBM_MESA, so should work with old drivers that only offer the Mesa-vendored extension too.
2020-12-07backend/headless: create a config-less EGL contextSimon Ser
2020-12-07drm: do not unset make/model before emitting destroy eventIlia Bozhinov
2020-12-05backend/session/libseat: set XDG_SESSION_TYPESimon Ser
libseat will call logind's SetType method if necessary.
2020-12-04backend/drm: remove unused if in drm_connector_move_cursorSimon Ser
We return early if we don't have a plane.
2020-12-03backend/drm: query render formatsSimon Ser
On some platforms it's possible that the display engine supports modifiers not supported by the render engine. Query render formats and intersect them with plane formats to accommodate for this.
2020-12-03backend/drm: take a wlr_drm_format in init_drm_surfaceSimon Ser
Instead of taking a format code and wlr_drm_format_set, simplify the function signature and take a single wlr_drm_format.
2020-12-01Revert "backend/drm: stop force-probing connectors"Simon Ser
This reverts commit 713c1661b742f93a7d2167321837c0d99541ca87. It turns out we do need to force-probe on startup and on hotplug [1]. This is unfortunate, but that's just how the uAPI works. Fixing this would require patching the kernel. [1]: https://lists.freedesktop.org/archives/dri-devel/2020-November/289506.html Closes: https://github.com/swaywm/wlroots/issues/2499
2020-11-30backend/drm: "scaling mode" is a connector propertySimon Ser
It's not a CRTC property. Remove it altogether since it's unused.
2020-11-30backend/drm: rotation is a plane propertySimon Ser
"rotation" is a plane property, it's not a CRTC property. It was also missing from plane_info.
2020-11-30backend/headless: use a format suitable for renderingSimon Ser
When allocating buffers, use a format suitable for rendering. This avoids picking a format that won't work.
2020-11-25backend/wayland: don't set EGL visualSimon Ser
The Wayland platform doesn't have visuals. By chance, WL_SHM_FORMAT_ARGB8888 is zero, which means egl_get_config was ignoring it and everything worked fine.
2020-11-24backend/drm: stop force-probing connectorsSimon Ser
After discussing with Pekka and Daniel on #dri-devel, we concluded [1] that user-space shouldn't need to force-probe connectors. Force-probing can take some time, so using drmModeGetConnectorCurrent can result in faster start-up. Users can manually trigger a force-probe if necessary: echo detect | sudo tee /sys/class/drm/card0-DP-1/status Or just by running a tool like drm_info. A similar change has been submitted to Weston [2]. [1]: https://lists.freedesktop.org/archives/dri-devel/2020-November/287728.html [2]: https://gitlab.freedesktop.org/wayland/weston/-/issues/437
2020-11-24backend/x11: log unhandled client messagesSimon Ser
2020-11-24backend/x11: log unhandled X11 eventsSimon Ser
2020-11-24backend/x11: log errorsSimon Ser
Register an X11 error handler, and optionally use xcb-errors to print a detailed message.
2020-11-24backend/libseat: fix change_vt return valueIsaac Freund
This should return true on success and false on failure not vice-versa.
2020-11-19backend/session: add a timeout waiting for GPUsSimon Ser
If a GPU doesn't show up in 10s, bail out and return zero GPUs.
2020-11-19backend/session/logind: log when using XDG_SESSION_IDSimon Ser
This makes it easier to figure out how wlroots selected the session.
2020-11-19backend/session: replace session_signal with events.activeSimon Ser
This is more idiomatic wlroots API. The new name makes it clear that the signal is emitted when wlr_session.active changes.
2020-11-19Revert "session/logind: support CanGraphical property"Simon Ser
We now use udev to wait for DRM card devices. This reverts commit 3ebf079a9a120a27fc1008a62e7f99d5d166b745.
2020-11-19backend/session: wait for DRM device if none foundSimon Ser
Wait for a DRM device if none is found in wlr_session_find_gpus. This can happen if the compositor is loaded before the display kernel driver. This supersedes the logind CanGraphical property. To test, e.g. with i915 and sway: rmmod -f i915 sway & modprobe i915 Closes: https://github.com/swaywm/wlroots/issues/2093
2020-11-19backend/session: introduce wlr_session.events.add_drm_cardSimon Ser
This is triggered when a new DRM card is added. An easy way to test this patch is `modprobe vkms`.
2020-11-19backend/session: filter udev events by sysnameSimon Ser
We're only interested in card devices. The loop over wlr_session.devices would take care of ignoring non-card events, but a future patch will listen to udev "add" events as well.
2020-11-19backend/session: operate on wlr_deviceSimon Ser
Instead of operating on FDs in {open,close}_device, operate on wlr_devices. This avoids the device lookup in wlr_session and allows callers to have access to wlr_device fields. For now, we use it to remove wlr_session_signal_add and replace it with a more idiomatic wlr_session.events.change field. In the future, other events will be added.
2020-11-19backend/session: don't return FD on failure in open_fileSimon Ser
When wlr_session_open_file fails, don't return the FD, otherwise the caller will think the call succeeded.
2020-11-19backend/drm: Use legacy gamma size for legacy backendKenny Levinsen
We would always return the GAMMA_LUT_SIZE property if available, and only fall back to legacy gamma size otherwise. This leads to issues if both are available in differs in size while we use the legacy backend. Ensure that we only return the legacy size if we're using the legacy backend. Closes: https://github.com/swaywm/wlroots/issues/2429
2020-11-15backend/headless: implement export_dmabufSimon Ser
2020-11-15backend/headless: switch to wlr_swapchainSimon Ser
2020-11-15backend/drm: check drm_surface_render_black_frame return valueSimon Ser
This avoids hitting an assertion in drm_fb_lock_surface when we failed to render a black frame.
2020-11-15backend/drm: add support for wlr_swapchain multi-GPUSimon Ser
2020-11-15backend/drm: get rid of wlr_drm_fb_typeSimon Ser
Since all DRM FBs are backed by a wlr_buffer, there's no need for this anymore.
2020-11-15backend/drm: add support for wlr_swapchain buffer ageSimon Ser
2020-11-15backend/drm: use wlr_swapchainSimon Ser
2020-11-15backend/libinput: require libinput 1.14Simon Ser
We have the policy of requiring up-to-date dependencies instead of adding conditionals for older versions. libinput 1.14 was published more than 1 year ago.