sna/dri2: Avoid trying to flip between bo with different pitches

It could happen that we create front/back buffers with different
pitches. The kernel refuses to flip between such buffers, and so we will
hit some fallback paths that try to fix up the failed flips. Circumvent
such by avoiding the flip.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-06-09 14:56:02 +01:00
parent 16574754a9
commit 8901a99afb
1 changed files with 8 additions and 0 deletions

View File

@ -1459,6 +1459,14 @@ can_flip(struct sna * sna,
return false;
}
if (get_private(front)->bo->pitch != get_private(back)->bo->pitch) {
DBG(("%s -- no, pitch mismatch: front %d, back=%d\n",
__FUNCTION__,
get_private(front)->bo->pitch,
get_private(back)->bo->pitch));
return false;
}
if (sna_pixmap(pixmap)->pinned & ~(PIN_DRI2 | PIN_SCANOUT)) {
DBG(("%s -- no, pinned: front %x\n",
__FUNCTION__, sna_pixmap(pixmap)->pinned));