From 017555651b01a2e4fbdda9d59b29c847094d57b7 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 8 Jul 2021 15:56:01 +0200 Subject: backend/drm: add test_only arg to wlr_drm_interface.crtc_commit Right now callers of drm_crtc_commit need to check whether the interface is legacy or atomic before passing the TEST_ONLY flag. Additionally, the fallbacks for legacy are in-place in the common code. Add a test_only arg to the crtc_commit hook. This way, there's no risk to pass atomic-only flags to the legacy function (add an assert to ensure this) and all of the legacy-specific logic can be put back into legacy.c (done in next commit). --- include/backend/drm/iface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/backend') diff --git a/include/backend/drm/iface.h b/include/backend/drm/iface.h index 98bae974..f7107973 100644 --- a/include/backend/drm/iface.h +++ b/include/backend/drm/iface.h @@ -16,7 +16,7 @@ struct wlr_drm_interface { // Commit al pending changes on a CRTC. bool (*crtc_commit)(struct wlr_drm_backend *drm, struct wlr_drm_connector *conn, const struct wlr_output_state *state, - uint32_t flags); + uint32_t flags, bool test_only); }; extern const struct wlr_drm_interface atomic_iface; -- cgit v1.2.3