present: Move scmd-update-window-crtc function
Move the code portion down. That way it is at a similar position as in the window mode file. Signed-off-by: Roman Gilg <subdiff@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
8c2dcc5f80
commit
d3c1b223ce
@ -222,30 +222,6 @@ present_queue_vblank(ScreenPtr screen,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
present_scmd_update_window_crtc(WindowPtr window, RRCrtcPtr crtc, uint64_t new_msc)
|
|
||||||
{
|
|
||||||
present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE);
|
|
||||||
uint64_t old_ust, old_msc;
|
|
||||||
|
|
||||||
/* Crtc unchanged, no offset. */
|
|
||||||
if (crtc == window_priv->crtc)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* No crtc earlier to offset against, just set the crtc first time. */
|
|
||||||
if (window_priv->crtc == PresentCrtcNeverSet) {
|
|
||||||
window_priv->crtc = crtc;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Crtc may have been turned off, just use whatever previous MSC we'd seen from this CRTC. */
|
|
||||||
if (present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success)
|
|
||||||
old_msc = window_priv->msc;
|
|
||||||
|
|
||||||
window_priv->msc_offset += new_msc - old_msc;
|
|
||||||
window_priv->crtc = crtc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When the wait fence or previous flip is completed, it's time
|
* When the wait fence or previous flip is completed, it's time
|
||||||
* to re-try the request
|
* to re-try the request
|
||||||
@ -636,6 +612,30 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
|
|||||||
present_execute_post(vblank, ust, crtc_msc);
|
present_execute_post(vblank, ust, crtc_msc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
present_scmd_update_window_crtc(WindowPtr window, RRCrtcPtr crtc, uint64_t new_msc)
|
||||||
|
{
|
||||||
|
present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE);
|
||||||
|
uint64_t old_ust, old_msc;
|
||||||
|
|
||||||
|
/* Crtc unchanged, no offset. */
|
||||||
|
if (crtc == window_priv->crtc)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* No crtc earlier to offset against, just set the crtc. */
|
||||||
|
if (window_priv->crtc == PresentCrtcNeverSet) {
|
||||||
|
window_priv->crtc = crtc;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Crtc may have been turned off, just use whatever previous MSC we'd seen from this CRTC. */
|
||||||
|
if (present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success)
|
||||||
|
old_msc = window_priv->msc;
|
||||||
|
|
||||||
|
window_priv->msc_offset += new_msc - old_msc;
|
||||||
|
window_priv->crtc = crtc;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
present_scmd_pixmap(WindowPtr window,
|
present_scmd_pixmap(WindowPtr window,
|
||||||
PixmapPtr pixmap,
|
PixmapPtr pixmap,
|
||||||
|
Loading…
Reference in New Issue
Block a user