sna: Defer submission of the next shadow frame until halfway through

Do not immediately post the next shadow flip on completion of the
current flips, but instead queue a timer for half way through the next
vblank so that try to we keep the additional input-output lag to less
than a frame.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2018-04-01 13:13:19 +01:00
parent 8f2d08016a
commit af36a4ab78
1 changed files with 4 additions and 2 deletions

View File

@ -8894,8 +8894,10 @@ static void shadow_flip_handler(struct drm_event_vblank *e,
{
struct sna *sna = data;
if (!sna->mode.shadow_wait)
sna_mode_redisplay(sna);
sna->timer_active |= 1 << FLUSH_TIMER;
sna->timer_expire[FLUSH_TIMER] =
e->tv_sec * 1000 + e->tv_usec / 1000 +
sna->vblank_interval / 2;
}
void sna_shadow_set_crtc(struct sna *sna,