since 4932e0d347f("backend/drm: ensure plane surfaces are cleaned up on shutdown")
at finish_drm_resources called drm_plane_finsh_surface has already free the fb
Signed-off-by: zhoulei zhoulei@kylinos.cn
Signed-off-by: sunzhguy <sunzhigang1@kylinos.cn>
Right now this is done "by chance" because we disable all CRTCs
on shutdown. However, we'll stop doing this. Plus, if disabling
a CRTC fails, we don't cleanup properly.
We can just assume CLOCK_MONOTONIC everywhere.
Simplifies the backend API, and fixes clock mismatches when multiple
backends are used together with different clocks.
We currently only perform non-blocking commits for non-modeset commits
with a buffer attached.
Perform non-blocking commits whenever there is no pending pageflip
event. If a non-blocking modeset commit fails, which can happen if the
driver implicitly added more CRTCs to the commit that we did not know we
had to wait for, retry with a blocking commit.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2239
The name "allow_artifacts" and associated description is very vague, and
theoretically allow for tearing behavior. Clarify that we only intend to
mean artifacts related to output configuration (e.g., modesets).
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3740
Since headless and wayland-without-presentation-feedback were firing
present inside their commit impls, present was getting fired before
commit, which is cursed. Defer this with an idle timer so that commit
handlers can run before present handlers.
DRM_MODE_PAGE_FLIP_ASYNC doesn't allow user-space to submit new
buffers before waiting for the uevent: the kernel will return EBUSY
in that case.
Fixes: c2aa7fd965 ("backend/drm: Add async page flip support to legacy")
Since e5fc8cd4c7 ("output: trigger frame/present events on all
commits on enabled output"), any commit on an enabled output is
supposed to trigger frame/present events.
The DRM backend was skipping the commit completely for no-op
commits. Stop doing so.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3719
Up until now, frame/present events were only triggered when the
user submitted a buffer. Change the wlr_output API so that these
events are triggered when any commit is applied on an enabled
output.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3708
When integrating wlroots with another toolkit, wlroots may receive
wl_pointer.enter events for surfaces not backed by a wlr_output.
Ignore such surfaces by tagging the ones we're aware of with
wl_proxy_set_tag().
We were only restoring fixed modes here. The DRM backend no longer
creates fixed modes when the compositor sets a custom mode, so we
need to handle this situation when restoring.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3698
A no-op commit should not schedule a new frame. This aligns the
headless backend with the rest of the backends.
This will be important to handle the enabled → disabled transition.