From 7aa0c43396e3c0cfec850324c7de399c46642fdd Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Sat, 29 May 2021 17:50:20 +0200 Subject: [PATCH] drm/atomic: workaround possible amdgpu bug --- src/backend/drm/surface/atomic.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/backend/drm/surface/atomic.rs b/src/backend/drm/surface/atomic.rs index a61a598..20f6f0e 100644 --- a/src/backend/drm/surface/atomic.rs +++ b/src/backend/drm/surface/atomic.rs @@ -531,12 +531,17 @@ impl AtomicDrmSurface { // on the atomic api we can modeset and trigger a page_flip event on the same call! AtomicCommitFlags::PageFlipEvent, AtomicCommitFlags::AllowModeset, - // we also do not need to wait for completion, like with `set_crtc`. - // and have tested this already, so we do not expect any errors later down the line. - AtomicCommitFlags::Nonblock, + // we also *should* not need to wait for completion, like with `set_crtc`, + // because we have tested this exact commit already, so we do not expect any errors later down the line. + // + // but there is always an exception and `amdgpu` can fail in interesting ways with this flag set... + // https://gitlab.freedesktop.org/drm/amd/-/issues?scope=all&utf8=%E2%9C%93&state=opened&search=drm_atomic_helper_wait_for_flip_done + // + // so we skip this flag: + // AtomicCommitFlags::Nonblock, ] } else { - &[AtomicCommitFlags::AllowModeset, AtomicCommitFlags::Nonblock] + &[AtomicCommitFlags::AllowModeset] }, req, )