aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-29backend/drm: remove wlr_drm_crtc_state.activeSimon Ser
Replace it with drm_connector_state_active, which figures out whether the connector is active depending on the wlr_output_state to be applied.
2021-04-29backend/drm: remove wlr_drm_crtc.pending_modesetSimon Ser
Replace it with a new drm_connector_state_is_modeset function that decides whether a modeset is necessary directly from the wlr_output_state which is going to be applied.
2021-04-29backend/drm: fill scratch wlr_output_state for set_modeSimon Ser
Populate the wlr_output_state when setting a mode. This will allow drm_connector_set_mode to stop relying on ephemeral fields in wlr_drm_crtc. Also drm_connector_set_mode will be able to apply both a new buffer and a new mode atomically.
2021-04-29backend/drm: take wlr_output_state as arg in commit callersSimon Ser
Instead of relying on wlr_output.pending to be empty when performing backend-initiated CRTC commits, use a zero wlr_output_state.
2021-04-29backend/drm: take wlr_output_state as arg in crtc_commitSimon Ser
Stop assuming that the state to be applied is in output->pending in crtc_commit. This will allow us to remove ephemeral fields in wlr_drm_crtc, which are used scratch fields to stash temporary per-commit data.
2021-04-29render/gles2: assert texture comes from the same rendererSimon Ser
Rendering a wlr_texture with a different wlr_renderer is invalid. Add an assert to make sure this doesn't happen.
2021-04-29backend/drm: fix allocator DRM FD on multi-GPU setupsSimon Ser
On multi-GPU setups, there is a primary DRM backend and secondary DRM backends. wlr_backend_get_drm_fd will always return the parent DRM FD even on secondary backends, so that users always use the primary device for rendering. However, for our internal rendering we want to use the secondary device. Use allocator_autocreate_with_drm_fd to make sure the allocator will create buffers on the secondary device. We do something similar to ensure our internal rendering will happen on the secondary device with renderer_autocreate_with_drm_fd. Fixes: cc1b66364cc9 ("backend: use wlr_allocator_autocreate")
2021-04-29render/allocator: add allocator_autocreate_with_drm_fdSimon Ser
Same as wlr_allocator_autocreate, but allows the caller to force a DRM FD. Similar to renderer_autocreate_with_drm_fd.
2021-04-29render: remove wlr_ prefix from wlr_renderer_autocreate_with_drm_fdSimon Ser
This function is only required because the DRM backend still needs to perform multi-GPU magic under-the-hood. Remove the wlr_ prefix to make it clear it's not a candidate for being made public.
2021-04-29backend/drm: reword wlr_renderer failure messageSimon Ser
Remove the assumption about EGL.
2021-04-28Log when WLR_BACKENDS/WLR_RENDERER is setSimon Ser
Makes it easier to figure out why a backend/renderer is picked.
2021-04-28backend: use wlr_allocator_autocreateSimon Zeni
2021-04-28render/allocator: introduce wlr_allocator_autocreateSimon Zeni
2021-04-28render: introduce renderer_get_render_buffer_capsSimon Zeni
2021-04-28backend: introduce backend_get_buffer_capsSimon Zeni
2021-04-28types/wlr_buffer: introduce wlr_buffer_capSimon Zeni
2021-04-28render/shm_allocator: make wlr_shm_allocator_create return a wlr_allocatorSimon Zeni
2021-04-28render/gbm_allocator: make wlr_gbm_allocator_create return a wlr_allocatorSimon Zeni
2021-04-27render/pixman: check format is supported in create_bufferSimon Ser
2021-04-27buffer: add format param to get_data_ptrSimon Ser
Allow wlr_buffer_impl.get_data_ptr to return a format. This allows the Pixman renderer to not care about get_dmabuf/get_shm, and only care about get_data_ptr. This will also help with [1], because client wl_shm buffers can't implement get_shm. [1]: https://github.com/swaywm/wlroots/pull/2892 References: https://github.com/swaywm/wlroots/issues/2864
2021-04-27types/wlr_screencopy_v1: log error on read pixels failureSimon Zeni
2021-04-27pixman: implement read pixelsSimon Zeni
2021-04-27render/pixman: implement preferred_read_formatSimon Zeni
2021-04-27Revert "backend/drm: fail instead of stripping a modifier"Simon Ser
This reverts commit f9f90b417366581b58d806956c9b2099417ed4b3. gbm_bo_get_modifier may return a modifier in these cases: - The kernel doesn't support modifiers but Mesa does - WLR_DRM_NO_MODIFIERS=1 is set However, in both of these cases, the gbm_bo has been allocated without modifiers. There is already a check in drm_fb_create for modifiers: wlr_drm_format_set_has will make sure buffers with an explicit modifier will be rejected if the DRM backend doesn't support them. So no need for an additional check in get_fb_for_bo. Closes: https://github.com/swaywm/wlroots/issues/2896
2021-04-27backend/drm: carry on when disabling a CRTC failsSimon Ser
On GPU unplug, disabling a CRTC can fail with EPERM. References: https://github.com/swaywm/wlroots/pull/2575#issuecomment-761771264
2021-04-27backend/drm: destroy backend on udev remove eventSimon Ser
Any use of the DRM FD after the remove event results in a "Permission denied" error.
2021-04-27backend/session: add wlr_device.events.removeSimon Ser
2021-04-27backend/drm: destroy when parent is destroyedSimon Ser
2021-04-26backend/drm: clarify error message on drmModeAddFB fallbackSimon Ser
The previous code would always print "falling back to legacy method", even if the format wasn't ARGB8888. Drop get_fb_for_bo_legacy, since the code can just be inlined without hurting readability. Ideally we should only fallback to drmModeAddFB if the error code indicates the BE failure, but the original PR [1] doesn't say what error code is returned by the kernel. [1]: https://github.com/swaywm/wlroots/pull/2569
2021-04-26backend/drm: fail instead of stripping a modifierSimon Ser
We shouldn't strip a modifiers from buffers, because the will make the kernel re-interpret the data as LINEAR on most drivers, resulting in an incorrect output on screen.
2021-04-26xcursor: quiet debug logSimon Ser
Stop listing all available cursors each time a cursor theme is loaded. They can be obtained from the CLI instead, e.g. ls /usr/share/icons/Adwaita/cursors
2021-04-26Log drmGetDevices2 error codeSimon Ser
2021-04-26render: unconditionally read WLR_RENDERERSimon Ser
Prior to this commit, WLR_RENDERER was only looked up when the backend returned a DRM FD. Make it so WLR_RENDERER is always looked up, so that running wlroots on a system without a GPU and with WLR_RENDERER=gles2 fails as expected instead of falling back to the Pixman renderer.
2021-04-26render/egl: fail on EGL_MESA_device_softwareSimon Zeni
2021-04-24readme: use webchat link for IRC channelSimon Ser
GitHub refuses to render ircs:// URLs.
2021-04-24readme: mention IRC channelSimon Ser
2021-04-24readme: update and cleanup xcb depsSimon Ser
Switch from the pkg-config dependency names to the upstream libxcb repository names. Each repository contains multiple libraries but is generally available in distributions as a single package. libxcb contains xcb, xcb-composite, xcb-xfixes, xcb-xinput and xcb-shm. libxcb-render-util contains xcb-render. libxcb-wm contains xcb-icccm. xcb-image was outdated and is no longer needed.
2021-04-23xwayland: remove _NET_WM_PID handlerAleksei Bavshin
We already get the PID from XRes and _NET_WM_PID code can overwrite it with incorrect data.
2021-04-23xwayland: query window PIDs via XResQueryClientIdsAleksei Bavshin
`_NET_WM_PID` is unreliable: it is optional and even if set it may contain PIDs from sandbox namespaces or remote systems. Prefer XRes v1.2 QueryClientIds method which returns PIDs as seen by the Xwayland server.
2021-04-22render: remove NULL checks in wlr_texture_impl.destroySimon Ser
The NULL check already exists in wlr_texture_destroy, no need to duplicate it in each impl
2021-04-22render/pixman: destroy textures on renderer teardownSimon Ser
2021-04-22render/gles2: destroy textures on renderer teardownSimon Ser
2021-04-22render/pixman: cleanup when renderer is destroyedSimon Ser
We were leaking wlr_pixman_buffers and a wlr_drm_format_set.
2021-04-21output: correctly handle outputs without a test() implSimon Ser
This fixes a crash when calling wlr_output_test() on a headless output. Closes: https://github.com/swaywm/sway/issues/6213
2021-04-21render/gles2: log when creating rendererSimon Ser
Make it clear GLES2 is being used. Before this commit, various GL-related information was printed, but not an easy-to-find line about which renderer is being picked up.
2021-04-20render: introduce WLR_RENDERER in wlr_renderer_autocreate_with_drm_fdSimon Zeni
This env var forces the creation of a specific renderer. If no renderer is specified, the function will try to create all of the renderers one by one until one is created successfuly.
2021-04-20render/gles2: introduce wlr_gles2_renderer_create_with_drm_fdSimon Zeni
2021-04-20backend/x11: add support for shm buffersTadeo Kondrak
2021-04-20render: Assert that texture dimensions are > 0nyorain
2021-04-20examples/rotation: remove unused includesSimon Zeni