diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-11-21 18:32:04 +0100 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-12-13 12:17:30 +0100 |
commit | bcfa6c258fdf41a9928f8a3c78fc528d0fafee25 (patch) | |
tree | 5bd59e6137a5f3f1e13969c37bba17405a26c1a1 /src/drmmode_display.h | |
parent | 4e7a24ac5a64e402146953ec5850d13c05742116 (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
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
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 b2b16df..aab330c 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -91,6 +91,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 amdgpu_buffer *bo; PixmapPtr pixmap; @@ -110,6 +116,7 @@ typedef struct { unsigned scanout_id; uintptr_t scanout_update_pending; Bool tear_free; + enum drmmode_scanout_status scanout_status; Bool vrr_enabled; PixmapPtr prime_scanout_pixmap; |