aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-08render/drm_format_set: allocate using cap when duplicatingSimon Ser
In wlr_drm_format_dup, allocate the new wlr_drm_format using cap instead of len. This makes it so the cap field is up-to-date and the chunk of memory isn't too small if we append new modifiers (we don't allow this yet but might in the future).
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-07docs: fix error in wlr_output_set_damage() commentIsaac Freund
output-buffer-local coordinates are neither scaled nor transformed
2020-12-07xwayland: use pipe instead of SIGUSR1 to signal readinessDominik Honnef
Closes: https://github.com/swaywm/wlroots/issues/2154
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-07render/egl: support config-less wlr_eglSimon Ser
When using wlr_swapchain, there's no need to select an EGLConfig. Add support for creating config-less EGL contexts.
2020-12-07wlr-output-management: Handle modes added after initializingMarten Ringwelski
The DRM backend adds custom modes to wlr_output.modes Currently modes that are added after the first occurence of wlr_output_configuration_head_v1 are not added to wlr_output_head.mode_resources.
2020-12-07screencopy: don't use output transform for damage copyIsaac Freund
Only wlr_output_damage works in transformed coordinates, wlr_output->damage is in output-buffer-local coordinates. This essentially reverts 1ecc1b5 and fixes 1477401.
2020-12-07drm: do not unset make/model before emitting destroy eventIlia Bozhinov
2020-12-06screencopy: check if damage committed before copyIsaac Freund
This check avoids copying stale state from output->pending.damage.
2020-12-06screencopy: use output transform for damage copyIsaac Freund
2020-12-06screencopy: handle compositor not setting damageIsaac Freund
Damage the full output if the compositor didn't submit damage but did submit a buffer.
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-03render/drm_format_set: introduce wlr_drm_format_intersectSimon Ser
Intersects modifiers from two wlr_drm_format structs. If either format doesn't support modifiers, the resulting format won't support modifiers.
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-03build: add leftover WLR_HAS_LIBCAPSimon Ser
We don't support libcap anymore. This was left as a comment by Meson: /* #undef WLR_HAS_LIBCAP */
2020-12-02xwayland: add -core to flagsSimon Ser
Xwayland has its own special handling for signals like SIGSEGV/SIGABRT. Instead of leaving the job to the OS, it tries to walk up the call stack (badly, because a lot of information is missing), print the stack trace to stdout, then exit(1). This is very annoying because it prevents Xwayland crashes from being easily debugged. Xwayland has a flag "-core" that aborts instead of exiting. This allows the OS to generate a coredump. It's far from perfect but better than nothing, I guess.
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-30xwm: add wlr_xwayland_surface_restack()Ilia Bozhinov
2020-11-30render/egl: remove wlr_egl.external_only_dmabuf_formatsSimon Ser
Replace it with wlr_egl.dmabuf_render_formats.
2020-11-30render: assert {X,A}RGB8888 are supportedSimon Ser
The Wayland protocol requires those to be supported.
2020-11-30render: rename wlr_renderer_get_formatsSimon Ser
Rename wlr_renderer_get_formats to wlr_renderer_get_shm_texture_formats. This makes it clear those formats are only suitable for shm import.
2020-11-30render: rename wlr_renderer_get_dmabuf_formatsSimon Ser
Rename wlr_renderer_get_dmabuf_formats to wlr_renderer_get_dmabuf_texture_formats. This makes it clear the formats are only suitable for creating wlr_textures.
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-30render: introduce wlr_renderer_get_dmabuf_render_formatsSimon Ser
It describes which DMA-BUF formats can be used to render.
2020-11-30render: remove wlr_renderer_format_supportedSimon Ser
Instead, callers can just use wlr_renderer_get_formats and iterate over the list. This function was unused in wlroots.
2020-11-30render: expand wlr_renderer_get{,_dmabuf}_formats docsSimon Ser
Make it clear formats returned are only suitable for import/sampling. These formats can't be used to be rendered to.
2020-11-28render/egl: don't rely on being able to open primary nodeSimon Ser
On some setups (e.g. remote access via SSH) the current user won't have the permission to open the primary node at all. It's still possible to use drmGetDevices to match the primary node name returned by EGL. Closes: https://github.com/swaywm/wlroots/issues/2488
2020-11-28wlr-output-management: add missing NULL checkIsaac Freund
Handle allocation failure in wlr_output_configuration_head_v1_create
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-23surface: Make send_enter store entered outputsKenny Levinsen
wlr_surface_send_enter now stores outputs that have been entered. Combined with a new 'bind' event on wlr_output, this allows us to delay enter events as necessary until the respective wl_output global has been bound. Closes: https://github.com/swaywm/wlroots/issues/2466
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.