Skip to content

Commit

Permalink
drm: Add g_bForceAsyncFlips
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Oct 25, 2023
1 parent f52bd15 commit d57b102
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/drm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -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 ) {
Expand Down

0 comments on commit d57b102

Please sign in to comment.