From d57b1026a398f2707fbcb4415bd8b9b3bbcbd3b0 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 6 Sep 2023 20:28:34 +0100 Subject: [PATCH] drm: Add g_bForceAsyncFlips --- src/drm.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drm.cpp b/src/drm.cpp index dd0f5c8..c67418c 100644 --- a/src/drm.cpp +++ b/src/drm.cpp @@ -2464,6 +2464,8 @@ drm_prepare_liftoff( struct drm_t *drm, const struct FrameInfo_t *frameInfo, boo return ret; } +bool g_bForceAsyncFlips = false; + /* Prepares an atomic commit for the provided scene-graph. Returns 0 on success, * negative errno on failure or if the scene-graph can't be presented directly. */ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameInfo ) @@ -2546,7 +2548,7 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI if ( drm->crtc != nullptr ) flags |= DRM_MODE_PAGE_FLIP_EVENT; - if ( async ) + if ( async || g_bForceAsyncFlips ) flags |= DRM_MODE_PAGE_FLIP_ASYNC; if ( needs_modeset ) {