sna/present: Restrict pending flip check to enqueueing
Present checks for a flip-compatible Pixmap prior to deciding whether to queue the flip after a pending flip, and at that point we do not want to reject a potential flip due to outstanding flips. That is only of restriction only applies when we request the kernel to perform the flip, so more the check to the corresponding position. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
934733e7c7
commit
c7517c4fe2
|
|
@ -213,11 +213,6 @@ check_flip__crtc(struct sna *sna,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (sna->mode.flip_active) {
|
||||
DBG(("%s: flips still pending\n", __FUNCTION__));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -414,6 +409,7 @@ sna_present_flip(RRCrtcPtr crtc,
|
|||
PixmapPtr pixmap,
|
||||
Bool sync_flip)
|
||||
{
|
||||
struct sna *sna = to_sna_from_pixmap(pixmap);
|
||||
struct kgem_bo *bo;
|
||||
|
||||
DBG(("%s(pipe=%d, event=%lld, msc=%lld, pixmap=%ld, sync?=%d)\n",
|
||||
|
|
@ -423,12 +419,17 @@ sna_present_flip(RRCrtcPtr crtc,
|
|||
(long long)target_msc,
|
||||
pixmap->drawable.serialNumber, sync_flip));
|
||||
|
||||
if (!check_flip__crtc(to_sna_from_pixmap(pixmap), crtc)) {
|
||||
if (!check_flip__crtc(sna, crtc)) {
|
||||
DBG(("%s: flip invalid for CRTC\n", __FUNCTION__));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
assert(to_sna_from_pixmap(pixmap)->present.unflip == 0);
|
||||
if (sna->mode.flip_active) {
|
||||
DBG(("%s: flips still pending\n", __FUNCTION__));
|
||||
return false;
|
||||
}
|
||||
|
||||
assert(sna->present.unflip == 0);
|
||||
|
||||
bo = get_flip_bo(pixmap);
|
||||
if (bo == NULL) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue