diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-12-21 12:49:27 +0100 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-12-28 12:07:49 +0100 |
commit | f66254c171f5a3b052a2a9e0339f17dfb5a60dc2 (patch) | |
tree | 2662b4709e1c20c2877c4c7f4597462d22415dc3 /src/drmmode_display.h | |
parent | ce7db51020d32f17e442338bfd305220feb51630 (diff) |
Automatically try re-enabling TearFree after a flip failed
Specifically, after both the page flip and vblank ioctls failed, but
then the vblank ioctl started working again. This can happen
intermittently e.g. when hotplugging a DP display. Previously, TearFree
would stay disabled in that case until a modeset was triggered somehow.
Bugzilla: https://bugs.freedesktop.org/103791
(Ported from amdgpu commit bcfa6c258fdf41a9928f8a3c78fc528d0fafee25)
Diffstat (limited to 'src/drmmode_display.h')
-rw-r--r-- | src/drmmode_display.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drmmode_display.h b/src/drmmode_display.h index bfc13010..f5659664 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -71,6 +71,12 @@ struct drmmode_fb { uint32_t handle; }; +enum drmmode_scanout_status { + DRMMODE_SCANOUT_OK, + DRMMODE_SCANOUT_FLIP_FAILED = 1u << 0, + DRMMODE_SCANOUT_VBLANK_FAILED = 1u << 1, +}; + struct drmmode_scanout { struct radeon_buffer *bo; PixmapPtr pixmap; @@ -90,6 +96,7 @@ typedef struct { unsigned scanout_id; uintptr_t scanout_update_pending; Bool tear_free; + enum drmmode_scanout_status scanout_status; PixmapPtr prime_scanout_pixmap; |