aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-18backend/x11: use DRI3Open to get DRM FDSimon Ser
Instead of relying on EGL to retrieve the DRM FD, query it from the DRI3 extension. Use the EGL GBM platform, and drop the EGL config.
2020-12-18backend/drm: use wlr_drm_format_{create,add}Simon Ser
Instead of manually allocating and initializing the structs, use the new wlr_drm_format helpers.
2020-12-18render/drm_format_set: add wlr_drm_format_{create,add}Simon Ser
2020-12-17backend/drm: print DRM device name when scanning connectorsSimon Ser
2020-12-17backend/drm: add wlr_drm_backend.nameSimon Ser
Save the DRM device name in a wlr_drm_backend field, so that we can easily use it for logging purposes.
2020-12-17backend/drm: remove nouveau workaroundSimon Ser
The workaround is broken because drm_fb_acquire doesn't leave the EGL context current anymore. We'll need to re-introduce it. References: https://github.com/swaywm/wlroots/issues/2525
2020-12-17render/allocator: ignore NULL in wlr_allocator_destroySimon Ser
2020-12-17backend/x11: fix DRI3 formats not usedSimon Ser
We queried DRI3 formats, but we weren't using them. Because of a typo, only render formats were used. Fixes: c59aacf94465 ("backend/x11: query modifiers supported by X11 server") Closes: https://github.com/swaywm/wlroots/issues/2552
2020-12-16backend/headless: select the rendering device ourselvesSimon Ser
Backends will eventually stop creating their renderer. To prepare for this, stop using EGL_PLATFORM_SURFACELESS_MESA in the headless renderer. Pick a render node using libdrm. The new allocator/renderer creation logic looks very much like what will end up in common code.
2020-12-15backend/drm: add wlr_drm_connector.backendSimon Ser
This allows the DRM code to have direct access to the wlr_drm_backend without having to go through an upcast via get_drm_backend_from_backend.
2020-12-15backend: use fcntl(F_DUPFD_CLOEXEC) instead of dupSimon Ser
This makes sure the CLOEXEC flag is set on the dup'ed FD.
2020-12-15backend/drm: dup FD before wlr_gbm_allocator_createSimon Ser
The GBM allocator takes ownership of the DRM FD.
2020-12-15render/gles2: require GL_EXT_unpack_subimageSimon Ser
We implicitly depended on this extension.
2020-12-15Remove inline keywordSimon Ser
The compiler is smarter at figuring out whether a function should be inlined or not.
2020-12-13backend/drm: stop using GBM flagsSimon Ser
gbm_bo_create_with_modifiers doesn't take GBM flags, so our wlr_gbm_allocator interface doesn't either. We were still internally using GBM flags in the DRM backend, leading to awkward back-and-forth conversions. The only flag passed to drm_plane_init_surface was GBM_BO_USE_LINEAR, so turn that into a bool to make sure other flags can't be passed in. Move the "force linear" logic out of init_drm_surface, because the supplied wlr_drm_format should already contain that information.
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-13build: move wayland-egl dependency to examples/Simon Ser
Now that the Wayland backend has moved to wlr_swapchain, only client examples use the dependency. Stop linking against wayland-egl in the wlroots library.
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-10egl: fix memory leakIlia Bozhinov
I have noticed this with LeakSanitizer, I hope these are all occurrences.
2020-12-09output: improve basic test loggingSimon Ser
2020-12-09render/gles2: query alpha size from render bufferSimon Ser
If we're using a render buffer, query the alpha size from it. Closes: https://github.com/swaywm/wlroots/issues/2527
2020-12-09render/gles2: don't eglGetConfigAttrib on EGL_NO_CONFIG_KHRSimon Ser
If we don't have an EGL config, don't try to query anything from it.
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-08render/drm_format_set: assert len <= cap when duplicatingSimon Ser
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-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.