From 9c1930d462805569efd70bddcde796a6422e54c8 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Tue, 9 Apr 2024 16:53:18 +0200 Subject: [PATCH] backend/drm: Skip multi-gpu outputs in backend tests Our multi-gpu path currently needs to blit a buffer in order to have a primaryfb to add to the commit. This is expensive, and we skip it entirely during test commits. This in turn also means that we skip tests commits entirely for such outputs, outside our own basic tests. Backend-wide commits missed this check, and tried to perform test commits for multi-gpu outputs despite no primaryfb having been attached, making them always fail. Add the same exception as we have in the per-connector commit-test. --- backend/drm/drm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/drm/drm.c b/backend/drm/drm.c index da194445..b2e2c392 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1923,6 +1923,13 @@ bool commit_drm_device(struct wlr_drm_backend *drm, modeset |= output_state->base.allow_reconfiguration; } + if (test_only && drm->parent) { + // If we're running as a secondary GPU, we can't perform an atomic + // commit without blitting a buffer. + ok = true; + goto out; + } + uint32_t flags = 0; if (!test_only) { flags |= DRM_MODE_PAGE_FLIP_EVENT;