diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2017-02-09 13:01:03 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2017-08-17 15:52:24 +0900 |
commit | 4445765af5b97d0cfd10889fe6d6f58f2ce85659 (patch) | |
tree | 74939f3b3eb707e68fceed1cd043d5015d57c1d5 /src/drmmode_display.h | |
parent | 65e0c5ea1b4adff21d673dbf54af99704c429627 (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.
v2:
* Move manpage hunk to next change, since TearFree can still prevent
DRI2 page flipping with this change.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> # v1
Diffstat (limited to 'src/drmmode_display.h')
-rw-r--r-- | src/drmmode_display.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/drmmode_display.h b/src/drmmode_display.h index 13f301f7..a6db87f8 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -85,6 +85,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; @@ -106,6 +107,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 { @@ -146,7 +155,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); } |