summaryrefslogtreecommitdiff
path: root/src/drmmode_display.h
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-08-18 16:57:13 +0900
committerMichel Dänzer <michel@daenzer.net>2017-08-22 18:34:14 +0900
commit8c82878c6ef1b984ba289383dc17152192c916ee (patch)
tree50129f6ca90ecdeb3608522b47e51efe1a0f4139 /src/drmmode_display.h
parentd8e8f0107bb3e83a787917f4db16a7a54ce4768b (diff)
Always allow Present page flipping with TearFree
Even if TearFree is active for the the CRTC we're synchronizing to. In that case, for Present flips synchronized to vertical blank, the other scanout buffer is immediately synchronized and flipped to during the target vertical blank period. For Present flips not synchronized to vertical blank, we simply use the MSC and timestamp values of the last vertical blank period for timing purposes, and let the normal TearFree mechanism handle display updates. (Ported from radeon commit 4445765af5b97d0cfd10889fe6d6f58f2ce85659) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/drmmode_display.h')
-rw-r--r--src/drmmode_display.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index b5788e2..1a6454c 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -81,6 +81,7 @@ typedef struct {
struct drmmode_scanout rotate;
struct drmmode_scanout scanout[2];
DamagePtr scanout_damage;
+ Bool ignore_damage;
RegionRec scanout_last_region;
unsigned scanout_id;
Bool scanout_update_pending;
@@ -100,6 +101,14 @@ typedef struct {
struct drmmode_fb *flip_pending;
/* The FB currently being scanned out by this CRTC, if any */
struct drmmode_fb *fb;
+
+#ifdef HAVE_PRESENT_H
+ /* Deferred processing of Present vblank event */
+ uint64_t present_vblank_event_id;
+ uint64_t present_vblank_usec;
+ unsigned present_vblank_msc;
+ Bool present_flip_expected;
+#endif
} drmmode_crtc_private_rec, *drmmode_crtc_private_ptr;
typedef struct {
@@ -139,7 +148,8 @@ drmmode_crtc_can_flip(xf86CrtcPtr crtc)
return crtc->enabled &&
drmmode_crtc->dpms_mode == DPMSModeOn &&
!drmmode_crtc->rotate.bo &&
- !drmmode_crtc->scanout[drmmode_crtc->scanout_id].bo;
+ (drmmode_crtc->tear_free ||
+ !drmmode_crtc->scanout[drmmode_crtc->scanout_id].bo);
}