Simon Ser
6c350799b2
Zero-initialize structs in init functions
...
Ensures there is no field left to its previous undefined value after
calling an init function.
2022-04-28 10:09:50 +02:00
Samuel Čavoj
5c17452ae0
Pass O_CLOEXEC to drmModeCreateLease calls
...
The lease_fd is currently being leaked to child processes
Link: https://github.com/swaywm/sway/issues/4286#issuecomment-1065987957
2022-03-13 13:28:48 +01:00
Simon Ser
39b68ea47a
buffer: extract interface to separate header
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3389
2022-03-03 15:39:05 +01:00
Simon Ser
e4f748c6e9
render/allocator: fallback to renderer DRM FD in autocreate
...
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.
2021-11-25 15:12:32 +00:00
Simon Zeni
02a1ae169e
render/allocator: make wlr_allocator part of the public API
2021-11-09 15:26:36 +00:00
Simon Ser
1b65a80e9d
render/allocator: use empty DRM lease to re-open node
...
This allows us to obtain a new DRM file description without relying
on filesystem permissions.
2021-10-14 21:23:41 +02:00
Simon Ser
13cdb84ee8
render/allocator: use render node if available in reopen_drm_node
...
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).
2021-10-04 12:25:27 +02:00
Simon Ser
7df2ae88fa
render/allocator: use legacy authentication for primary nodes
...
Closes: https://github.com/swaywm/wlroots/issues/3156
2021-09-03 11:44:12 -04:00
Simon Ser
d9d8fc1ab9
render/allocator: re-open GBM FD
...
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
2021-09-01 15:17:05 -04:00
Simon Ser
3ce2ea9e16
Move allocator stuff into new directory
...
Add render/allocator/ and include/render/allocator/ to hold
everything allocator-related.
2021-08-25 09:57:20 -04:00