Age | Commit message (Collapse) | Author |
|
Get the DMA-BUF directly out of the wlr_buffer instead of relying on the
gbm_bo. This eliminates a roundtrip through GBM.
|
|
The GBM BO is destroyed when released anyways.
|
|
|
|
Instead of re-importing a buffer each time we submit a frame, re-use the
pixmaps if possible.
|
|
Instead of re-importing a buffer each time we submit a new frame, re-use
the wl_buffer objects if possible.
|
|
We don't use EGLSurface anymore, so we don't need to choose an EGL
config anymore.
|
|
This function may end up being called more than once if the Xwayland
binary does not exist on the system.
|
|
|
|
|
|
Instead of hand-rolling our own manual wlr_output cleanup function, rely
on wlr_output_destroy to remove an output from the compositor's state.
|
|
The DRM backend is a little special when it comes to wlr_outputs: the
wlr_drm_connectors are long-lived and are created even when no screen is
connected.
A wlr_drm_connector only advertises a wlr_output to the compositor when
a screen is connected. As such, most of wlr_output's state is invalid
when the connector is disconnected.
We want to stop using wlr_output state on disconnected connectors.
Introduce wlr_drm_connector.name which is always valid regardless of the
connector status to avoid reading wlr_output.name when disconnected.
|
|
Simplify and unify connector-specific logging with a new
wlr_drm_conn_log macro. This makes it easier to understand which
connector a failure is about, without having to explicitly integrate the
connector name in each log message.
|
|
Instead of sending dummy output present events, use the X11 Present
extension to send more precise events.
|
|
|
|
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.
|
|
Instead of manually allocating and initializing the structs, use the new
wlr_drm_format helpers.
|
|
|
|
|
|
Save the DRM device name in a wlr_drm_backend field, so that we can
easily use it for logging purposes.
|
|
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
|
|
|
|
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
|
|
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.
|
|
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.
|
|
This makes sure the CLOEXEC flag is set on the dup'ed FD.
|
|
The GBM allocator takes ownership of the DRM FD.
|
|
We implicitly depended on this extension.
|
|
The compiler is smarter at figuring out whether a function should be
inlined or not.
|
|
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.
|
|
Don't mix xinput and present flags.
Fixes: d79a00bf0208 ("backend/x11: switch to wlr_swapchain")
|
|
|
|
|
|
|
|
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.
|
|
|
|
The cursor surface still uses a wl_egl_window.
References: https://github.com/swaywm/wlroots/issues/1352
|
|
Instead of rendering a black frame, schedule a frame event to ask the
compositor to render a proper frame.
|
|
- 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.
|
|
Closes: https://github.com/swaywm/wlroots/issues/2533
|
|
I have noticed this with LeakSanitizer, I hope these are all occurrences.
|
|
|
|
If we're using a render buffer, query the alpha size from it.
Closes: https://github.com/swaywm/wlroots/issues/2527
|
|
If we don't have an EGL config, don't try to query anything from it.
|
|
Since we're using wlr_swapchain, we don't need to provide an EGL config.
|
|
|
|
This caused issues with wlr_drm_format_dup.
|
|
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
|
|
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>
|
|
We don't do anything with them. Once we do, we can easily add this back.
|
|
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).
|