Age | Commit message (Collapse) | Author |
|
References: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/272
|
|
Simplify things a bit.
|
|
In the CREATE_DUMB error code-path, we'd only free() the buffer,
however it's already inserted in the alloc->buffers list at this
point.
Instead, make sure finish_buffer() is safe to call (by populating
drm_fd) and call that function.
|
|
Simplifies error handling a bit.
|
|
Check that the modifier list passed as input contains either
INVALID or LINEAR. We don't support others.
|
|
INVALID means that the modifier is implicit. However dumb buffers
are guaranteed to be LINEAR, so let's just advertise this. Fixes
cursors with the DRM backend: cursor planes usually only support
LINEAR.
|
|
|
|
|
|
|
|
Replace them with wlr_signal_emit_safe, which correctly handles
cases where a listener removes another listener.
Reported-by: Isaac Freund <ifreund@ifreund.xyz>
|
|
Now that the DRM backend no longer depends on GBM, we can make it
optional. The GLES2 renderer still depends on it because of our EGL
device selection.
This is useful for compositors with their own renderers, and for
compositors using the Vulkan renderer.
|
|
Ensures there is no field left to its previous undefined value after
calling an init function.
|
|
The lease_fd is currently being leaked to child processes
Link: https://github.com/swaywm/sway/issues/4286#issuecomment-1065987957
|
|
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3389
|
|
See [1] for the motivation.
[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/75
|
|
If the backend doesn't have a DRM FD, fallback to the renderer's.
This accomodates for the situation where the headless backend hasn't
picked a DRM FD in particular, but the renderer has picked one.
|
|
|
|
This allows us to obtain a new DRM file description without relying
on filesystem permissions.
|
|
If we aren't trying to create a dumb buffer allocator, and if the
DRM device has a render node (ie, not a split render/display SoC),
then we can use the render node instead of the primary node. This
should allow wlroots to run under seatd when the current user
doesn't have the permission to open primary nodes (logind has a
quirk to allow physically logged in users to open primary nodes).
|
|
This reverts commit ea7357b70366588069c83f158e6a4eb2d3a702b3.
|
|
See [1] for the motivation.
[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/75
|
|
This allows callers to specify the operations they'll perform on
the returned data pointer. The motivations for this are:
- The upcoming Linux MAP_NOSIGBUS flag may only be usable on
read-only mappings.
- gbm_bo_map with GBM_BO_TRANSFER_READ hurts performance.
|
|
Makes it easier to find out which branch is taken when debugging
issues like [1].
[1]: https://github.com/swaywm/wlroots/issues/3156
|
|
Closes: https://github.com/swaywm/wlroots/issues/3156
|
|
Using the same DRM file description for the DRM backend and for the
GBM allocator will result in GEM handle ref'counting issues [1].
Re-open the DRM FD to fix these issues.
[1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110
|
|
Add render/allocator/ and include/render/allocator/ to hold
everything allocator-related.
|